# Universal Web Data Extractor: Any URL to JSON (`acerodario/universal-web-data-extractor`) Actor

Turn any URL into clean JSON: title, metadata, main text, schema.org data, and product price, currency and stock when the page is a product. Fast (no browser), safe, and you only pay for pages that worked.

- **URL**: https://apify.com/acerodario/universal-web-data-extractor.md
- **Developed by:** [León Darío Acero Zapata](https://apify.com/acerodario) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Universal Web Data Extractor: Any URL to Structured JSON

Give it URLs, get back **clean, structured JSON**: title, metadata, readable main text, schema.org data and, when the page is a product, its **price, currency, stock, brand, SKU and GTIN** already normalized.

One Actor instead of a scraper per website. No browser, so it is fast and cheap: a typical page takes well under a second.

- **Articles and pages**: title, description, author, publish date, language, canonical URL, headings and the main text without menus, footers or scripts.
- **Products**: name, brand, SKU, GTIN, price, list price, discount, currency, availability, images, variants, rating. Works on any store that publishes schema.org data, microdata or OpenGraph product tags (most Shopify, WooCommerce, Magento, VTEX and Salesforce stores).
- **Structured data**: every JSON-LD block of the page (Product, Article, Organization, Event, Recipe, FAQ...).
- **Optional**: links (internal/external), images with alt text, HTML tables as rows.
- **Normalized**: prices become numbers whatever the format (`1.299.900,50`, `$ 1,299.00`, `289.900`), currencies become ISO codes, dates become ISO 8601.
- **You only pay for pages that worked.** Blocked, missing or broken pages are listed separately and never charged.

### What you can do with it

- Feed web pages to an **AI agent or RAG pipeline** as clean text plus metadata (also through the Apify MCP server).
- Monitor competitor **product prices and stock** from a list of URLs.
- Enrich a list of company or article URLs with titles, descriptions, authors and dates.
- Audit your own site: canonical tags, headings, structured data, broken pages.

### Input

| Field | Default | Notes |
|---|---|---|
| `urls` | required | Up to 5,000 URLs per run |
| `includeText` | `true` | Main readable text |
| `detectProduct` | `true` | Product block when the page is a product |
| `includeStructuredData` | `true` | Raw JSON-LD blocks |
| `includeLinks` / `includeImages` / `includeTables` | `false` | Up to 300 links, 100 images, 10 tables |
| `maxTextChars` | `20000` | Cut the text of each page |
| `maxConcurrency` | `10` | Each website is still limited to 2 parallel requests |
| `respectRobotsTxt` | `true` | Skip pages the site asks crawlers not to fetch |
| `proxyConfiguration` | off | Only needed for sites that do not answer from the default servers |

### Output

One item per extracted page:

```json
{
  "url": "https://web-scraping.dev/product/1",
  "finalUrl": "https://web-scraping.dev/product/1",
  "httpStatus": 200,
  "pageType": "product",
  "title": "web-scraping.dev product Box of Chocolate Candy",
  "description": "Mock product Box of Chocolate Candy page for web scraper testing",
  "canonicalUrl": "https://web-scraping.dev/product/1",
  "language": "en",
  "siteName": "web-scraping.dev",
  "author": "ScrapFly",
  "publishedAt": "2023-05-20T00:00:00+00:00",
  "headings": { "h1": [], "h2": [], "h3": ["Box of Chocolate Candy"] },
  "product": {
    "name": "Box of Chocolate Candy",
    "brand": "web-scraping.dev",
    "price": 9.99,
    "listPrice": null,
    "discountPercent": null,
    "currency": "USD",
    "availability": "in_stock",
    "inStock": true,
    "images": ["https://web-scraping.dev/assets/products/orange-chocolate-box-small-1.webp"],
    "variants": [],
    "source": "json-ld"
  },
  "structuredDataTypes": ["Product"],
  "text": "Box of Chocolate Candy\nDescription\nIndulge your sweet tooth with our Box of Chocolate Candy...",
  "wordCount": 214,
  "responseTimeMs": 843,
  "fetchedAt": "2026-11-18T22:36:35+00:00"
}
```

- `pageType` is `product`, `article` or `page`.
- `product` is `null` when the page is not a product.
- Pages that could not be extracted are **not** in the dataset. They are listed with the reason in the key-value store record `FAILED_URLS`, and counted in `SUMMARY`.

#### Why a page can be skipped

| Reason | Meaning |
|---|---|
| `http_403`, `http_404`, ... | The website refused or does not have the page |
| `robots_disallowed` | The site's robots.txt asks crawlers not to fetch it |
| `unsupported_content_type` | PDF, image or another binary file |
| `too_large` | More than 10 MB |
| `timeout`, `connection_error` | The website did not answer (retried up to 3 times) |
| `host_unavailable` | The website failed many times in a row, so the rest of its URLs were skipped |
| `blocked_url` | Not a public http(s) address |

### Built to be safe, robust and fast

- **Safe**: only public `http`/`https` destinations are fetched. Private, loopback, link-local and cloud-metadata addresses are refused, DNS answers are verified at connection time and every redirect is checked again. No cookies are shared between pages.
- **Robust**: timeouts, limited retries with backoff, a per-website circuit breaker, a 10 MB response cap and a content-type allowlist. One broken page never stops the run, and progress is saved so a restarted run does not fetch or charge the same URL twice.
- **Polite**: identifies itself with its own User-Agent, respects robots.txt, at most 2 parallel requests per website, and slows down automatically when a site answers 429.
- **Fast**: asynchronous HTTP with no browser, parsing off the event loop, results saved in batches.

### Limits

- Pages that only show their content after running JavaScript (single-page apps without server rendering) return metadata but little text. Most stores and news sites render on the server and work well.
- Websites protected by anti-bot challenges (for example a Cloudflare "Just a moment" page) are reported as `http_403` and not charged. This Actor does not try to get around them.
- Only public pages: no logins, no forms.

# Actor input Schema

## `urls` (type: `array`):

Pages to extract: articles, product pages, company pages, documentation, anything public. Up to 5,000 per run.

## `includeText` (type: `boolean`):

Extract the readable text of the main content, without menus, footers or scripts. Ideal for AI agents, RAG and search indexes.

## `detectProduct` (type: `boolean`):

When the page is a product, return name, brand, SKU, GTIN, price, list price, discount, currency, availability, images and variants, all normalized.

## `includeStructuredData` (type: `boolean`):

Return the JSON-LD blocks published by the page (products, articles, organizations, events, recipes, FAQs...).

## `includeLinks` (type: `boolean`):

Return up to 300 links with their text and whether they are internal or external.

## `includeImages` (type: `boolean`):

Return up to 100 image URLs with their alt text.

## `includeTables` (type: `boolean`):

Return up to 10 HTML tables as headers and rows.

## `maxTextChars` (type: `integer`):

Cut the main text of each page at this many characters.

## `maxConcurrency` (type: `integer`):

Pages fetched at the same time. Each website is still limited to 2 parallel requests so it is never overloaded.

## `respectRobotsTxt` (type: `boolean`):

Skip pages that the website asks crawlers not to fetch. Skipped pages are not charged.

## `proxyConfiguration` (type: `object`):

Not needed for most websites. Turn it on only if a site does not answer from the default servers.

## Actor input object example

```json
{
  "urls": [
    "https://en.wikipedia.org/wiki/Web_scraping",
    "https://web-scraping.dev/product/1"
  ],
  "includeText": true,
  "detectProduct": true,
  "includeStructuredData": true,
  "includeLinks": false,
  "includeImages": false,
  "includeTables": false,
  "maxTextChars": 20000,
  "maxConcurrency": 10,
  "respectRobotsTxt": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `pages` (type: `string`):

Metadata, main text, structured data and product details of every extracted page.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://en.wikipedia.org/wiki/Web_scraping",
        "https://web-scraping.dev/product/1"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("acerodario/universal-web-data-extractor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "urls": [
        "https://en.wikipedia.org/wiki/Web_scraping",
        "https://web-scraping.dev/product/1",
    ],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("acerodario/universal-web-data-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://en.wikipedia.org/wiki/Web_scraping",
    "https://web-scraping.dev/product/1"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call acerodario/universal-web-data-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,acerodario/universal-web-data-extractor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/9IfIG2vdf38pgF25h/builds/Qw5BGUJrqOrgac1fz/openapi.json
