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:
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:
Open the Dashboard and go to API Keys in the sidebar.
Click Create API Key and select the permissions you need.
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.
Scope Grants 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.
For endpoints that accept a body (POST, PUT), send JSON and set the Content-Type header:
Content-Type : application/json
All responses are JSON wrapped in a standard envelope:
{
"result" : true ,
"data" : { ... },
"error" : "" ,
"error_type" : "" ,
"meta" : {}
}
Field Type Description resultboolean true on success, false on errordataobject / array The response payload errorstring Human-readable error message (empty on success) error_typestring Machine-readable error code (empty on success) metaobject Pagination 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 Status Meaning 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.