Skip to main content
The 2extract Public API gives you programmatic access to everything you can do in the dashboard: create and configure proxies, track usage, manage your balance, and look up geo data - all over HTTPS with JSON.

Interactive Swagger UI

Explore and test every endpoint directly in your browser.

Postman Collection

Import the ready-made collection and start making requests in minutes.

Base URL

All API requests go to:
https://api.2extract.com

Authentication

The API uses API keys passed in a request header. Every request must include:
X-API-Key: 2xt_YOUR_API_KEY
Getting an API key:
  1. Open the Dashboard and go to API Keys in the sidebar.
  2. Click Create API Key and select the permissions you need.
  3. Copy the key - it is shown only once.
API keys are secrets. Do not commit them to version control or expose them in client-side code. Rotate a key immediately if it is ever leaked.

Scopes

Each API key carries one or more scopes that gate access to endpoint groups. Request only the scopes your integration needs.
ScopeGrants access to
proxies:readList and retrieve proxy details
proxies:writeCreate, update, and delete proxies
stats:readTraffic statistics and usage export
balance:readAccount balance and balance history
geo:readCountry, state, city, and ZIP lookup
proxies:write does not include proxies:read - the scopes are independent.

Request Format

For endpoints that accept a body (POST, PUT), send JSON and set the Content-Type header:
Content-Type: application/json

Response Format

All responses are JSON wrapped in a standard envelope:
{
  "result": true,
  "data": { ... },
  "error": "",
  "error_type": "",
  "meta": {}
}
FieldTypeDescription
resultbooleantrue on success, false on error
dataobject / arrayThe response payload
errorstringHuman-readable error message (empty on success)
error_typestringMachine-readable error code (empty on success)
metaobjectPagination or other metadata where applicable

Error Handling

Error responses use standard HTTP status codes alongside the envelope:
{
  "result": false,
  "error": "API key not found or expired",
  "error_type": "unauthorized"
}
HTTP StatusMeaning
400 Bad RequestInvalid input - check the request body or query parameters
401 UnauthorizedMissing or invalid API key
403 ForbiddenValid key, but insufficient scope for this endpoint
404 Not FoundThe requested resource does not exist

Quick Example

Retrieve all your proxies with a single curl call:
curl https://api.2extract.com/v1/proxy \
  -H "X-API-Key: 2xt_YOUR_API_KEY"
See the Swagger UI for a full interactive reference of every endpoint, including request schemas and live response examples.