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.
curl -H "Authorization: Bearer avo_live_EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLE" \
https://www.avocadoproxies.com/api/v1/meEvery key starts with avo_live_ followed by 32 random bytes. You may hold up to 10 active keys; revoking one takes effect immediately.
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 usageproxies: Create, update and rotate proxy credentials, and reveal their passwordsgenerate: 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"}}. Checkok, 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.
curl -H "Authorization: Bearer avo_live_EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLE" \
https://www.avocadoproxies.com/api/v1/meGET /proxies
proxies scope. Every proxy user on the account. Passwords are never included.
curl -H "Authorization: Bearer avo_live_EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLE" \
https://www.avocadoproxies.com/api/v1/proxiesPOST /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.
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/proxiesPATCH /proxies/{id}
proxies scope. Update a proxy user: enabled, label, allowedIps (IPs or CIDRs, up to 200), entryRegion.
curl -X PATCH -H "Authorization: Bearer avo_live_EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLE" \
-H "Content-Type: application/json" \
-d '{"enabled":false}' \
https://www.avocadoproxies.com/api/v1/proxies/cmxk0ph2t0001qz8yv1examplePOST /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.
curl -X POST -H "Authorization: Bearer avo_live_EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLE" \
https://www.avocadoproxies.com/api/v1/proxies/cmxk0ph2t0001qz8yv1example/rotateGET /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.
curl -H "Authorization: Bearer avo_live_EXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLEEXAMPLE" \
https://www.avocadoproxies.com/api/v1/proxies/cmxk0ph2t0001qz8yv1example/secretGET /usage
read scope. Traffic per day and per product. days defaults to 30 and is clamped to 1–30.
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.
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.
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.txtGenerating 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.
| Status | Code | Meaning |
|---|---|---|
| 400 | AVO_BAD_REQUEST | The body or a parameter did not validate. The message names the field. |
| 400 | AVO_BAD_VALUE | A targeting value was the wrong shape, or a session lifetime was above your product's ceiling. |
| 400 | AVO_BAD_TARGETING | The targeting combination is not legal: a city without a state, or a ttl without a sticky session. |
| 400 | AVO_TARGETING_NOT_SUPPORTED | The 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. |
| 400 | AVO_BAD_IPS | One or more allowlist entries are not valid IPs or CIDRs. The message lists them. |
| 401 | AVO_UNAUTHENTICATED | The key is missing, unknown, revoked, or the account is suspended. All four answer identically. |
| 403 | AVO_FORBIDDEN_SCOPE | The key is valid but does not carry the scope this endpoint needs. |
| 404 | AVO_NOT_FOUND | No such resource on this account. An id belonging to someone else answers the same way. |
| 404 | AVO_UNKNOWN_PRODUCT | That product is not available. |
| 409 | AVO_LIMIT | An account ceiling was reached, for example 100 proxy users. |
| 429 | AVO_TOO_MANY_REQUESTS | Rate limited. The Retry-After header says how many seconds to wait. |
| 500 | AVO_INTERNAL | Something went wrong on our side. Retry with backoff; the message never carries detail. |