# 🔧 GonzoProxy API Documentation

Client Documentation

Version: 1.2\
Status: Production\
Base URL:\
`https://api.gonzoproxy.app/functions/v1/proxy-api`

***

## 1. Authorization

All API requests require the `x-api-key` header.

How to get an API key:

1. Open your GonzoProxy dashboard.
2. Go to **Settings → API Keys**.
3. Create a new key.
4. Use it in all API requests.

Required header:

```
x-api-key: <your_api_key>
```

Example request:

```bash
curl -sS \
  -H "x-api-key: sk_123456789" \
  "https://api.gonzoproxy.app/functions/v1/proxy-api/countries"
```

***

## 2. Proxy Generation

### Endpoint

Method: `POST`\
Path: `/generate`

Full URL:

```
https://api.gonzoproxy.app/functions/v1/proxy-api/generate
```

***

## 2.1 Request Parameters

Parameters are passed in the JSON body of the request.

### Required Parameter

country\
Type: string

ISO country code (`US`) or full country name (`United States`)

***

### Optional Parameters

state\
Type: string\
State or region

Example:

```
California
New York
```

city\
Type: string\
City

Example:

```
Los Angeles
Miami
```

zip\
Type: string\
ZIP code

Example:

```
90001
10001
```

isp\
Type: string\
Internet Service Provider name

Example:

```
Comcast
Verizon
AT&T
```

sd\_code\
Type: number\
Subdivision code (region code)

***

count\
Type: number

Number of proxies to generate.

Range:

```
1 – 1000
```

Default:

```
1
```

***

rotation\
Type: boolean

IP rotation mode.

```
true  → new IP on every connection
false → sticky session
```

Default:

```
false
```

***

ttl\
Type: number

Session lifetime.

Example:

```
12
24
48
```

***

ttl\_unit\
Type: string

TTL time unit.

Supported values:

```
hours / h
minutes / m
seconds / s
```

Default:

```
hours
```

***

format\
Type: string

Proxy string format in the response.

Default:

```
user:pass@ip:port
```

Supported formats:

```
user:pass@ip:port
ip:port:user:pass        or 1
user:pass:ip:port        or 2
ip:port@user:pass        or 3
```

***

login\
Type: string

Overrides the default username.

***

password\
Type: string

Overrides the default password.

***

rg\_id\
Type: string

Additional sticky session parameter.

***

session\_rand\
Type: string

Random seed for sticky sessions.

***

## 2.2 Request Example

```bash
curl -sS -X POST \
  -H "x-api-key: sk_123456789" \
  -H "Content-Type: application/json" \
  "https://api.gonzoproxy.app/functions/v1/proxy-api/generate" \
  -d '{
    "country": "US",
    "state": "California",
    "zip": "90001",
    "count": 2,
    "rotation": false,
    "ttl": 12,
    "ttl_unit": "hours",
    "format": "1"
  }'
```

***

## 2.3 Response Example

```json
{
  "success": true,
  "proxies": [
    "209.145.63.244:10000:username_c_US_sd_123_zip_90001_s_123456ABC_ttl_12h:password",
    "209.145.63.244:10000:username_c_US_sd_123_zip_90001_s_654321XYZ_ttl_12h:password"
  ]
}
```

***

## 3. Filter Reference Endpoints

The API allows you to retrieve available countries, regions, cities, ZIP codes, and ISPs.

***

## 3.1 Get Countries

Method:

```
GET
```

Endpoint:

```
/countries
```

Parameters:

```
none
```

Example request:

```bash
curl -sS \
  -H "x-api-key: sk_123456789" \
  "https://api.gonzoproxy.app/functions/v1/proxy-api/countries"
```

Example response:

```json
{
  "countries": [
    {
      "country_code": "US",
      "country_name": "United States",
      "isps": [1783, 1902, 2553]
    }
  ]
}
```

***

## 3.2 Get States / Regions

Method:

```
GET
```

Endpoint:

```
/states
```

Required parameter:

```
country
```

Example request:

```
/states?country=US
```

Response:

```json
{
  "states": ["California", "New York"],
  "states_detailed": [
    { "state_name": "California", "subdivision_code": 123 },
    { "state_name": "New York", "subdivision_code": 456 }
  ]
}
```

***

## 3.3 Get Cities

Method:

```
GET
```

Endpoint:

```
/cities
```

Required parameter:

```
country
```

Optional parameter:

```
state
```

Examples:

```
/cities?country=US
/cities?country=US&state=New York
```

Response:

```json
{
  "cities": ["Los Angeles", "San Diego"]
}
```

***

## 3.4 Get ZIP Codes

Method:

```
GET
```

Endpoint:

```
/zips
```

Required parameter:

```
country
```

Optional parameters:

```
state
city
```

Examples:

```
/zips?country=US
/zips?country=US&state=New York&city=New York
```

Response:

```json
{
  "zips": ["10001", "10002"]
}
```

***

## 3.5 Get Internet Service Providers (ISP)

Method:

```
GET
```

Endpoint:

```
/isps
```

Required parameter:

```
country
```

Optional parameters:

```
state
city
```

Examples:

```
/isps?country=US
/isps?country=US&state=New York&city=New York
```

Response:

```json
{
  "isps": ["Comcast", "Verizon"],
  "isps_detailed": [
    { "isp_name": "Comcast", "isp_code": 1783 },
    { "isp_name": "Verizon", "isp_code": 1902 }
  ]
}
```

***

## 4. API Response Codes

```
200  — request successful
400  — invalid request parameters
401  — missing or empty x-api-key
403  — invalid or disabled API key
404  — endpoint not found
429  — rate limit exceeded
500  — internal server error
```

Error response format:

```json
{
  "error": "Error description"
}
```

***

## 5. Rate Limits

Rate limit applies to:

```
POST /generate
```

Current limit:

```
100 requests per minute per API key
```

***

## 6. Compatibility

This documentation reflects the current API behavior for version:

```
1.2
```

The API may receive updates without changes to the main structure.

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.gonzoproxy.com/api/gonzoproxy-api-documentation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
