---
title: "/v2/scrape-js: scraping with JS rendering, new engine"
method: POST
path: "/v2/scrape-js"
---

# /v2/scrape-js: scraping with JS rendering, new engine

`POST /v2/scrape-js`

Launches real Chrome browser engine, better success rate for websites protected by Cloudflare, Datadome, Kasada, PermimeterX. ATTENTION: Only available <a href='https://scrapeninja.net/docs/getting-started/#subscription-via-apiroad-recommended-way'>via APIRoad!</a>

## Request body

- object
  - `url` string, required — URL to scrape
  - `waitForSelector` string — CSS selector to wait to appear in DOM tree before page is considered as loaded.
  - `postWaitTime` integer — Wait for specified amount of seconds after page load (from 1 to 12s). Use this only if ScrapeNinja failed to wait for required page elements automatically.
  - `headers` string[] — Custom headers to send with the request. By default, regular Chrome browser headers are sent to the target URL.
  - `retryNum` integer — Amount of attempts.
  - `geo` string — Geo location for basic proxy pools (you can purchase premium ScrapeNinja proxies for wider country selection and higher proxy quality). [Read more about ScrapeNinja proxy setup](https://scrapeninja.net/docs/proxy-setup/)
  - `proxy` string — Premium or your own proxy URL (overrides `geo` field). [Read more about ScrapeNinja proxy setup](https://scrapeninja.net/docs/proxy-setup/)
  - `timeout` integer — Timeout per attempt, in seconds. Each retry will take [timeout] number of seconds.
  - `textNotExpected` string[] — Text which will trigger a retry from another proxy address.
  - `statusNotExpected` integer[] — HTTP response statuses which will trigger a retry from another proxy address.
  - `blockImages` boolean — Block images from loading. This will speed up page loading and reduce bandwidth usage.
  - `blockMedia` boolean — Block (CSS, fonts) from loading. This will speed up page loading and reduce bandwidth usage.
  - `screenshot` boolean — Take a screenshot of the page. Pass "false" to increase the speed of the request.
  - `extractor` string — Custom JS function to extract JSON values from scraped HTML. Write&test your own extractor on https://scrapeninja.net/cheerio-sandbox/

## Response `200`

OK

- object
  - `info` object
    - `statusCode` integer, required
    - `finalUrl` string, required
    - `catchedAjax` object
      - `url` string
      - `method` string
      - `headers` string[] — Array of request headers
      - `body` string
      - `bodyIframe` string — If `dumpIframe` is activated, this property contains iframe HTML.
      - `status` integer
      - `responseHeaders` object — Object with response headers
    - `headers` string[], required
  - `body` string — HTML body of the rendered page.

---

[API](https://skmtc.net/scrapeninja/apis/scrapeninja-web-scraping-api.md) · [All operations](https://skmtc.net/scrapeninja/apis/scrapeninja-web-scraping-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/scrapeninja/scrapeninja-web-scraping-api/versions/2c9c9b7cadd0/schema)
