Getting Started
ScrAPI can be called via a GET or a POST request to:
https://api.scrapi.tech/v1/scrapeThe only required parameter is the url of the website you want to scrape. The simplest possible request looks like this:
https://api.scrapi.tech/v1/scrape?url=http://deventerprise.comClick here to see the raw JSON result.
Recommendation: Use
POSTrequests for production integrations. The JSON request body is more expressive and supports advanced features like browser commands that are not available viaGET.
API Keys
When using the test API key (or no API key) you are limited to one concurrent request and twenty free calls per day with minimal queuing.
If you have purchased a subscription you will have received an email with your API key. You can also retrieve your API key and manage your subscription by logging into the subscriber area.
To authenticate, either add the apiKey parameter to the URL or supply an X-API-KEY header:
# URL parameter (simplest)
https://api.scrapi.tech/v1/scrape?apiKey=01234567-8901-2345-6789-0ABCDEF01234&url=https://example.com
# Header
X-API-KEY: 01234567-8901-2345-6789-0ABCDEF01234OpenAPI Specification
Browse the complete interactive API reference at: https://api.scrapi.tech/scalar/v1#tag/scrape/get/v1scrape
Request Parameters
The API supports the following parameters via URL query string or JSON body:
| Parameter | Type | Description |
|---|---|---|
url | String (URL) | (Required) The URL to scrape. |
useBrowser | Boolean | Use a full headless browser with JavaScript execution. Default: false. |
solveCaptchas | Boolean | Automatically detect and solve captchas. Enables useBrowser automatically. Default: false. |
includeScreenshot | Boolean | Capture a screenshot (PNG) of the final page. Enables useBrowser automatically. Default: false. |
includePdf | Boolean | Generate a PDF of the final page. Enables useBrowser automatically. Default: false. |
includeVideo | Boolean | Record a video (WEBM) of the browser session. Enables useBrowser automatically. Default: false. |
proxyType | String or Number | Proxy type - Free, DataCenter, Residential, Tor, or Custom. |
proxyCountry | String (3) | ISO 3166-1 alpha-3 code for geotargeting. See Available Countries. |
proxyCity | String | City name for fine-grained geotargeting. See Available Cities. |
customProxyUrl | String (URL) | Your own custom proxy URL (protocol://username:password@host:port). |
requestMethod | String | HTTP method - GET (default), POST, PUT, DELETE, HEAD, PATCH. See Request Method. Only available without browser. |
responseFormat | String or Number | Response format - JSON (default), HTML, or Markdown. See Response Formats. |
responseSelector | String | CSS or XPath selector to extract specific content from the page. |
callbackUrl | String (URL) | URL to receive a POST with the response data. See Webhooks. |
cookies | String or Object | Custom cookies as key/value pairs (cookie1=value1;cookie2=value2). |
headers | String or Object | Custom headers as key/value pairs (header1=value1;header2=value2). |
sessionId | String | Session identifier to persist IP, cookies, and user agent across requests. |
acceptDialogs | Boolean | Accept popup dialogs instead of cancelling them. Default: false. |
browserCommands | Array | List of browser commands to execute after page load. POST only. |
Note: Browser commands are only available via the
POSTmethod. Use POST for all advanced features.
Example POST Request
The following JSON body demonstrates all available parameters with their defaults:
{
"url": "https://deventerprise.com",
"useBrowser": false,
"solveCaptchas": false,
"includeScreenshot": false,
"includePdf": false,
"includeVideo": false,
"proxyType": null,
"proxyCountry": null,
"proxyCity": null,
"customProxyUrl": null,
"requestMethod": "GET",
"responseFormat": "JSON",
"responseSelector": null,
"callbackUrl": null,
"cookies": {},
"headers": {},
"sessionId": null,
"acceptDialogs": false,
"browserCommands": []
}JSON Response
The default JSON response includes the scraped content along with metadata about the request. Here is an example showing all possible fields:
{
"requestUrl": "https://www.deventerprise.com",
"responseUrl": "https://deventerprise.com",
"duration": "00:00:01.000000",
"attempts": 1,
"errorMessages": [
"Browser Command Click Timeout - Could not find input target #click_me"
],
"captchasSolved": {
"reCaptchaV2": 1
},
"creditsUsed": 35,
"statusCode": 200,
"cookies": {
"session-id": "12345...",
"timezone": "UTC"
},
"headers": {
"content-encoding": "br",
"content-type": "text/html; charset=utf-8"
},
"content": "<html>...</html>",
"screenshotUrl": "https://scrapi.blob.core.windows.net/[API-KEY]/[FILE].png",
"pdfUrl": "https://scrapi.blob.core.windows.net/[API-KEY]/[FILE].pdf",
"videoUrl": "https://scrapi.blob.core.windows.net/[API-KEY]/[FILE].webm"
}| Field | Description |
|---|---|
requestUrl | The URL you submitted. |
responseUrl | The final URL after any redirects. |
duration | How long the scrape operation took. |
attempts | Number of retry attempts made. |
errorMessages | Any errors encountered (e.g., failed browser commands). |
captchasSolved | Captcha types detected and number of times solved. |
creditsUsed | Total credits consumed by this request. |
statusCode | HTTP status code returned by the target website. |
cookies | Cookies set by the target website. |
headers | Response headers from the target website. |
content | The scraped HTML content (or Markdown if configured). |
screenshotUrl | Temporary URL to download the screenshot PNG. |
pdfUrl | Temporary URL to download the generated PDF. |
videoUrl | Temporary URL to download the recorded WEBM video. |
Response data can also be returned as raw HTML or Markdown instead of JSON for simpler consumption.
What’s Next?
Explore individual features to customize your scraping workflow:
- Real Browser - Render JavaScript-heavy pages.
- Browser Commands - Automate clicks, form fills, and scrolling.
- Captcha Solving - Bypass reCAPTCHA, hCaptcha, and Cloudflare.
- Proxy Options - Rotate IPs to avoid bans.
- Geotargeting - Access region-restricted content.
Or head to the Playground to test any configuration and generate code.