# Structured Data Extractor: JSON-LD, Open Graph, meta by URL (`steadydata/structured-data-extractor`) Actor

Structured data of any web page, up to 500 URLs a run: every JSON-LD block with its schema.org types, Open Graph and Twitter Card tags, title, meta description, canonical, robots meta, language, hreflang, feeds, favicon and published time, one row per URL. The clean facts a page states about itself,

- **URL**: https://apify.com/steadydata/structured-data-extractor.md
- **Developed by:** [Steadydata Team](https://apify.com/steadydata) (community)
- **Categories:** AI, SEO tools, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.65 / 1,000 page extracteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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: JSON-LD, Open Graph, meta by URL

Structured data of any web page, up to 500 URLs a run: every JSON-LD block with its schema.org types, Open Graph and Twitter Card tags, title, meta description, canonical, robots meta, language, hreflang, feeds, favicon and published time, one row per URL. Robots-aware, no browser. Pay per page.

### Why this scraper

- **Only delivered results are charged.** Inputs that fail come back as clear error
  records at no cost.
- One plain fetch per page, parsed with lxml, no browser. Measured on the platform: five pages (BBC News, Python.org, Wikipedia, GitHub, a BBC Good Food recipe) in 5 seconds for a tenth of a cent.
- Everything a page declares about itself in one row: every JSON-LD block as parsed JSON with its schema.org types (Recipe, Article, Product, FAQPage, BreadcrumbList, VideoObject and so on), Open Graph and Twitter Card tags, title, meta description, canonical, robots meta, keywords, language, hreflang alternates, RSS and Atom feeds, favicon, published and modified time. A `@graph` block is flattened to its objects; a list block likewise.
- Robots-aware: each host's robots.txt is read once per run and a closed path comes back as a free `ROBOTS_DISALLOWED` row (measured: Google's `/search` path).

### Who this is for

Paste page URLs in `urls` (up to 500 per run). Leave `includeRawJsonLd` on to get the full JSON-LD objects; switch it off to keep rows small with only the types and count. Built for SEO audits of structured data and social tags across a site or a competitor's, for feeding recipe, product, article or event markup into a pipeline, and for checking canonicals, hreflang and feeds in bulk.

### Who this is not for

No browser is used, so structured data that a page injects with JavaScript after loading is not seen; what the server sends is what you get. Microdata and RDFa attributes in the HTML body are not parsed, only JSON-LD, meta and link tags. A page with no structured data at all is still a valid, charged row with empty columns and `hasStructuredData` false (measured: GitHub's about page has Open Graph but no JSON-LD). `article:author` is dropped on purpose. Pages that answer 403 or 429 come back as a free `BLOCKED` row; 404 and other failures as a free `FETCH_FAILED` row.

### Input example

```json
{
    "urls": [
        "https://www.bbc.com/news",
        "https://github.com/about",
        "https://www.allrecipes.com/recipe/10813/best-chocolate-chip-cookies/"
    ],
    "includeRawJsonLd": true
}
```

### Output example

- `url`
- `finalUrl`
- `statusCode`
- `title`
- `metaDescription`
- `canonical`
- `language`
- `robotsMeta`
- `keywords`
- `publishedTime`
- `modifiedTime`
- `ogTitle`
- `ogDescription`
- `ogImage`
- `ogType`
- `ogSiteName`
- `ogUrl`
- `twitterCard`
- `twitterTitle`
- `twitterImage`
- `jsonLdTypes`
- `jsonLdCount`
- `jsonLd`
- `hreflang`
- `feeds`
- `favicon`
- `hasStructuredData`

Error codes: `INVALID_URL`, `ROBOTS_DISALLOWED`, `NOT_HTML`, `FETCH_FAILED`, `BLOCKED`.

One delivered row looks like this:

```json
{
  "url": "https://en.wikipedia.org/wiki/Web_scraping",
  "finalUrl": "https://en.wikipedia.org/wiki/Web_scraping",
  "statusCode": 200,
  "title": "Web scraping - Wikipedia",
  "metaDescription": null,
  "canonical": "https://en.wikipedia.org/wiki/Web_scraping",
  "language": "en",
  "robotsMeta": "max-image-preview:standard",
  "keywords": null,
  "publishedTime": null,
  "modifiedTime": null,
  "ogTitle": "Web scraping - Wikipedia",
  "ogDescription": null,
  "ogImage": null,
  "ogType": "website",
  "ogSiteName": null,
  "ogUrl": null,
  "twitterCard": null,
  "twitterTitle": null,
  "twitterImage": null,
  "jsonLdTypes": [
    "Article"
  ],
  "jsonLdCount": 1,
  "jsonLd": [],
  "hreflang": [],
  "feeds": [
    "https://en.wikipedia.org/w/index.php?title=Special:RecentChanges&feed=atom"
  ],
  "favicon": "https://en.wikipedia.org/static/favicon/wikipedia.ico",
  "hasStructuredData": true,
  "status": "ok"
}
```

### Related actors from steadydata

- [webpage-to-markdown](https://apify.com/steadydata/webpage-to-markdown): the readable text of the same page
- [page-links-extractor](https://apify.com/steadydata/page-links-extractor): every link on the page, internal and external
- [technical-seo-audit](https://apify.com/steadydata/technical-seo-audit): the technical issues of the same page, ranked

### Pricing

Pay per event: one `page-extracted` event per delivered result. No charge for inputs
that fail, no separate platform-usage surcharge.

**Free Apify plan:** this actor delivers up to 25 rows per run for accounts on the Apify free
plan, and then stops with a message. That limit is set by us, not by Apify. It exists so the
actor keeps paying for itself for the people who do pay. Any paid Apify plan runs it at full
size, billed per delivered row, with failed rows never charged.

**Reviews:** if this actor saves you time, a short review on this page is the one thing that
helps most. Ratings are what other buyers look at first, and we have no other way to ask.

### FAQ

**Is personal data collected?**
Nothing beyond what the page publishes about itself. The `article:author` tag is not delivered, and the actor reads only the URLs you give it.

**Does it validate the JSON-LD?**
No. It parses whatever the page declares and passes it through as JSON; a block that is not valid JSON is skipped and does not count. Validation against schema.org is a separate step.

**Why is `canonical` empty on some pages?**
Because the page has no canonical link tag (measured: python.org). The row still carries `finalUrl`, the address after redirects.

**Can it read pages behind a login or a consent wall?**
No. It fetches as an anonymous visitor; what an anonymous visitor cannot see, it cannot see either.

**What does a run cost when a URL fails?**
Nothing. `ROBOTS_DISALLOWED`, `NOT_HTML`, `FETCH_FAILED`, `INVALID_URL` and `BLOCKED` rows are free; only delivered pages are charged.

**What happens when the source changes?**
Sources change from time to time; that is the nature of this work. The actor is
monitored daily and fixed fast, and while it is broken you are not charged, because
only delivered results cost anything.

# Changelog

This Actor's version history is a separate document: https://apify.com/steadydata/structured-data-extractor/changelog.md

# Actor input Schema

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

One per row, up to 500: full page URLs (https://...). Each host's robots.txt is respected.

## `includeRawJsonLd` (type: `boolean`):

On: every JSON-LD block is delivered as parsed JSON in jsonLd. Off: only the types and count, which keeps rows small.

## Actor input object example

```json
{
  "urls": [
    "https://www.bbc.com/news",
    "https://github.com/about",
    "https://www.bbcgoodfood.com/recipes/classic-victoria-sandwich-recipe"
  ],
  "includeRawJsonLd": true
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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://www.bbc.com/news",
        "https://github.com/about",
        "https://www.bbcgoodfood.com/recipes/classic-victoria-sandwich-recipe"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("steadydata/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://www.bbc.com/news",
        "https://github.com/about",
        "https://www.bbcgoodfood.com/recipes/classic-victoria-sandwich-recipe",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("steadydata/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://www.bbc.com/news",
    "https://github.com/about",
    "https://www.bbcgoodfood.com/recipes/classic-victoria-sandwich-recipe"
  ]
}' |
apify call steadydata/structured-data-extractor --silent --output-dataset

```

## MCP server setup

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