# Get proxy endpoints with an API token

Description of the authentication, parameters, and response fields of the public dynamic API.

Authentication using the Account API Token or History API Link. The actual source IPv4 must be enabled on the host to whitelist, extract real-name checks and protocol matching interests. GET/POST extracts are in a compatible format, and do not support session, state, and city parameters.

All examples are synthesised data and placement credentials, showing only structure. The interface contract does not mean that the target environment is open.

## Interfaces and authentication

`GET /openapi/v1/proxy/extract`

(a) Use of HTTPS;api_key Query, X-API-Key or Authorization: Bearer supports peer authentication, conflicting values are rejected. The actual source white list remains valid.

## Request parameters

| Field | Type | Required field | Default values / Limits | Notes |
| --- | --- | --- | --- | --- |
| api_key | string | No. | Query · or authentication request header | Account API tokens stored on a controlled server. The example uses a placeholder. |
| num | integer | Yes, I am. | query · minimum 1. Up to 100 | Extract line number. |
| regions | string | No. | query · Default GLOBAL | Country code, from the national catalogue. Country aliases are compatible, but must be transmitted consistently. |
| protocol | string | No. | query · Default http;http/socks5 | HTTP Agent can CONNECT to access HTTPS targets. Do not accept https. |
| return_type | string | No. | query · default json;json / txt enumeration | Returns the format. |
| lb | string | No. | Default 1;1 / 2 / 3 / 4 / 5 / 6 | TXT delimiter: 1 CRLF, 2 /br, 3 CR, 4 LF, 5 TAB, 6 Custom sb. |
| sb | string | No. | query · — | lb=6 Required, not empty and maximum UTF-8 byte length 32. |
| request_id | string | No. | query · — | Optional pair request number, omitted from the X-Request-Id or service-side generation. |

No requested body.

## Example of a request

```bash
curl --request GET \
  "https://api.zzhttp.com/openapi/v1/proxy/extract?api_key=${API_KEY}&num=1&regions=GLOBAL&protocol=http"
```

## Successful response

The response does not contain internal fields or proxy passwords. HTTP 200 / code 0 is extracted as successful. Whitelist and country catalog code 200 for success. The POST extracts are incorrectly formatted as code/message. The country directory successfully responded without a requestId.

HTTP 200 · JSON: Success or batch results, check the business code at the same time.

| Field | Type | Required field | Default values / Limits | Notes |
| --- | --- | --- | --- | --- |
| code | integer | Yes, I am. | Fixed 0 | The compatibility success code is 0, different from the static API success code 200. |
| success | boolean | Yes, I am. | Fixed true | Mark success. |
| msg | string | Yes, I am. | — | (b) Outcome statement. |
| data | object | Yes, I am. | — | This interface is business data. |
| data.ip | string | Yes, I am. | — | The proxy gateway IP or hostname. |
| data.port | integer | Yes, I am. | — | Proxy gateway port. |
| request_ip | string | Yes, I am. | — | The service identifies the real call source IPv4. |

```json
{
  "code": 0,
  "success": true,
  "msg": "Successfully obtained",
  "data": [
    {
      "ip": "203.0.113.20",
      "port": 7878
    }
  ],
  "request_ip": "198.51.100.10"
}
```

HTTP 200 · TXT: return_type=txt plain text response, separated by lb/sb.

```text
203.0.113.20:7878
```

## Errors and Retry

Requests to interrupt the replica of the original requestId/request_id. Partial returns are determined by X-Proxy-Requested-Count, X-Proxy-Returned-Count, and X-Proxy-Partial. There are not enough resources to wait for Retry-After, and the national catalog can be read again only in a limited way.

Error code, HTTP status, and error response fields are unified.[Error Codes and Recommendations](/en/developers/errors/error-codes).

html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}
