### POST /scrape-js - JS Rendering Scraping Source: https://apiroad.net/marketplace/apis/scrapeninja/index_specs The /scrape-js endpoint utilizes a full-fledged real Chrome browser for scraping, enabling JavaScript rendering. ```APIDOC ## POST /scrape-js ### Description This endpoint scrapes websites using a real Chrome browser, supporting JavaScript rendering. Each request costs 7 billing points. ### Method POST ### Endpoint /scrape-js ### Parameters #### Request Body - **url** (string) - Required - The URL of the website to scrape. - **proxy** (object) - Optional - Proxy configuration (same structure as /scrape). - **extractor** (string) - Optional - Specifies a smart extractor to use. ### Request Example ```json { "url": "https://example.com", "extractor": "markdown" } ``` ### Response #### Success Response (200) - **content** (string) - The scraped content of the webpage, rendered with JavaScript. - **title** (string) - The title of the scraped page. #### Response Example ```json { "content": "
...
", "title": "Example Domain" } ``` ``` -------------------------------- ### POST /scrape - Non-JS Scraping Source: https://apiroad.net/marketplace/apis/scrapeninja/index_specs The /scrape endpoint uses a lightweight cURL-like engine with Chrome TLS fingerprints for non-JavaScript rendering. ```APIDOC ## POST /scrape ### Description This endpoint performs web scraping using a lightweight cURL-like engine suitable for pages that do not rely heavily on JavaScript rendering. ### Method POST ### Endpoint /scrape ### Parameters #### Request Body - **url** (string) - Required - The URL of the website to scrape. - **proxy** (object) - Optional - Proxy configuration. - **type** (string) - Required - Type of proxy (e.g., "http", "https"). - **host** (string) - Required - Proxy server hostname. - **port** (integer) - Required - Proxy server port. - **username** (string) - Optional - Proxy username for authentication. - **password** (string) - Optional - Proxy password for authentication. - **extractor** (string) - Optional - Specifies a smart extractor to use (e.g., "markdown"). ### Request Example ```json { "url": "https://example.com", "proxy": { "type": "http", "host": "your_proxy.com", "port": 8080, "username": "proxy_user", "password": "proxy_pass" }, "extractor": "markdown" } ``` ### Response #### Success Response (200) - **content** (string) - The scraped content of the webpage. - **title** (string) - The title of the scraped page. #### Response Example ```json { "content": "

Example Domain

...", "title": "Example Domain" } ``` ``` -------------------------------- ### POST /v2/scrape-js - Optimized JS Rendering Scraping Source: https://apiroad.net/marketplace/apis/scrapeninja/index_specs The /v2/scrape-js endpoint is an optimized version of the real Chrome browser scraper, with improved success rates for pages protected by Cloudflare turnstile captcha and PerimeterX. ```APIDOC ## POST /v2/scrape-js ### Description This is an optimized version of the JavaScript rendering scraper, designed for better performance and success rates on challenging websites, especially those protected by advanced bot detection. ### Method POST ### Endpoint /v2/scrape-js ### Parameters #### Request Body - **url** (string) - Required - The URL of the website to scrape. - **proxy** (object) - Optional - Proxy configuration (same structure as /scrape). - **extractor** (string) - Optional - Specifies a smart extractor to use. ### Request Example ```json { "url": "https://example.com", "extractor": "markdown" } ``` ### Response #### Success Response (200) - **content** (string) - The scraped content of the webpage, rendered with JavaScript. - **title** (string) - The title of the scraped page. #### Response Example ```json { "content": "
...
", "title": "Example Domain" } ``` ``` -------------------------------- ### ScrapeNinja API Endpoints Source: https://apiroad.net/marketplace/apis/scrapeninja/index This section details the available endpoints for the ScrapeNinja API, including options for non-JS scraping, JS rendering, and an optimized JS rendering version. ```APIDOC ## POST /scrape ### Description This endpoint performs non-JS scraping, utilizing a lightweight cURL-like engine with Chrome TLS fingerprints. ### Method POST ### Endpoint /scrape ### Parameters #### Query Parameters - **url** (string) - Required - The URL of the website to scrape. - **render_engine** (string) - Optional - Specifies the rendering engine to use. Defaults to 'curl'. ### Request Body (No specific request body documented, typically parameters are passed as query parameters or in headers) ### Request Example ```bash curl -X POST "https://scrapeninja.apiroad.net/scrape?url=https://example.com" \ -H "x-apiroad-key: YOUR_API_TOKEN" ``` ### Response #### Success Response (200) - **content** (string) - The HTML content of the scraped page. - **status** (string) - The status of the scraping request. #### Response Example ```json { "content": "...", "status": "success" } ``` --- ## POST /scrape-js ### Description This endpoint scrapes websites with JavaScript rendering enabled, using a full-fledged real Chrome browser. ### Method POST ### Endpoint /scrape-js ### Parameters #### Query Parameters - **url** (string) - Required - The URL of the website to scrape. - **render_engine** (string) - Optional - Specifies the rendering engine to use. Defaults to 'scrape-js'. ### Request Body (No specific request body documented, typically parameters are passed as query parameters or in headers) ### Request Example ```bash curl -X POST "https://scrapeninja.apiroad.net/scrape-js?url=https://example.com" \ -H "x-apiroad-key: YOUR_API_TOKEN" ``` ### Response #### Success Response (200) - **content** (string) - The rendered HTML content of the scraped page. - **status** (string) - The status of the scraping request. #### Response Example ```json { "content": "...", "status": "success" } ``` --- ## POST /v2/scrape-js ### Description This is an optimized version of the JS rendering endpoint, designed for better success rates on pages protected by Cloudflare turnstile captcha and PerimeterX. ### Method POST ### Endpoint /v2/scrape-js ### Parameters #### Query Parameters - **url** (string) - Required - The URL of the website to scrape. - **render_engine** (string) - Optional - Specifies the rendering engine to use. Defaults to 'v2/scrape-js'. ### Request Body (No specific request body documented, typically parameters are passed as query parameters or in headers) ### Request Example ```bash curl -X POST "https://scrapeninja.apiroad.net/v2/scrape-js?url=https://example.com" \ -H "x-apiroad-key: YOUR_API_TOKEN" ``` ### Response #### Success Response (200) - **content** (string) - The rendered HTML content of the scraped page. - **status** (string) - The status of the scraping request. #### Response Example ```json { "content": "...", "status": "success" } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.