Skip to content

REST API

Everything the dashboard does, as HTTP. Create proxy users, reset passwords, read your balances and usage, and generate proxy lists from your own scripts, authenticated with an API key rather than a browser session.

Authentication

Create a key under Settings → API keys in your dashboard. It is shown once, at creation: we store only a hash, so we cannot show it again, and a key you lose is a key you revoke and replace. Send it as a bearer token on every request.

bash
curl -H "Authorization: Bearer avo_live_EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLE" \
  https://www.avocadoproxies.com/api/v1/me

Every key starts with avo_live_ followed by 32 random bytes. You may hold up to 10 active keys; revoking one takes effect immediately.

A key gives full access to your account, with no second factor. Keep it out of source control and out of anything a browser can read. If one leaks, revoke it; the limit of 10 and the per-key rate limit exist to make that survivable.

Scopes

Scopes are independent and there is no hierarchy: a key with generate cannot read your account, and a key made for one job cannot quietly do another. Give each integration the narrowest set that works.

  • read: Read your account, balances and usage
  • proxies: Create, update and rotate proxy credentials, and reveal their passwords
  • generate: Generate proxy lists from a credential

Conventions

  • Base URL: https://www.avocadoproxies.com/api/v1
  • Every JSON response is either {"ok":true,"data":…} or {"ok":false,"error":{"code","message"}}. Check ok, not the shape of the body.
  • Every response carries Cache-Control: private, no-store. Nothing we return may be held in a shared cache.
  • Bearer routes ignore the session cookie entirely, so there is no CSRF token to send and no origin to match.

Rate limits

A budget of 600 requests a minute, per key; the call that reaches it is the one refused. That answers 429 with AVO_TOO_MANY_REQUESTS and a Retry-After header in seconds; wait that long rather than retrying immediately. The budget is per key, so a busy worker slows down that worker and nothing else on your account.

Your ACCOUNT has a second budget of 1200 requests a minute across every key it holds, so a fleet of keys is not a way around the figure above. It is set well clear of two or three busy integrations running at once.

Two endpoints are additionally bounded per ACCOUNT, and share one budget with the dashboard: GET /proxies/{id}/secret and POST /generate both reveal a password, so both spend one of 60 reveals an hour and both leave a row in your audit trail. Generate a long list once instead of a short one in a loop.

Endpoints

GET /me

read scope. The account this key belongs to, with the GB balance of every product and whether that product is on sale right now (available). The email address is masked.

bash
curl -H "Authorization: Bearer avo_live_EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLE" \
  https://www.avocadoproxies.com/api/v1/me

GET /proxies

proxies scope. Every proxy user on the account. Passwords are never included.

bash
curl -H "Authorization: Bearer avo_live_EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLE" \
  https://www.avocadoproxies.com/api/v1/proxies

POST /proxies

proxies scope. Create a proxy user. Body: kind (RESIDENTIAL | MOBILE | PREMIUM), optional label, optional entryRegion (eu | na | auto). The password is in the response and nowhere else.

bash
curl -X POST -H "Authorization: Bearer avo_live_EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLE" \
  -H "Content-Type: application/json" \
  -d '{"kind":"RESIDENTIAL","label":"scraper"}' \
  https://www.avocadoproxies.com/api/v1/proxies

PATCH /proxies/{id}

proxies scope. Update a proxy user: enabled, label, allowedIps (IPs or CIDRs, up to 200), entryRegion.

bash
curl -X PATCH -H "Authorization: Bearer avo_live_EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLE" \
  -H "Content-Type: application/json" \
  -d '{"enabled":false}' \
  https://www.avocadoproxies.com/api/v1/proxies/cmxk0ph2t0001qz8yv1example

POST /proxies/{id}/rotate

proxies scope. Reset a proxy user's password. The new one is in the response; the old one keeps working for up to a minute while our gateway's cache expires.

bash
curl -X POST -H "Authorization: Bearer avo_live_EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLE" \
  https://www.avocadoproxies.com/api/v1/proxies/cmxk0ph2t0001qz8yv1example/rotate

GET /proxies/{id}/secret

proxies scope. Reveal a proxy user's password. Rate limited per account and recorded in your audit trail, on the same budget the dashboard's reveal uses.

bash
curl -H "Authorization: Bearer avo_live_EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLE" \
  https://www.avocadoproxies.com/api/v1/proxies/cmxk0ph2t0001qz8yv1example/secret

GET /usage

read scope. Traffic per day and per product. days defaults to 30 and is clamped to 1–30.

bash
curl -H "Authorization: Bearer avo_live_EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLE" \
  "https://www.avocadoproxies.com/api/v1/usage?days=7"

GET /usage/live

read scope. Your traffic per destination host for a short window. minutes defaults to 15.

bash
curl -H "Authorization: Bearer avo_live_EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLE" \
  "https://www.avocadoproxies.com/api/v1/usage/live?minutes=15"

POST /generate

generate scope. Build a proxy list from one proxy user. Returns text/plain lines by default, or the usual JSON envelope with output:"json". Counts as one password reveal.

bash
curl -X POST -H "Authorization: Bearer avo_live_EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLE" \
  -H "Content-Type: application/json" \
  -d '{"proxyId":"cmxk0ph2t0001qz8yv1example","count":100,"format":"host:port:user:pass","country":"de","session":"sticky","ttl":30}' \
  https://www.avocadoproxies.com/api/v1/generate > proxies.txt

Generating lists

POST /generate takes a proxy user and returns up to 10,000 lines built exactly as the dashboard's Generate tab builds them; the same code produces both. Supply format as one of host:port:user:pass, user:pass@host:port, host:port@user:pass, user:pass:host:port, http://user:pass@host:port, and session as rotating or sticky. A sticky request also takes ttl in minutes, up to the ceiling of the proxy user's product (55 minutes on residential and mobile, 115 minutes on premium residential), and every line gets its own session id so the list holds separate sessions rather than one shared address.

Targeting is validated against the product the proxy user belongs to: asking for a city on a product that offers country targeting only is refused with AVO_TARGETING_NOT_SUPPORTED rather than silently widened. country is a two-letter code from the list the dashboard offers (de, not germany), and a state or city has to be one of ours too; anything else is refused rather than turned into lines the gateway would reject. The login in each line is your own, e.g. avo_7f3c2a-cc-de-sid-a1b2c3-ttl-30.

Error codes

These are the codes this API returns. The gateway your proxy traffic goes through has its own set; see the error reference for those.

StatusCodeMeaning
400AVO_BAD_REQUESTThe body or a parameter did not validate. The message names the field.
400AVO_BAD_VALUEA targeting value was the wrong shape, or a session lifetime was above your product's ceiling.
400AVO_BAD_TARGETINGThe targeting combination is not legal: a city without a state, or a ttl without a sticky session.
400AVO_TARGETING_NOT_SUPPORTEDThe targeting is legal, but the product does not offer it, for example city targeting on a product that sells country targeting only, or a state or city outside our location list.
400AVO_BAD_IPSOne or more allowlist entries are not valid IPs or CIDRs. The message lists them.
401AVO_UNAUTHENTICATEDThe key is missing, unknown, revoked, or the account is suspended. All four answer identically.
403AVO_FORBIDDEN_SCOPEThe key is valid but does not carry the scope this endpoint needs.
404AVO_NOT_FOUNDNo such resource on this account. An id belonging to someone else answers the same way.
404AVO_UNKNOWN_PRODUCTThat product is not available.
409AVO_LIMITAn account ceiling was reached, for example 100 proxy users.
429AVO_TOO_MANY_REQUESTSRate limited. The Retry-After header says how many seconds to wait.
500AVO_INTERNALSomething went wrong on our side. Retry with backoff; the message never carries detail.
REST API · Avocado Proxies