logo

XPROXY-ENGINE

Loading...

Proxy API Usage Tutorial

Introduction

Welcome to our Proxy API usage tutorial. This guide will walk you through the process of authenticating, retrieving, and filtering proxy data using our API.

Authentication

To use the API, you need to include your API key and email in every request. These should be passed as query parameters:

apikey=your_api_key&[email protected]

Step-by-Step Tutorial

1. Verify Your API Key

Start by verifying your API key:

https://proxys.exp-9.com/api/proxies?apikey=your_api_key&[email protected]

If successful, you'll receive a message confirming your API key is valid.

2. Retrieve All Proxies

To get all proxies with default pagination:

https://proxys.exp-9.com/api/proxies?apikey=your_api_key&[email protected]&page=1&limit=50

3. Filter Proxies

You can filter proxies using various parameters:

  • By protocol: protocol=HTTP
  • By date: date=2023-05-01
  • By status: is_live=true
  • By country: country=US

Example of a filtered request:

https://proxys.exp-9.com/api/proxies?apikey=your_api_key&[email protected]&protocol=HTTP&is_live=true&country=US

4. Paginate Results

Use pagination to navigate through large result sets:

https://proxys.exp-9.com/api/proxies?apikey=your_api_key&[email protected]&page=2&limit=100

This retrieves the second page of results with 100 items per page.

5. Combine Filters and Pagination

You can combine multiple filters with pagination:

https://proxys.exp-9.com/api/proxies?apikey=your_api_key&[email protected]&protocol=HTTPS&is_live=true&city=London&page=1&limit=50

6. Handle the Response

The API returns a JSON object with two main fields:

  • data: An array of proxy objects
  • pagination: Information about the current page, total pages, and total count

Use this information to display the results and implement pagination in your application.

API Response Format

The API response will be in the following format:

{
  "data": [
    {
      "id": 1,
      "ip": "192.168.1.1",
      "port": 8080,
      "protocol": "HTTP",
      "is_live": true,
      "country": "US",
      "last_checked": "2024-08-14T12:00:00Z"
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 10,
    "totalCount": 500,
    "limit": 50
  }
}

Error Handling

In case of an error, the API will return a JSON object with an error message:

{
  "error": "Invalid API key"
}

Rate Limiting

Our API is rate limited to ensure fair usage. You can make up to 100 requests per minute. If you exceed this limit, you'll receive a 429 Too Many Requests response.

Support

If you need any assistance or have questions about using our API, please don't hesitate to contact our support team at [email protected].