Introduction to the Scraper API
The ZenRows® Scraper API is a versatile tool designed to simplify and enhance the process of extracting data from websites. Whether you’re dealing with static or dynamic content, our API provides a range of features to meet your scraping needs efficiently.
With Premium Proxies, ZenRows gives you access to over 55 million residential IPs from 190+ countries, ensuring 99.9% uptime and highly reliable scraping sessions. Our system also handles advanced fingerprinting, header rotation, and IP management, enabling you to scrape even the most protected sites without needing to manually configure these elements.
ZenRows makes it easy to bypass complex anti-bot measures, handle JavaScript-heavy sites, and interact with web elements dynamically — all with the right features enabled.
Key Features
-
JavaScript Render: Render JavaScript on web pages using a headless browser to scrape dynamic content that traditional methods might miss.
- Wait times and selectors: Specify wait times and CSS selectors to ensure elements are fully loaded before scraping.
- Resource blocking: Block unnecessary resources from loading to speed up scraping.
- JSON response formatting: Receive responses in JSON format, including XHR or Fetch requests.
- CSS-based data extraction: Extract data using CSS selectors with our CSS extractor feature.
- Auto-parsing: Automatically parse and extract relevant data from the scraped HTML.
- Screenshot capabilities: Capture screenshots of the target page, including full-page and specific element screenshots.
- Various outputs: Lets you specify which data types to extract from the scraped HTML.
- JavaScript Instructions: Allowing you to interact with web pages dynamically.
-
Premium Proxies: Leverage a vast network of over 55 million residential IPs across 190+ countries, ensuring a 99.9% uptime for uninterrupted scraping.
- Geolocation selection: Choose the geographical location of the IP address used for the request (for Premium Proxies).
-
Custom Headers: Add custom HTTP headers to your requests for more control.
-
Session management: Use a session ID to maintain the same IP address across multiple requests for up to 10 minutes.
-
Cloudflare bypass: The API is designed to overcome Cloudflare protection, making it easier to scrape protected websites.
-
Language agnostic: While Python examples are provided, the API works with any programming language that can make HTTP requests.
The Scraper API is particularly useful for extracting data from dynamic websites and handling complex scenarios like JavaScript content and web element interactions, without the need to manage proxies or handle dynamic user interactions manually.
Parameter Overview
Customize your scraping requests using the following parameters:
PARAMETER | TYPE | DEFAULT | DESCRIPTION |
---|---|---|---|
apikey required | string | Get Your Free API Key | Your unique API key for authentication |
url required | string | The URL of the page you want to scrape | |
js_render | boolean | false | Enable JavaScript rendering with a headless browser |
js_instructions | string | Allows you to interact with the web page dynamically | |
custom_headers | boolean | false | Include custom headers in your request |
premium_proxy | boolean | false | Use premium proxies to make the request harder to detect |
proxy_country | string | Geolocation of the IP used to make the request. Only for Premium Proxies | |
session_id | integer | Assign a session ID to maintain the same IP for multiple requests for up to 10 minutes | |
original_status | boolean | false | Return the original HTTP status code from the target page |
allowed_status_codes | string | Returns the content of the target page even if it fails with a status code on the provided list | |
wait_for | string | Wait for a given CSS Selector to load in the DOM before returning the content | |
wait | integer | 0 | Wait a fixed amount of time before returning the content |
block_resources | string | Block specific resources from loading | |
json_response | string | false | Obtain the response in JSON format, including data from XHR or Fetch requests |
css_extractor | string (JSON) | Define CSS Selectors to extract data from the HTML. | |
autoparse | boolean | false | Use our auto parser algorithm to automatically extract data. |
response_type | string | Get the content parsed as Markdown, Plaintext or PDF instead of HTML | |
screenshot | boolean | false | Returns an above-the-fold screenshot of the target page. |
screenshot_fullpage | boolean | false | Returns a full-page screenshot of the target page. |
screenshot_selector | string | Returns a screenshot of a specific CSS Selector of the target page. | |
screenshot_format | string | Choose between png and jpeg formats, with PNG being the default | |
screenshot_quality | integer | Applicable when using JPEG, this parameter allows you to set the quality from 1 to 100 | |
outputs | string | Lets you specify which data types to extract from the scraped HTML |
Pricing
ZenRows® provides flexible plans tailored to different web scraping needs, starting from $69 per month. This entry-level plan allows you to scrape up to 250,000 URLs using basic requests. For more demanding needs, our Enterprise plans scale up to 38 million URLs or more.
For complex or highly protected websites, enabling advanced features like JavaScript rendering (js_render
) and Premium Proxies unlocks ZenRows’ full potential, ensuring the best success rate possible.
However, they come at a higher request cost — requests using both js_render
and premium_proxy
are billed at 25 times the basic request rate.
Was this page helpful?