Documentation
API reference
Version 1. It only grows: new options, headers and fields can appear; nothing you rely on changes. Ignore what you do not know.
Authentication
Every request carries your key in a header: Authorization: Bearer YOUR_API_KEY (or X-Api-Key: YOUR_API_KEY). A key in the address is not read. A missing, unknown or replaced key gets 401 invalid_key.
Fetch a page
GET https://gimmepage.com/v1/fetch?url=…, or POST https://gimmepage.com/v1/fetch with the same options as a JSON object. Unknown options are refused with invalid_request.
| Option | Default | Meaning |
|---|---|---|
url | required | The address: absolute, http or https, port 80 or 443, at most 8,192 characters. Percent-encode it in a query. Sent to the site exactly as given. |
render | false | false: the content as the site sent it (1 credit). true: the page as a browser shows it after its scripts ran (5 credits). |
proxy | standard | The address the request leaves from. standard: gimmepage's own. residential: a home internet connection (10 credits, or 25 credits with render=true). Use it when a site refuses the standard request. It is never replaced by standard: when no residential address is free the request fails with temporarily_unavailable, free. |
country | us | Only with proxy=residential: the country of the address, us (United States) or de (Germany). Without proxy=residential it is refused with invalid_request. |
output | raw | raw: the content unchanged. markdown: an HTML page converted to Markdown, at no extra cost; anything that is not an HTML page fails with not_convertible, free. |
max_chars | none | With output=markdown: cut the Markdown after this many characters. |
timeout | 60 | Seconds, 2 to 60, counted from when the request arrives. The answer comes within it. |
format | body | body: the content is the answer's body, the details are headers. json: one JSON object with the details and the content. |
A successful answer
Status 200; the request is charged. Content-Type is the site's own (or text/markdown; charset=utf-8). Headers:
Gimmepage-Request-Id | The request's ID, req_…. Every answer has one, successful or not. |
Gimmepage-Cost | Credits charged: 1 or 5 on success (10 or 25 through a residential address), 0 on every error. |
Gimmepage-Balance | Credits left after this request. |
Gimmepage-Site-Status | The status the site answered with. |
Gimmepage-Final-Url | The address the content came from after redirects. |
Gimmepage-Output | raw or markdown. |
Gimmepage-Proxy | standard or residential: the kind of address the request left from. |
Gimmepage-Country | Only for a residential request: us or de. |
Gimmepage-Cached | Present, with the copy's age in seconds, when the content is a copy the site itself declared fresh. Charged like any page. |
Gimmepage-Truncated | Present, with the full length in characters, when the Markdown was cut at max_chars. |
The answer also carries Content-Security-Policy: sandbox and X-Content-Type-Options: nosniff: a browser that opens it runs none of the page's scripts.
With format=json
{
"request_id": "req_01JD3Y8K2M4N6P8R0T2V4X6Z8B",
"site_status": 200,
"final_url": "https://example.com/",
"content_type": "text/html; charset=utf-8",
"output": "raw",
"proxy": "standard",
"content": "<!doctype html>…",
"cost": 1,
"balance": 19999
}
A residential request has "proxy": "residential" and "country". For content that is not text (an image, a PDF) the field is content_base64 instead of content. With Markdown cut at max_chars: "truncated": true and "full_length". For a cached copy: "cached_age_s".
An error
{
"error": "site_busy",
"message": "You already have a request running for www.example.org. Requests to one site run one at a time; send the next one when this one has finished.",
"retry": true,
"retry_after_s": 5,
"request_id": "req_01JD3Y8K2M4N6P8R0T2V4X6Z8B"
}
site_status is added when the site answered; limit with too_many_requests. When there is a wait, Retry-After is set too. Every code is on the Errors page.
Your balance
GET https://gimmepage.com/v1/balance, free and not counted as a request:
{"balance": 19999, "prices": {"raw": 1, "render": 5, "residential_raw": 10, "residential_render": 25}, "credits_per_usd": 4000}