Getting started
From signup to first successful request in under a minute.
1. Create an API key
Sign up, then head to Dashboard → Keys and click Create new key. The plaintext key is shown once on creation; save it to your secrets manager immediately. After that, the dashboard only shows the prefix (e.g. sk_live_a1b2c3d4...).
2. Send your first request
Replace $GHOSTFETCH_API_KEY with the key you just created. The endpoint returns rendered HTML in the response body, with bypass metadata in response headers.
curl
terminalbash
curl https://api.ghostfetch.io/unlock \
-H "Authorization: Bearer $GHOSTFETCH_API_KEY" \
--get \
--data-urlencode "url=https://www.example.gov/search" \
--data-urlencode "render=stealth"Python
unlock.pypython
import os
import requests
resp = requests.get(
"https://api.ghostfetch.io/unlock",
params={
"url": "https://www.example.gov/search",
"render": "stealth",
},
headers={"Authorization": f"Bearer {os.environ['GHOSTFETCH_API_KEY']}"},
timeout=120,
)
resp.raise_for_status()
print(resp.headers["X-Unlock-Solve-Time-Ms"], "ms")
html = resp.textNode.js
unlock.tstypescript
const res = await fetch(
"https://api.ghostfetch.io/unlock?" +
new URLSearchParams({
url: "https://www.example.gov/search",
render: "stealth",
}),
{
headers: {
Authorization: `Bearer ${process.env.GHOSTFETCH_API_KEY}`,
},
},
);
if (!res.ok) throw new Error(`unlock failed: ${res.status}`);
const html = await res.text();
console.log(res.headers.get("X-Unlock-Solve-Time-Ms"), "ms");3. Pick a render mode
The render parameter controls how aggressively we work the target site:
render=none— plain HTTP fetch through our proxy pool. 1x billing. Right for static HTML and JSON.render=js— Chromium with JS but no stealth. 2x billing. Right for SPAs that don't actively defend.render=stealth— full stealth context with captcha solving. 3x billing. The reason we exist.
4. Handle the response
Status codes you should expect:
| Status | Meaning | Billed? |
|---|---|---|
| 200 | Unlocked. HTML in body. | Yes |
| 422 | Captcha could not be solved. | No |
| 429 | Your plan's rate limit. | No |
| 5xx | Our infrastructure failed. | No |