Web Scraper API - JavaScript Rendering, Proxy Rotation & CAPTCHA Solving
The data you need is behind JavaScript, IP bans, and CAPTCHA walls - and the scraper you built last quarter breaks every time the target site changes. The Web Scraper API extracts data from any static or dynamic website through one REST request, rendering pages in a real browser, rotating proxies automatically, and solving CAPTCHAs mid-workflow. You get back the full page, cleaned text, or exactly the elements you select. It's a web scraping API built for data engineers running extraction pipelines, growth teams monitoring competitor pricing, and developers aggregating listings at scale. Start with 10,000 free credits, no credit card required - and pay only for requests that succeed.
Features
Full JavaScript Rendering
Set jsEnabled=true and the API loads the page in a real browser, executing scripts before extraction so content that only appears after rendering is captured. Control the viewport with windowSize for layouts that shift by resolution.
Use it as a JavaScript rendering API for single-page applications, infinite-scroll feeds, and any site where curl returns an empty shell.
Browser Automation Instructions
The instructions array scripts the session step by step: fill inputs, click elements by XPath or CSS selector, waitFor elements to appear, select dropdown options, run custom JavaScript with jsExe, and branch on page state with conditionalCheck. Multi-tab and iframe steps - newTab, moveToRelativeTab, switchToIframe - reach data that single-page scrapers can't.
Use it as an API for web scraping interactive, click-driven sites.
Smart Proxy Rotation
Set proxy=true and requests are distributed across rotating IP addresses automatically - no proxy fleet to buy, configure, or monitor. Rotation reduces bans and rate-limit blocks on sites that throttle repeat visitors.
Use it for scheduled scraping jobs that hit the same targets daily.
Image & Audio CAPTCHA Solving
Enable captcha=true and add generalImageCaptcha or resolveAudioCaptcha steps to solve challenges inside the workflow instead of failing on them. fillImageCaptcha captures and submits the solution automatically.
Use it as a captcha solving API layer for protected forms and lookup portals.
Selector-Based Data Extraction
The extract instruction takes CSS selectors or XPath expressions and returns only the nodes you name - as HTML or plain text - inside the extractedData response object. Skip the parsing layer and feed structured output straight into your pipeline.
This is a web data extraction API scoped to exactly the fields you need.
Static-Mode Scraping
For server-rendered pages, leave jsEnabled=false: fetch with getPage, submit forms with getForm or postForm, and extract - at a fraction of the cost of rendered sessions. The text=true parameter returns cleaned text instead of raw HTML.
Use it for high-volume scraping of pages that don't need a browser.
Session & Load Control
Set authenticated sessions with the cookies array, block ad and tracker scripts with adBlock=true, skip specific resources with blockUrl, and ignore broken certificates with sslIgnore for misconfigured HTTPS targets. Pages load faster and extracted content stays clean.
Use it to scrape logged-in views and slow, ad-heavy pages reliably.
Built for These Use Cases
Competitor price monitoring
Schedule a request set against competitor product pages after each pricing cycle, extract the price and availability elements, and diff against the previous run. A website scraper API with rendering support captures prices injected by scripts, not just what's in the server HTML.
Listing aggregation
Pull real estate, job board, or marketplace listings from paginated, script-heavy portals into one normalized dataset. Automation steps handle the search form, the results page, and the pagination clicks in a single scraping API call.
Lead dataset building
Extract company names, roles, and contact details from directory sites, then pass the collected addresses to the Email Checker API before they enter your CRM - scraped contact data is only worth what deliverability makes of it.
Login-protected exports
Supply session cookies or script the login form, then extract the account-side tables and reports your team currently copies by hand. Works for supplier portals, dashboards, and members-only catalogs.
Content change monitoring
Poll key pages on a schedule and extract the sections that matter; when text changes, capture visual evidence with the Website Screenshot API for an archived, timestamped record.
API Endpoint
How-To-Guides
Static Data Extraction
Most scraping jobs don't need a browser - they need the right rows out of a server-rendered page, fast and cheap. Run the call with jsEnabled=false, keep the instructions array empty to pull the full page, or add an extract step to return only the table or block you're after. Start every new target here and escalate to rendering only when the response comes back empty.
curl -X 'POST' \
'https://api.apifreaks.com/v1.0/scraping?url=https://www.pknic.net.pk/&text=true&apiKey=API-KEY' \
-H 'Content-Type: application/json' \
-d '{
"instructions": [
{
"postForm": {
"selector": "//*[@id='xpromo']/div[2]/div[1]/div/div/form",
"data": {
"name": "nust.edu.pk"
}
}
},
{
"extract": {
"domain name": "div > table > tbody > tr:nth-child(1) > th:nth-child(4) > div",
"status": "div > table > tbody > tr:nth-child(3) > td:nth-child(4) > strong",
"create date": "//*[@id='Tmain']/table/tbody/tr/td/div/xpc_domain_not_available/div/table/tbody/tr[4]/td[4]/span",
"expiry date": "div > table > tbody > tr:nth-child(5) > td:nth-child(4)",
"server": [
"div > table > tbody > tr:nth-child(8) > td:nth-child(4)",
"div > table > tbody > tr:nth-child(9) > td:nth-child(4)",
"div > table > tbody > tr:nth-child(10) > td:nth-child(4)",
"div > table > tbody > tr:nth-child(11) > td:nth-child(4)"
]
}
}
]
}'
# Response
{
"extractedData": {
"server": [
"coleman.ns.cloudflare.com",
"nadia.ns.cloudflare.com",
"",
""
],
"domain name": "nust.edu.pk",
"expiry date": "Feb 1, 2026",
"status": "Domain is Registered"
}
}
Extracting Data with Multi-Step Automation for Dynamic Sites (jsEnabled: true)
Some data doesn't exist until you ask the page for it - a WHOIS result, a search listing, a quote behind a form. Chain fill, click, wait, and extract steps with jsEnabled=true to script the exact path a person would take, then capture the element that appears at the end. The documented example fills a domain search form and extracts the registration result it triggers.
curl -X 'POST' \
'https://api.apifreaks.com/v1.0/scraping?url=https://svnet.sv/&text=true&jsEnabled=true&apiKey=API-KEY' \
-H 'Content-Type: application/json' \
-d '{
"instructions": [
{
"fill": {
"place": "//*[@id='nombre']",
"value": "google"
}
},
{
"click": "//*[@id='page']/div/div/section[1]/div/div/div/div[2]/div/div/form/div[2]/button"
},
{
"clickButtonByValue": {
"place": ".col-6:nth-child(2) > .col-12",
"value": "google.sv "
}
},
{
"wait": 1000
},
{
"extract": {
"html": "//*[@id='DivResultado']/div"
}
}
]
}'
# Response
{
"extractedData": {
"html": "El nombre de dominio: google.sv se encuentra RegistradoNombre de dominio: google.svEstado: RegistradoContacto Administrativo: Cesar Ulises Trujillo MartínezCorreo Electrónico: admin@admindotsv.comTeléfono: 503 2284-8531Fecha Registro: 01-01-2013Fecha de vencimiento: 01-01-2026Fecha de Baja: 01-02-2026"
}
}
Using Proxy for Seamless Data Extraction
When a daily job starts returning 429s, the target has learned your IP - not your schedule. Add proxy=true and each request routes through a rotating address, spreading the footprint so recurring extractions keep succeeding without you managing a proxy pool.
curl -X 'POST' \
'https://api.apifreaks.com/v1.0/scraping?url=https://www.nic.co.de/whois&jsEnabled=true&proxy=true&text=false&apiKey=API-KEY' \
-H 'Content-Type: application/json' \
-d '{
"instructions" : [
{ "fill" : { "place" : "/html/body/div/main/section/div[1]/form/input[2]", "value" : "ujuzi.co.de"}},
{ "click" : "/html/body/div/main/section/div[1]/form/button"},
{ "wait": 1000 },
{ "extract" : {
"html" : "/html/body/div/main/section/div[1]/div"
}
}
]
}'
# Response
{
"extractedData": {
"html": "
<h3 class="text-lg font-bold mb-4">Ergebnisse für <span class="text-blue-600">ujuzi.co.de</span>
</h3>
<div class="text-sm font-mono leading-relaxed space-y-1">
<div class="text-gray-600"></div>
<div>
<span class="text-blue-600 font-semibold">Domain Name:</span>
<span class="text-gray-800">ujuzi.co.de</span>
</div>
<div>
<span class="text-blue-600 font-semibold">Registry Domain ID:</span>
<span class="text-gray-800">D0000000366-SUBD</span>
</div>
<div>
<span class="text-blue-600 font-semibold">Registrar URL:</span>
<span class="text-gray-800">https://www.101domain.com/</span>
</div>
<div>
<span class="text-blue-600 font-semibold">Creation Date:</span>
<span class="text-gray-800">2025-06-24T09:57:44Z</span>
</div>
<div>
<span class="text-blue-600 font-semibold">Registry Expiry Date:</span>
<span class="text-gray-800">2026-10-13T00:00:00Z</span>
</div>
<div>
<span class="text-blue-600 font-semibold">Registrar:</span>
Handling SSL Issues for Reliable Scraping
Expired or self-signed certificates kill scrapes on targets you don't control - government portals and legacy sites are frequent offenders. Set sslIgnore=true (with jsEnabled=true) to proceed past certificate validation errors and extract the data anyway, instead of losing the run to a handshake failure.
curl -X 'POST' \
'https://api.apifreaks.com/v1.0/scraping?url=https://rdap.nic.gs/resource?keyword=google.gs&type=domains&jsEnabled=true&sslIgnore=true&text=false&apiKey=API-KEY' \
-H 'Content-Type: application/json' \
-d '{
"instructions": [
{
"wait": 1500
},
{
"extract": {
"html": "//*[@id='rdap-resource-container']/div/div/div"
}
}
]
}'
# Response
{
"extractedData": {
"html": "<button class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium css-1t978ku" tabindex="0" type="button" id="rdap-back-to-search-results-button"><svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-vubbuv" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="ArrowBackIcon"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"></path></svg><span class="MuiTouchRipple-root css-w0pj6f"></span></button>"
}
}
Automated CAPTCHA Handling for Data Scraping
A CAPTCHA mid-run shouldn't mean a human mid-pipeline. Enable captcha=true and add generalImageCaptcha or resolveAudioCaptcha steps where the challenge appears; the API solves it and continues to your extract step, keeping unattended scheduled jobs unattended.
curl -X 'POST' \
'https://api.apifreaks.com/v1.0/scraping?url=https://whois.nic.shop/&jsEnabled=true&text=false&captcha=true&apiKey=API-KEY' \
-H 'Content-Type: application/json' \
-d '{
"instructions": [
{
"generalImageCaptcha": [
{
"fill": {
"place": "/html/body/div[1]/div[2]/form/div/dl/dd[1]/input",
"value": "google.shop"
}
},
{
"wait": 2000
},
{
"captchaImage": {
"imagePath": "/html/body/div[1]/div[2]/form/div/dl/dd[3]/p/img",
"textField": "/html/body/div[1]/div[2]/form/div/dl/dd[4]/p/input",
"imageUpdatePath": "//*[@id='captcha-area']/a/img",
"captchaFailedPath": "//*[@id='main']/p",
"model": "mini-ocr-v1"
}
},
{
"click": "/html/body/div[1]/div[2]/form/div/dl/dd[5]/input"
}
]
},
{
"extract": {
"html": "/html/body"
}
}
]
}'
# Response
{
"extractedData": {
"html": "
<div class="wrapper">
<div id="header" class="clearfix">
<p class="logo"><img src="img/shop/newlogo.jpg" alt=".shop"></p> <p class="registry"><img src="img/common/gmoregistry_logo.gif" alt="GMO Registry, Inc."></p>
<p class="login"><a href="mailto:support@gmoregistry.com?subject=SearchWhois Inquiry">Searchable Whois</a></p></div>
<!-- /#header -->
<hr> <div id="contents">
<h1>WHOIS Search</h1>
<form id="captcha-form" method="post" action="/whois.php" autocomplete="off">
<div id="main"><p class="result">Domain Name: GOOGLE.SHOP
<br>Registry Domain ID: DO467551-GMO
<br>Registrar WHOIS Server: whois.markmonitor.com
<br>Registrar URL: http://www.markmonitor.com
<br>Updated Date: 2025-12-22T13:42:25.0Z
<br>Creation Date: 2016-09-01T05:35:56.0Z
<br>Registry Expiry Date: 2026-09-01T23:59:59.0Z
<br>Registrar: MarkMonitor Inc.
<br>Registrar IANA ID: 292
<br>Registrar Abuse Contact Email: abusecomplaints@markmonitor.com
FAQs
extractedData object. With an empty instructions array you get the full page - raw HTML, or cleaned text when text=true. With extract steps defined, extractedData contains only the HTML or text of the nodes matched by your CSS selectors or XPath expressions.jsEnabled=false) fetches the server-rendered document - fast, low-cost, and sufficient for most content sites. JS-enabled mode loads the page in a real browser, executes scripts, and unlocks the full instructions set: clicks, form fills, waits, tabs, and iframes. Rendered requests cost more credits than static ones; start static and escalate.instructions array runs ordered actions - fill, click, enter, select, waitFor, jsExe, and conditionalCheck among them - before the extract step executes. This is how you scrape search results, quote engines, and any content that only exists after user input.captcha=true as a query parameter, then place generalImageCaptcha or resolveAudioCaptcha steps in your instructions where the challenge appears. The API solves image and audio challenges in-flow and continues the workflow. If solving fails after retries, the request returns a CAPTCHA error and, like all failed requests, is not charged.cookies array to reuse an authenticated session, or script the login itself - getForm/postForm in static mode, or fill and click steps in JS-enabled mode - then extract from the pages behind it.Pricing
To use the Web Scraper API, you will need API credits. We only charge for successful queries, defined by a 2xx status code. If your request results in a 4xx or 5xx status code, no credits will be charged, and any deducted credits will be returned.
| Service | Credits |
|---|---|
| JS Disabled | 4 credits per successful request |
| JS Enabled | 40 credits per successful request |
| JS enable with captcha resolution | 80 credits per successful request |
Utilize the Credits Usage API to efficiently monitor your recent consumption of both one-off and subscription credits. This API provides a streamlined way to track and manage your credit usage, ensuring you stay informed about your remaining balance and can optimize your resource allocation effectively.