# API

### 1024Proxy API Feature Overview

The API feature provides a more convenient operating method for users with programming capabilities. By modifying API parameters, users can quickly filter and extract the proxy IPs they need. The 1024Proxy API is more commonly used in business scenarios such as data scraping, where frequent IP switching is required.

### Quick Overview

<figure><img src="https://2295534253-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZmKo6oTzHow9Ets95QI8%2Fuploads%2FCcycpKyI1iIxwuaqD2cH%2F1.png?alt=media&#x26;token=833bd902-ed8b-49ff-b44c-9cc154749e4d" alt=""><figcaption></figcaption></figure>

### How to Use the 1024Proxy API

{% stepper %}
{% step %}

### Add Your Local Public IP to the IP Whitelist

Click the \[Add Whitelist] button to add your local public IP address to the IP whitelist.

<figure><img src="https://2295534253-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZmKo6oTzHow9Ets95QI8%2Fuploads%2FGM4TpKWeWfW84l9TemKh%2F2.png?alt=media&#x26;token=db798073-be47-4cfd-ab79-d705eb7d12d2" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2295534253-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZmKo6oTzHow9Ets95QI8%2Fuploads%2FZ8xXPSUlPy0EFL5cfj2n%2F3.png?alt=media&#x26;token=1218229e-7f0e-4ca7-a948-488556a4c2c6" alt=""><figcaption></figcaption></figure>

{% endstep %}

{% step %}

### Purchase a Dynamic Residential Traffic Plan

Return to the API Mode menu and select Dynamic Residential Traffic. You will be able to see that your local public IP has been successfully added to the IP whitelist.

<figure><img src="https://2295534253-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZmKo6oTzHow9Ets95QI8%2Fuploads%2FRPDoxxg7NzxupAR0eXot%2F4.png?alt=media&#x26;token=035dbcf4-ddc8-463a-b695-85dce19f3216" alt=""><figcaption></figcaption></figure>

Click Buy Now to be redirected to the plan purchase page and complete the purchase of a dynamic residential traffic plan.

<figure><img src="https://2295534253-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZmKo6oTzHow9Ets95QI8%2Fuploads%2FAfv0QuxNO0ei5CtEExwU%2F5.png?alt=media&#x26;token=f7a80e5c-b1d7-46be-a277-15cc12f259ee" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2295534253-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZmKo6oTzHow9Ets95QI8%2Fuploads%2FZ3J5Wx9Dy53m43VrQify%2F6.png?alt=media&#x26;token=da32616c-1b7a-4707-836f-d9ed2d0d7782" alt=""><figcaption></figcaption></figure>

{% endstep %}

{% step %}

### Set Filter Conditions or Parameters

After completing the purchase, click Console to enter API Mode.

Here, you can view the dynamic residential traffic you purchased and the remaining traffic available in your account.

<figure><img src="https://2295534253-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZmKo6oTzHow9Ets95QI8%2Fuploads%2FuVIxlZCmB4cQebMjkxyU%2F7.png?alt=media&#x26;token=f34f6bb0-c8fe-4272-8b66-425764ddb2ad" alt=""><figcaption></figcaption></figure>

By modifying the parameters below and completing the basic API configuration, you can use the API link to batch-extract the proxy IPs you need.

<figure><img src="https://2295534253-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZmKo6oTzHow9Ets95QI8%2Fuploads%2FuE2Fdkfwc8oz7bLQ9e31%2F8.png?alt=media&#x26;token=e9264408-6bc0-4383-a048-3737d798cb33" alt=""><figcaption></figcaption></figure>

* Country/Region: You can modify the country code via the dropdown menu to change the corresponding `region` parameter in the API link. This visual dropdown selection makes it easy for beginners to operate.
* Separator: 1024Proxy supports multiple API separators, making it suitable for a variety of business scenarios.
* Session Type: 1024Proxy provides two session types: Sticky Mode and Rotating Mode. In Dynamic Residential Traffic Sticky Mode, the session duration is 10/15 minutes. When Sticky Mode is selected, an additional `time` parameter will be included in the API.
* Data Format: This refers to the format of the data returned by the API. Different return formats are supported, and corresponding return examples are displayed on the official 1024Proxy website. The related API parameter is `type`.
* Quantity: This indicates the number of IPs extracted via the API link. The corresponding API parameter is `num`.
* API Link: By modifying the relevant parameters, you can change the IP extraction conditions. Simply copy the API link into your program or third-party proxy software to start using it.
* Return Examples: The returned example data corresponds to the two supported data formats: txt and json.
  {% endstep %}
  {% endstepper %}

### Parameter Description

| Parameter | Description                                         | Type   | Required |
| --------- | --------------------------------------------------- | ------ | -------- |
| region    | Country                                             | int    | Yes      |
| format    | Return data separator format, `n = \n`, `rn = \r\n` | string | Yes      |
| time      | Session duration                                    | int    | Yes      |
| num       | Number of IPs to extract                            | string | No       |
| type      | Data format: `txt`, `json`                          | string | No       |
