# Structured Data Extractor (`properscraper/structured-data-extractor`) Actor

Extract the structured data of any list of pages: JSON-LD (schema.org), Open Graph and Twitter Card tags. Product name, price, availability and rating; article headline, author and date; organisation, FAQ and breadcrumbs, picked out ready to use.

- **URL**: https://apify.com/properscraper/structured-data-extractor.md
- **Developed by:** [jake mcclure](https://apify.com/properscraper) (community)
- **Categories:** SEO tools, E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 page reads

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

## Structured Data Extractor

Extract the structured data of any list of pages: the JSON-LD (schema.org) markup that sites publish for search engines, plus their Open Graph and Twitter Card tags.

You get everything the page declares, and the most-used kinds picked out in a simple, ready-to-use shape: **product** (name, brand, price, currency, availability, rating), **article** (headline, authors, dates), **organisation** (name, logo, phone, address, social profiles), **breadcrumbs** and **FAQ**.

No browser is used, so thousands of pages take minutes.

Use it to:

- read the price, stock status and rating from product pages on almost any shop, without writing a scraper for each one
- collect company details (address, phone, social profiles) from company websites
- audit your own or a client's schema markup across a whole site, and find invalid blocks
- check how pages will look when shared (Open Graph and Twitter Card tags)
- gather FAQ questions and answers that sites publish

### Input

| Field | What it does |
|---|---|
| **Pages** | One per line: the full address of each page. A bare domain reads its home page. |
| **Save only pages that have structured data** | Skip pages with none. Skipped pages are not charged for. Off by default. |
| **Obey robots.txt** | On by default: a page its site asks crawlers not to read is skipped and not charged for. |

```json
{
    "urls": ["https://shop.example.com/tables/oak-dining", "https://example.com/"]
}
```

### Output

One record per page:

```json
{
    "input": "https://shop.example.com/tables/oak-dining",
    "url": "https://shop.example.com/tables/oak-dining",
    "title": "Oak Dining Table | Example Furniture",
    "types": ["Product", "BreadcrumbList"],
    "itemCount": 2,
    "invalidJsonLd": 0,
    "product": {
        "name": "Oak Dining Table",
        "brand": "Example",
        "sku": "OAK-180",
        "gtin": "5012345678900",
        "mpn": null,
        "description": "A solid oak table.",
        "imageUrl": "https://shop.example.com/img/1.jpg",
        "price": 1249,
        "highPrice": null,
        "currency": "GBP",
        "availability": "InStock",
        "condition": "NewCondition",
        "url": "https://shop.example.com/tables/oak-dining",
        "ratingValue": 4.7,
        "reviewCount": 132
    },
    "article": null,
    "organization": null,
    "breadcrumbs": ["Home", "Tables", "Oak Dining Table"],
    "faq": [],
    "openGraph": { "type": "product", "title": "Oak Dining Table", "image": "https://shop.example.com/img/1.jpg" },
    "twitter": { "card": "summary_large_image" },
    "meta": { "description": "A solid oak table.", "keywords": null, "author": null, "robots": "index,follow", "canonical": "https://shop.example.com/tables/oak-dining" },
    "jsonLd": [{ "@context": "https://schema.org", "@type": "Product", "name": "Oak Dining Table" }],
    "scrapedAt": "2026-11-18T12:00:00.000Z"
}
```

- `jsonLd` is every JSON-LD item exactly as the page declares it, with `@graph` lists opened out. `types` lists their schema.org types.
- `product`, `article` and `organization` are `null`, and `breadcrumbs` and `faq` are empty, when the page declares no such item.
- `product.price` is a number whatever way the site writes it (`"1,249.00"`, `"1.249,00"`); for a price range it is the lowest price and `highPrice` the highest. `availability` and `condition` are schema.org terms such as `InStock` and `NewCondition`.
- `organization` also covers local businesses, shops and similar types.
- `openGraph` and `twitter` hold every such tag, without the `og:` or `twitter:` prefix. A tag used more than once becomes a list.
- `invalidJsonLd` counts blocks that are not valid JSON, which search engines ignore.

A `SUMMARY` record in the run's key-value store lists any pages that could not be read and why.

### Pricing

Pay per result. You are charged once for each page saved, at the per-result price shown on this page. Pages that could not be read, that robots.txt does not allow, or (with the option on) that have no structured data, are not saved and cost nothing. The run stops as soon as it reaches the maximum charge you set for it.

### Limits

- Only JSON-LD is read as structured data. The older Microdata and RDFa formats, written into the page's HTML attributes, are not.
- Pages are read without running their JavaScript. Most sites put their JSON-LD in the page itself; markup that a script adds later is not seen.
- The data is what the site declares. A shop that publishes a wrong or out-of-date price in its markup will give you that price.
- Some sites refuse automated requests. The Actor identifies itself honestly and does not disguise itself or work around a refusal.
- Requests to the same site are spaced half a second apart. At most 5 MB of each page is read.

### Is this allowed?

Structured data is published for programs to read: it is how sites tell search engines and social networks what a page is about. The Actor reads each page once, identifies itself in its User-Agent, obeys robots.txt by default and paces its requests.

# Actor input Schema

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

One per line: the full address of each page, such as a product page or an article. A bare domain reads its home page.

## `onlyPagesWithData` (type: `boolean`):

Skip pages with no JSON-LD, Open Graph or Twitter Card data. Skipped pages are not charged for.

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

Skip a page its site's robots.txt asks crawlers not to read. Skipped pages are not charged for.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "https://wordpress.org"
  ],
  "onlyPagesWithData": false,
  "respectRobotsTxt": true
}
```

# Actor output Schema

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

One record per page read.

## `summary` (type: `string`):

Totals for the run and, for each batch of pages, how many results were saved and any error.

# 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://apify.com",
        "https://wordpress.org"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("properscraper/structured-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://apify.com",
        "https://wordpress.org",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("properscraper/structured-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://apify.com",
    "https://wordpress.org"
  ]
}' |
apify call properscraper/structured-data-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,properscraper/structured-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/tuegnOjkngZQK2Po0/builds/RvWLLEUOHncMYVxDD/openapi.json
