Skip to content
Home » Local API V2 – Proxy Interface

Local API V2 – Proxy Interface

List Proxies

Endpoint

GET /openapi/v2/proxies

Returns a list of proxies.

Query Parameters

NameTypeRequiredDescription
pageintegerNoPage number for page-based pagination, starting from 1.
page_sizeintegerNoNumber of items per page for page-based pagination.
cursorstringNoCursor for cursor-based pagination.
limitintegerNoNumber of items per page for cursor-based pagination.
serial_nointegerNoProxy serial number.
idstringNoProxy ID.
typestringNoProxy type.
hoststringNoProxy host.
remarkstringNoRemark.
proxy_group_idstringNoProxy group ID.

data.list in the response contains the Proxy list items. See Proxy Response Fields for field details.

Create a Proxy

Endpoint

POST /openapi/v2/proxies

Creates a Proxy.

Request Parameters

The request body uses the Proxy create or update parameters described in Proxy Parameters.

Request Example

{
  "type": "http",
  "host": "127.0.0.1",
  "port": 8080,
  "user": "",
  "password": "",
  "ipchecker": "ipapi",
  "ip_version": "ipv4",
  "remark": "proxy created by Local API V2"
}

Get Proxy Details

Endpoint

GET /openapi/v2/proxies/{proxyId}

Path Parameters

NameTypeRequiredDescription
proxyIdstringYesProxy ID.

Update a Proxy

Endpoint

PATCH /openapi/v2/proxies/{proxyId}

Path Parameters

NameTypeRequiredDescription
proxyIdstringYesProxy ID.

Request Parameters

The request body uses the Proxy create or update parameters described in Proxy Parameters.

Delete a Proxy

Endpoint

DELETE /openapi/v2/proxies/{proxyId}

Path Parameters

NameTypeRequiredDescription
proxyIdstringYesProxy ID.

Check a Saved Proxy

Endpoint

POST /openapi/v2/proxies/{proxyId}/check

Checks a saved Proxy.

Path Parameters

NameTypeRequiredDescription
proxyIdstringYesProxy ID.

Check a Temporary Proxy

Endpoint

POST /openapi/v2/proxies/check

Checks an unsaved temporary Proxy.

Request Parameters

The request body uses the Proxy check parameters described in Proxy Check Parameters.

Response Example

{
  "code": 0,
  "msg": "success",
  "data": {
    "ok": true,
    "out_ip": "1.2.3.4",
    "country": "United States",
    "country_code": "US",
    "region": "California",
    "city": "Los Angeles",
    "timezone": "America/Los_Angeles",
    "status": "success",
    "error_message": ""
  },
  "next": null
}

The allowed values for data.status are waitsuccess, and fail.

Parameter Reference

Proxy Parameters

ProxyUpsertRequest is used to create and update proxies.

NameTypeRequiredDescription
typestringNoProxy type. Allowed values: nonehttphttpssshsocks5.
hoststringNoProxy host.
portintegerNoProxy port.
userstringNoProxy username.
passwordstringNoProxy password.
ipcheckerstringNoIP check provider. Allowed values: ip2locationipapi.
ip_versionstringNoIP address type. Allowed values: ipv4ipv6.
remarkstringNoRemark.
proxy_group_idstringNoProxy group ID.

Proxy Check Parameters

ProxyCheckRequest is used to check a temporary Proxy.

NameTypeRequiredDescription
typestringNoProxy type. Allowed values: nonehttphttpssshsocks5.
hoststringNoProxy host.
portintegerNoProxy port.
userstringNoProxy username.
passwordstringNoProxy password.
ipcheckerstringNoIP check provider. Allowed values: ip2locationipapi.
ip_versionstringNoIP address type. Allowed values: ipv4ipv6.
timeout_msintegerNoTimeout in milliseconds.

Proxy Response Fields

NameTypeDescription
proxy_idstringProxy ID.
serial_nointegerProxy serial number.
typestringProxy type. Allowed values: nonehttphttpssshsocks5.
hoststringProxy host.
portintegerProxy port.
userstringProxy username.
passwordstringProxy password.
ipcheckerstringIP check provider. Allowed values: ip2locationipapi.
ip_versionstringIP address type. Allowed values: ipv4ipv6.
proxy_group_idstringProxy group ID.
remarkstringRemark.