# List countries available for proxy extraction

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

Query the dynamic API country directory and the number of currently available stable ports. Token authorization does not represent the withdrawal of a source that has met the whitelist and interest conditions.

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/countries`

(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. |

No requested body.

## Example of a request

```bash
curl --request GET \
  "https://api.zzhttp.com/openapi/v1/proxy/countries?api_key=${API_KEY}"
```

## 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. | — | Success 200. The whitelist batch fails any for 10431. |
| message | string | Yes, I am. | — | (b) Outcome statement. |
| data | object | Yes, I am. | — | This interface is business data. |
| data.countryRouteId | integer | Yes, I am. | — | Public country routing ID. |
| data.countryCode | string | Yes, I am. | — | Country code, which is the return value for region extraction. GLOBAL stands for global. |
| data.countryName | string | Yes, I am. | — | Country display name. |
| data.availableCount | integer | Yes, I am. | — | Currently, there is a stable number of ports available, not a stock of brokered exports. |

```json
{
  "code": 200,
  "message": "Query succeeded",
  "data": [
    {
      "countryRouteId": 1,
      "countryCode": "USA",
      "countryName": "United States",
      "availableCount": 20
    }
  ]
}
```

## Errors and Retry

A temporary error in reading the country catalog can be retryed with limited chances, 429 waiting for Retry-After.

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);}
