Skip to main content

/scrape: non-JS scraping

POST 

/scrape

Use high-performance web scraping endpoint with Chrome browser TLS fingerprint, but without JavaScript execution and real browser overhead.

Request

Body

required
    url stringrequired

    URL to scrape

    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

    Default value: us

    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

    proxy string

    Premium or your own proxy URL (overrides geo field). Read more about ScrapeNinja proxy setup

    followRedirects integer

    Default value: 1

    Follow redirects.

    timeout integer

    Default value: 10

    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[]

    Default value: 403,502

    HTTP response statuses which will trigger a retry from another proxy address.

    extractor string

    Custom JS function to extract JSON values from scraped HTML. Write&test your own extractor on https://scrapeninja.net/cheerio-sandbox/

Responses

OK

Schema
    info object
    statusCode integerrequired
    finalUrl stringrequired
    headers string[]required
    body string

    HTML body of the rendered page.

Loading...