Apinoa Docs

Request

Send your own HTTP request (method, headers, body) to a public site and get the site's status, headers and body back as they arrived.

View raw .mdx
POST /v1/unlocker/request

Send the parameters as a JSON body (Content-Type: application/json). headers is a JSON object of header names to values, and body is a string. The x-api-key header is your apinoa key; the headers inside the body are what the site receives.

Request

Calling an API with your own token, as a JSON POST:

curl -X POST "https://gateway.apinoa.com/v1/unlocker/request" \
  -H "x-api-key: $APINOA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://httpbin.org/anything?q=shoes",
    "method": "POST",
    "headers": { "content-type": "application/json", "authorization": "Bearer YOUR_TOKEN" },
    "body": "{\"q\":\"shoes\"}"
  }'

Parameters

ParameterTypeRequiredNotes
urlstringyesThe address to request (http or https).
bodystring
bodyEncodingenumtext base64
countryenumUS
followRedirectsboolean
headersobjectHeaders to send, as given. A real browser's own headers replace User-Agent, sec-ch-ua*, Accept-Encoding, Host, Connection and Content-Length.
methodenumGET POST PUT PATCH DELETE HEAD
profileenumWhich kind of browser to present: desktop or mobile. Absent: either. desktop mobile

The same parameters, and every response type, are in the OpenAPI document.

  • body is at most 2 MiB, and a GET or HEAD request has none. For binary data, send it as base64 with bodyEncoding: "base64".
  • profile picks the kind of browser the request is sent as: desktop or mobile. Leave it out and one is chosen for you, and changed when a site refuses it.
  • At most 50 headers.

What Is Sent

Every header you pass is sent, except those that make up the browser's identity. Those are replaced with a real browser's own, because a value that disagrees with the rest of the request is the commonest reason a site refuses it:

HeaderWhat Happens
User-Agent, sec-ch-ua*Replaced by the browser's own
Accept-EncodingReplaced. The answer's body is returned decompressed
Host, Content-LengthSet from url and body
Connection, Keep-Alive, Transfer-Encoding, TE, Upgrade, Proxy-Authorization, Proxy-ConnectionDropped
Everything else (Authorization, Cookie, Content-Type, Accept, your own X-*)Sent as you wrote it

Redirects are followed unless followRedirects is false, which returns the 3xx itself. A redirect to another origin (a different scheme, host or port) does not carry your Authorization or Cookie header on. A 303, or a 301 or 302 answering a POST, PUT, PATCH or DELETE, is followed with a GET without the body, as a browser does.

Response

Returns UnlockResult in data. A real response, in full: httpbin echoes back the request it received, so body shows what the site was sent (the address in origin is replaced with a documentation address).

{
  "success": true,
  "data": {
    "status": 200,
    "url": "https://httpbin.org/anything?q=shoes",
    "headers": {
      "Access-Control-Allow-Credentials": "true",
      "Access-Control-Allow-Origin": "*",
      "Access-Control-Expose-Headers": "Retry-After, RateLimit, RateLimit-Policy, WWW-Authenticate",
      "Content-Type": "application/json",
      "Date": "Fri, 20 Nov 2026 09:42:23 GMT",
      "X-Content-Type-Options": "nosniff"
    },
    "body": "{\n  \"args\": {\n    \"q\": \"shoes\"\n  },\n  \"headers\": {\n    \"Accept\": \"application/json\",\n    \"Accept-Encoding\": \"gzip, deflate, br, zstd\",\n    \"Accept-Language\": \"en-US,en;q=0.9\",\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n    \"Cache-Control\": \"no-cache\",\n    \"Content-Length\": \"13\",\n    \"Content-Type\": \"application/json\",\n    \"Host\": \"httpbin.org\",\n    \"Pragma\": \"no-cache\",\n    \"Priority\": \"u=1, i\",\n    \"Sec-Ch-Ua\": \"\\\"Not;A=Brand\\\";v=\\\"8\\\", \\\"Chromium\\\";v=\\\"150\\\", \\\"Google Chrome\\\";v=\\\"150\\\"\",\n    \"Sec-Ch-Ua-Mobile\": \"?0\",\n    \"Sec-Ch-Ua-Platform\": \"\\\"Windows\\\"\",\n    \"Sec-Fetch-Dest\": \"empty\",\n    \"Sec-Fetch-Mode\": \"cors\",\n    \"Sec-Fetch-Site\": \"same-origin\",\n    \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36\"\n  },\n  \"method\": \"POST\",\n  \"origin\": \"203.0.113.7\",\n  \"url\": \"https://httpbin.org/anything?q=shoes\",\n  \"data\": \"{\\\"q\\\":\\\"shoes\\\"}\",\n  \"files\": {},\n  \"form\": {},\n  \"json\": {\n    \"q\": \"shoes\"\n  }\n}\n",
    "bodyEncoding": "text"
  }
}

Errors

StatusCodeMeaning
400INVALID_PARAMSA parameter is missing, unknown or out of range: url is not an http or https address, a GET or HEAD has a body, a base64 body is not base64, the body is over 2 MiB, or there are more than 50 headers. Also: the host is refused (see below). The message says which.
400UPSTREAM_TOO_LARGEThe site's answer is larger than 10 MiB.
400INVALID_PARAMSThe site's TLS certificate does not verify (it is checked on every request). The message names the host.
401UNAUTHORIZEDThe x-api-key header is missing, or the key is revoked or unknown.
402INSUFFICIENT_CREDITSYour credits do not cover this call. Choose a plan or top up in the dashboard.
404NOT_FOUNDThe site does not exist or refuses connections: its name does not resolve, or nothing accepts the connection. The message names the host.
429MARKETPLACE_SATURATEDToo many concurrent calls. Retry after the Retry-After seconds.
503UPSTREAM_UNAVAILABLEThe site stayed behind a bot check after every try. Retry later.

Every code is listed in Errors. Failed calls are not billed.

Refused Hosts

These are refused with INVALID_PARAMS, on the first request and on every redirect:

  • Sites an apinoa API serves. Amazon, Walmart, TikTok Shop, AliExpress, Reddit, LinkedIn, TikTok, YouTube, Threads, X, Instagram, Facebook, Google (search, Shopping, Play, Trends, Gemini), Bing, Copilot, Naver, Daum, Yahoo search, Yahoo! JAPAN, Yandex, Baidu, Sogou, Seznam, DuckDuckGo, Tripadvisor, the App Store, ChatGPT, Doubao and Qwen, with their image and video hosts. The message names the API to call instead, e.g. www.amazon.com is served by the amazon API — call /amazon/… instead of the unlocker.
  • Government and military sites (.gov, .mil, gov.uk, go.kr, europa.eu and other countries' government domains).
  • Private and internal addresses (localhost, 10.0.0.0/8, 192.168.0.0/16, internal names).

Pricing

Price 1 credit per started MiB of the answer's body: an answer up to 1 MiB costs 1 credit, one of 1.2 MiB costs 2 credits, and the largest, 10 MiB, costs 10 credits.

Notes

  • The site's answer is returned as it is. A 404, a 500 or a plain 403, 429 or 503 from the site is its answer: returned with its status, and billed. A bot-check page is not: a request a site blocks is retried automatically, and one still blocked is UPSTREAM_UNAVAILABLE, not billed.
  • Text or base64. A textual answer that is valid UTF-8 comes back as text in body; anything else (an image, a PDF, a zip) as base64, with bodyEncoding: "base64". Decoded, it is the site's bytes exactly.
  • No JavaScript is run. The answer is what the site's server sends.
  • TLS certificates are always checked. country is US, the only value.
  • Fields of every type are in the Response Schema.

On this page