JavaScript Scraper

Web scraping in JavaScript and Node.js, in one call

A JavaScript web scraper API: send a URL, get the page back. JavaScript-rendered pages come back as clean markdown, HTML or links. No Puppeteer, no proxies, no retries to maintain. You only pay for pages that succeed.

https://
  • ✓ No credit card to try
  • ✓ Failed pages are free
  • ✓ Works in serverless
scrape.js

result.markdown

waiting

The page is rendered in a real browser, then converted to markdown.

one request → rendered page → clean markdown

Trusted by 1,000+ developers building AI products and data pipelines

  • AIFlowChat
  • ControlHippo
  • UnicapAI
  • UsefulAI
  • WorkMatteAI
  • GrugNotes
  • Gambly

The problem

Web scraping with Node.js: why fetch + cheerio breaks on JavaScript sites

fetch() returns an empty shell

Single-page apps draw their content with JavaScript. An HTTP request gets a <div id="root"> and nothing else.

Puppeteer is a second job

Browser versions, memory leaks, crashed pages and serverless size limits. The scraper works on Monday and breaks by Friday.

Sites block bots

Rate limits, captchas and blocked IPs mean proxies and retries. That work never ends.

The difference

Scraping JavaScript-rendered pages: fetch vs headless browser

A plain request gets the HTML the server sent. The scraper API gets what a visitor sees after the JavaScript has run.

fetch() + cheerio

0 products
<!doctype html>
<html>
  <head><title>Acme Store</title></head>
  <body>
    <div id="root"></div>
    <script src="/static/app.4f9a.js"></script>
  </body>
</html>

The products are drawn by JavaScript after load. A plain HTTP request never sees them.

client.scrape()

24 products
# Acme Store: Products

## Trail Runner X — $129
Lightweight shoe, 24 sizes in stock.

## Summit Jacket — $249
Waterproof shell, packs into its pocket.

…22 more products

Same URL, rendered in a real browser first. You get the content a visitor sees.

How it works

How the JavaScript scraper works: one call, one page

  1. 1. Send a URL

    Call client.scrape() or POST /v2/scrape with a url and the output_formats you want.
  2. 2. We render it

    The page loads in a real browser. Retries, proxies and anti-bot handling run on our side.
  3. 3. Get the content back

    The response has markdown, raw_content or links. No job to poll. Need async? Read about async requests.

Shape the output

Change the settings and watch the Node.js code update.

output_formats

respect_robots_txt

One request, one response. No job to poll. You pay only when the page scrapes successfully.

Your Node.js code

import webcrawlerapi from "webcrawlerapi-js";

const client = new webcrawlerapi.WebcrawlerClient("YOUR_API_KEY");

const result = await client.scrape({
    url: "https://shop.acme.com/products",
    output_formats: ["markdown"],
});

console.log(result.markdown);
ParamWhat it does
urlThe page to scrape. Required.
output_formatsAny of markdown, html, links, images. Default markdown.
clean_selectorsCSS selectors to remove from the output.
respect_robots_txtReturn an error if robots.txt disallows the URL. Default false.
promptAsk for specific fields. Returns structured_data. Billed per token.

Full reference in the POST /scrape docs.

Code

How to scrape a website with Node.js (code example)

import webcrawlerapi from "webcrawlerapi-js";

const client = new webcrawlerapi.WebcrawlerClient("YOUR_API_KEY");

const result = await client.scrape({
    url: "https://shop.acme.com/products",
    output_formats: ["markdown", "links"],
});

console.log(result.markdown);

The response

{
  "success": true,
  "status": "done",
  "markdown": "# Acme Store: Products\n\n## Trail Runner X — $129 ...",
  "links": [
    "https://shop.acme.com/products/trail-runner-x",
    "https://shop.acme.com/products/summit-jacket"
  ],
  "page_status_code": 200,
  "page_title": "Acme Store: Products"
}

Works in TypeScript too: webcrawlerapi-js ships its own types. See the JavaScript SDK docs. Also available for __SDK__.

Formats

Output formats for every scraped page

markdown

Default. Headings, links and lists kept. Best for LLM context and search indexes.

html

The final HTML after JavaScript ran. Feed it to cheerio or your own parser.

links

Every link found on the page, for building URL lists.

images

The image URLs found on the page, for catalogs, media audits and downloads.

Need fields and not text? Add a prompt and get structured data back.

Use cases

What developers build with the JavaScript scraper

Price and product monitoring

Before: prices load after the page does, so your parser sees nothing.

After: scrape the rendered page, or ask for name and price fields directly.

prompt + response_schema

Context for AI agents

Before: your agent gets menus and cookie banners instead of the answer.

After: hand it clean markdown of exactly the page it asked for.

output_formats: ["markdown"]

Product catalogs and media

Before: every site needs its own selectors for text and images.

After: one call returns the markdown and every image URL on the page.

output_formats: ["markdown", "images"]

SEO and competitor checks

Before: a headless browser farm just to read titles and links.

After: get HTML and links for any page from a serverless function.

output_formats: ["html", "links"]

By the numbers

Reliable infrastructure, proven in production.

Tracking usage, crawl success rates, average response times, uptime percentages, quality scores, cost metrics, API performance, reliability data, and live trends for all your requests.

Active builders

100+

Teams building in production

Extraction quality

98%

Success rate

Fast turnaround

2.5s

Average crawling time

Platform stability

99.98%

Uptime

Which one

Puppeteer alternative: WebCrawlerAPI vs Puppeteer vs Cheerio

WebCrawlerAPIPuppeteer / Playwrightfetch + cheerio
Renders JavaScriptYesYesNo
Setupnpm install, one API keyInstall browsers, manage versionsnpm install
Runs in serverlessYes, it is just an HTTP callHard, large binariesYes
Proxies and retriesHandled for youYou build themYou build them
Cost modelPer successful pageServers and your timeServers and your time

Need a whole site and not one page? Crawl a whole site with the JavaScript web crawler or the crawl API. Using Python? See the Python web scraper. Comparing providers? Read all crawler APIs compared.

Built for sites that fight back

Handled automatically
Residential proxies
Automatic retries
Rate limit handling
Real headless browsers
JavaScript rendering
CAPTCHA solving
Anti-bot bypass
Fastest path selection

Skip browser maintenance. See rate limits.

Pricing

Simple, transparent pricing

Start with pay-per-request, or save with a monthly subscription. Top-up credits are always available when your included allowance runs out.

Pay as you go

No monthly commitment — pay only for what you use

$0/month

Starter

Great for small projects

$29/month

Professional

Best for growing teams

Save 25%

$99/month

Business

For high-volume crawling

Save 50%

$499/month

Need a custom quota or special pricing? Contact us and we'll set up a plan that fits your needs.

JavaScript Scraper FAQ

Common questions about scraping websites from Node.js

What is a JavaScript scraper API?

A JavaScript scraper API loads a page in a real browser, waits for the JavaScript to run, and returns the final content. With WebCrawlerAPI that is one POST /v2/scrape request, or one client.scrape() call in Node.js.

Can it scrape JavaScript-rendered pages, like React or Next.js sites?

Yes. The page is rendered in a real browser before the content is extracted, so content that a plain fetch() never sees (client-rendered lists, lazy-loaded sections) is part of the result.

Do I need Puppeteer or Playwright?

No. You send a URL and get the content back. Browsers, retries, proxies and anti-bot handling run on our side, so there is nothing to install, patch or scale.

How do I scrape a website with Node.js?

Install webcrawlerapi-js, create a WebcrawlerClient with your API key, and call client.scrape({ url, output_formats: ["markdown"] }). The result has a markdown field. You can also call the REST endpoint with fetch() on Node 18 or later.

Which output formats can I get?

Set output_formats to any of markdown, html, links and images. Add a prompt to get structured data back.

Is the scrape synchronous?

Yes. client.scrape() waits and returns the result in the same call. For long-running work use scrapeAsync() and getScrape() to poll by id.

How much does scraping cost?

You pay per successful page: $0.002 on Starter, $0.0015 on Professional and $0.001 on Business. Failed requests are not charged. Some sites are priced separately, see the pricing docs.

Can I scrape many pages, or a whole site?

Scrape is for a URL you already know. To discover and fetch many pages from one seed URL, use the crawl API.

Does the scraper respect robots.txt?

Only if you set respect_robots_txt to true. The default is false. If the URL is disallowed, you get an error back.

Can I try it before paying?

Yes. Use the playground on this page or sign up in the dashboard. No credit card required.

Scrape your first page in five minutes

Get an API key, run the Node.js snippet above, and read the rendered page as markdown. Or try it in the playground.

Get your API key