DocumentationAPI DetailsScrape URLGetting Started

Getting Started

ScrAPI can be called via a GET or a POST request to:

https://api.scrapi.tech/v1/scrape

The 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.com

Click here to see the raw JSON result.

Recommendation: Use POST requests for production integrations. The JSON request body is more expressive and supports advanced features like browser commands that are not available via GET.

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-0ABCDEF01234

OpenAPI 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:

ParameterTypeDescription
urlString (URL)(Required) The URL to scrape.
useBrowserBooleanUse a full headless browser with JavaScript execution. Default: false.
solveCaptchasBooleanAutomatically detect and solve captchas. Enables useBrowser automatically. Default: false.
includeScreenshotBooleanCapture a screenshot (PNG) of the final page. Enables useBrowser automatically. Default: false.
includePdfBooleanGenerate a PDF of the final page. Enables useBrowser automatically. Default: false.
includeVideoBooleanRecord a video (WEBM) of the browser session. Enables useBrowser automatically. Default: false.
proxyTypeString or NumberProxy type - Free, DataCenter, Residential, Tor, or Custom.
proxyCountryString (3)ISO 3166-1 alpha-3 code for geotargeting. See Available Countries.
proxyCityStringCity name for fine-grained geotargeting. See Available Cities.
customProxyUrlString (URL)Your own custom proxy URL (protocol://username:password@host:port).
requestMethodStringHTTP method - GET (default), POST, PUT, DELETE, HEAD, PATCH. See Request Method. Only available without browser.
responseFormatString or NumberResponse format - JSON (default), HTML, or Markdown. See Response Formats.
responseSelectorStringCSS or XPath selector to extract specific content from the page.
callbackUrlString (URL)URL to receive a POST with the response data. See Webhooks.
cookiesString or ObjectCustom cookies as key/value pairs (cookie1=value1;cookie2=value2).
headersString or ObjectCustom headers as key/value pairs (header1=value1;header2=value2).
sessionIdStringSession identifier to persist IP, cookies, and user agent across requests.
acceptDialogsBooleanAccept popup dialogs instead of cancelling them. Default: false.
browserCommandsArrayList of browser commands to execute after page load. POST only.

Note: Browser commands are only available via the POST method. 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"
}
FieldDescription
requestUrlThe URL you submitted.
responseUrlThe final URL after any redirects.
durationHow long the scrape operation took.
attemptsNumber of retry attempts made.
errorMessagesAny errors encountered (e.g., failed browser commands).
captchasSolvedCaptcha types detected and number of times solved.
creditsUsedTotal credits consumed by this request.
statusCodeHTTP status code returned by the target website.
cookiesCookies set by the target website.
headersResponse headers from the target website.
contentThe scraped HTML content (or Markdown if configured).
screenshotUrlTemporary URL to download the screenshot PNG.
pdfUrlTemporary URL to download the generated PDF.
videoUrlTemporary 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:

Or head to the Playground to test any configuration and generate code.