YepAPI
Web Scraping

AI Extraction

Extract structured data from any webpage using AI — no selectors needed.

POST/v1/scrape/ai-extract
$0.03/call

Usage

const res = await fetch('https://api.yepapi.com/v1/scrape/ai-extract', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    url: 'https://example.com/product/123',
    prompt: 'Extract the product name, price, and description',
  }),
});
const { data } = await res.json();
console.log(data.extracted);
curl -X POST https://api.yepapi.com/v1/scrape/ai-extract \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/product/123", "prompt": "Extract product name, price, and description"}'

Request Body

ParameterTypeRequiredDescriptionDefault
urlstringYesURL to extract data from
promptstringYesWhat data to extract
schemaobjectNoJSON Schema for structured output
Info

Pass a schema object for strongly typed responses. Without it, the AI will infer the best structure.

Response

{
  "ok": true,
  "data": {
    "url": "https://example.com/product/123",
    "extracted": {
      "productName": "Wireless Headphones Pro",
      "price": 149.99,
      "currency": "USD",
      "description": "Premium noise-cancelling wireless headphones with 30-hour battery life"
    }
  }
}

Response Fields

FieldTypeDescription
okbooleanWhether the request succeeded
dataobjectResponse payload
data.urlstringThe URL that was scraped
data.extractedobjectAI-extracted structured data. Fields are determined by your prompt or schema
Under the Hood

This combines our scraping infrastructure with AI extraction. Perfect for building data pipelines without writing CSS selectors.

On this page