YepAPI
Web Scraping

JavaScript Scrape

Scrape JavaScript-rendered pages with a full headless browser.

POST/v1/scrape/js
$0.02/call

Usage

const res = await fetch('https://api.yepapi.com/v1/scrape/js', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ url: 'https://react.dev', format: 'markdown' }),
});
const { data } = await res.json();
console.log(data.content);
curl -X POST https://api.yepapi.com/v1/scrape/js \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://react.dev", "format": "markdown"}'

Request Body

ParameterTypeRequiredDescriptionDefault
urlstringYesURL to scrape
formatstringNoOutput format: markdown, html, text"markdown"
waitFornumberNoWait for JS to render (ms)0
selectorstringNoCSS selector to extract specific element

Response

{
  "ok": true,
  "data": {
    "url": "https://react.dev",
    "statusCode": 200,
    "content": "# React\n\nThe library for web and native user interfaces...",
    "format": "markdown"
  }
}

Response Fields

FieldTypeDescription
okbooleanWhether the request succeeded
dataobjectResponse payload
data.urlstringThe URL that was scraped
data.statusCodenumberHTTP status code returned by the target page
data.contentstringPage content in the requested format (Markdown, HTML, or plain text)
data.formatstringThe output format used (markdown, html, or text)
Under the Hood

Uses a full headless Chrome browser with JavaScript execution enabled. Ideal for SPAs built with React, Vue, Angular, or any framework that renders content client-side.

On this page