Skip to content
Home » Local API V2 User Guide

Local API V2 User Guide

Local API V2 is called in the same way as V1: first confirm the local port and Local API Key, then send an HTTP request to the endpoint.

All V2 endpoint paths begin with /openapi/v2, such as /openapi/v2/profiles/openapi/v2/proxies, and /openapi/v2/fingerprints.

Base URL

The Local API service runs on a local port. The full request URL uses the following format:

http://127.0.0.1:{port}/openapi/v2/...

Example:

GET http://127.0.0.1:52100/openapi/v2/profiles

{port} is the Local API port displayed or configured in the client. Replace the port, Profile ID, Proxy ID, and API Key in the examples with your actual values.

Request Headers

NameTypeRequiredDescription
X-API-KEYstringYesLocal API Key.
Content-TypestringRecommended for request bodyMust be application/json.
X-TokenstringNoOptional authentication header. Usually not required.

Notes:

  • Use X-API-KEY to call the API.
  • Send valid JSON to endpoints that accept a request body.
  • If any parameter is invalid, the corresponding error message is returned.

Response Format

V2 uses a standard response envelope:

{
  "code": 0,
  "msg": "success",
  "data": {},
  "next": null
}
NameTypeDescription
codeintegerBusiness status code. 0 indicates success.
msgstring/nullResponse message.
dataobject/nullResponse data. The structure varies by endpoint.
nextstring/nullCursor for the next page. null if there are no more pages.

Common errors:

HTTPcodeDescription
401401000The X-API-KEY header is missing.
403401000X-API-KEY does not match the local configuration.
429429000Too many requests.
502502000The service is temporarily unavailable.
502502001The service returned an invalid response.
504504000The request timed out.

Pagination

Some list endpoints support two pagination methods:

MethodParametersDescription
Page-basedpagepage_sizepage starts at 1.
Cursor-basedcursorlimitOmit cursor in the first request; use next from the response for the next page.

page/page_size and cursor/limit are mutually exclusive. Do not use them together.

Example paginated list response:

{
  "code": 0,
  "msg": "success",
  "data": {
    "list": [],
    "total": 0,
    "summary": null
  },
  "next": null
}

API Coverage

Local API V2 currently provides 72 endpoints:

ModuleCountDescription
Runtime9Service status, version, health, rate limits, sessions, stopping all Profiles, and available kernels.
Profiles19Create, read, update, and delete Profiles; manage accounts, groups, Proxy bindings, and start/stop actions.
Extensions and Bookmarks8Profile Bookmarks, Profile Extension settings, Extension installation, Extension lists, and Extension groups.
Tags6Create, read, update, and delete Tags; add Tags to or remove Tags from Profiles.
Profile Groups5Create, read, update, and delete Profile Groups.
Members and Permissions8Create, read, update, and delete Members; manage accessible Profile Groups, Member Groups, and permissions.
Proxies7Create, read, update, and delete Proxies; test Proxies.
Cookie4Query, import, and clear Cookies.
Fingerprints6Query, override, refresh, and generate Fingerprints; query Fingerprint options.

Module Documentation

ModuleEndpointsDocumentation
Runtime9View Runtime endpoints
Profiles19View Profile endpoints
Extensions and Bookmarks8View Extension and Bookmark endpoints
Tags6View Tag endpoints
Profile Groups5View Profile Group endpoints
Members and Permissions8View Member and permission endpoints
Proxies7View Proxy endpoints
Cookie4View Cookie endpoints
Fingerprints6View Fingerprint endpoints

Usage Notes

  • Every V2 endpoint path must include /openapi/v2.
  • Every request must include a valid X-API-KEY.
  • For endpoints with a request body, send JSON and set Content-Type: application/json.
  • For create, update, and import endpoints, test with a small data set before making bulk requests.
  • After a Profile starts successfully, use debug_port or web_socket_url from the response to connect to the browser.
  • If you receive a 429 response, reduce the request rate and refer to the Retry-After and X-RateLimit-* response headers.