# Schema Markup Extractor - JSON-LD SEO Data (`benthepythondev/schema-markup-extractor`) Actor

Extract Schema.org JSON-LD structured data from web pages, including schema types, nodes, block counts and parse errors.

- **URL**: https://apify.com/benthepythondev/schema-markup-extractor.md
- **Developed by:** [ben](https://apify.com/benthepythondev) (community)
- **Categories:** SEO tools, Marketing, Automation
- **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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Schema Markup Extractor - JSON-LD SEO Data

Extract Schema.org JSON-LD structured data from web pages and export schema types, structured data nodes, block counts and parse errors. Use it for SEO audits, rich result checks, content QA, ecommerce validation and structured data monitoring.

### What is the Schema Markup Extractor?

Schema markup helps search engines understand a page. It can describe products, articles, organizations, breadcrumbs, FAQs, reviews, jobs, events, recipes and many other entities. When schema is missing or broken, rich results and search understanding can suffer.

This actor fetches each page, finds `application/ld+json` blocks, parses them as JSON and returns the extracted nodes in a structured dataset. It also summarizes the schema types found on each page, which makes bulk audits easier.

### Common use cases

Use this actor to audit structured data across a website, verify Product schema on ecommerce pages, check Article schema on blogs, inspect Organization and WebSite schema, monitor job posting markup, validate FAQ or Breadcrumb schema, or compare competitor structured data.

SEO teams can find pages with missing JSON-LD. Ecommerce teams can confirm product data is exposed. Agencies can export schema evidence for clients. Developers can test whether deploys changed structured data.

### Input

Provide one or more page URLs.

```json
{
  "urls": [
    "https://apify.com"
  ]
}
````

### Output

Each dataset item represents one page.

```json
{
  "input": "https://apify.com",
  "url": "https://apify.com",
  "final_url": "https://apify.com/",
  "domain": "apify.com",
  "status_code": 200,
  "json_ld_block_count": 2,
  "schema_node_count": 5,
  "schema_types": ["Organization", "WebSite"],
  "schema_nodes": [
    {
      "@context": "https://schema.org",
      "@type": "Organization",
      "name": "Apify"
    }
  ],
  "parse_errors": [],
  "error": null
}
```

### Output fields

- `json_ld_block_count` - number of JSON-LD script blocks.
- `schema_node_count` - number of extracted schema nodes.
- `schema_types` - unique `@type` values found.
- `schema_nodes` - parsed structured data objects.
- `parse_errors` - JSON parse errors from malformed blocks.
- `final_url`, `domain`, `status_code` - request metadata.
- `error` - request error, if one occurred.

### Why use this actor?

Structured data is easiest to inspect programmatically. This actor gives you a clean dataset instead of requiring manual browser checks. It is fast because it reads HTML directly, and it integrates with Apify schedules, webhooks, exports and API workflows.

### Example workflows

Collect product URLs from a sitemap, extract schema, and filter pages missing `Product` or `Offer`. Audit article URLs and confirm `Article` or `NewsArticle` schema exists. Run it before and after a release to catch accidental template changes. Build a competitor dataset showing which schema types are used in your niche.

For job boards, check whether `JobPosting` schema appears on job detail pages. For local businesses, inspect `LocalBusiness`, `Organization` and `BreadcrumbList` markup. For publishers, monitor article templates and author pages. For ecommerce teams, export `Product`, `Offer`, `AggregateRating` and `Review` nodes to confirm that rich-result inputs are present.

### Integration ideas

Use the actor after a sitemap extractor to audit a sample of important URLs. Send `schema_types` into a spreadsheet and filter pages without required types. Store historical runs and alert when schema disappears from a template. Combine this actor with the Meta Tags Extractor to create a broader SEO health dataset for each page.

Agencies can use the output as evidence in technical SEO reports. Developers can run it during release QA to make sure structured data blocks are still valid JSON. Data teams can use schema nodes as a lightweight source of product, organization or article metadata when the site exposes it publicly.

### Best practices

Use actual public URLs, not editor previews. Inspect `parse_errors` for malformed JSON-LD. Remember that this actor extracts markup; it does not replace Google's Rich Results Test or validate every schema requirement. For critical pages, use this output as the bulk audit layer and then validate representative samples with a specialized validator.

Audit by template. One homepage, one product page, one category page and one article page can each expose different schema. For bulk checks, group results by `schema_types` and investigate missing or unexpected groups. If a site injects JSON-LD only after JavaScript execution, direct HTML extraction may not see it; those sites need a browser-rendered workflow.

### Data quality notes

The actor extracts JSON-LD script blocks and flattens top-level arrays and `@graph` nodes. It preserves parsed nodes so advanced users can inspect all fields. It reports malformed JSON in `parse_errors` instead of failing the entire run. Schema types are deduplicated and sorted to make filtering easier.

### Commercial value

Structured data is one of the clearest technical SEO checks to productize. It is visible, measurable and tied to rich search features. This actor helps agencies and site owners audit many pages quickly, document gaps, and verify fixes after template changes without manually opening each page in a browser.

### FAQ

Does it extract microdata?

This version focuses on JSON-LD, the most common modern structured data format.

Does it render JavaScript?

No. It reads server-returned HTML. Important SEO JSON-LD should usually be present there.

Can I audit ecommerce pages?

Yes. Product, Offer, Review and Breadcrumb schema are common use cases.

Can I export schema nodes?

Yes. The full parsed nodes are included in the dataset.

### You might also like

- Meta Tags Extractor - extract titles, descriptions and Open Graph tags.
- Sitemap URL Extractor - collect URLs for schema audits.
- Website Status Checker - check page availability before audits.

### Keywords

schema markup extractor, JSON-LD scraper, structured data scraper, Schema.org extractor, SEO schema audit, rich results data, Product schema checker, Article schema scraper, Apify schema tool.

# Actor input Schema

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

Web pages to extract JSON-LD schema markup from.

## Actor input object example

```json
{
  "urls": [
    "https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data"
  ]
}
```

# 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://developers.google.com/search/docs/appearance/structured-data/intro-structured-data"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("benthepythondev/schema-markup-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://developers.google.com/search/docs/appearance/structured-data/intro-structured-data"] }

# Run the Actor and wait for it to finish
run = client.actor("benthepythondev/schema-markup-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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://developers.google.com/search/docs/appearance/structured-data/intro-structured-data"
  ]
}' |
apify call benthepythondev/schema-markup-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=benthepythondev/schema-markup-extractor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Schema Markup Extractor - JSON-LD SEO Data",
        "description": "Extract Schema.org JSON-LD structured data from web pages, including schema types, nodes, block counts and parse errors.",
        "version": "1.0",
        "x-build-id": "IcrO4Iew1NqTiqYqg"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/benthepythondev~schema-markup-extractor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-benthepythondev-schema-markup-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/benthepythondev~schema-markup-extractor/runs": {
            "post": {
                "operationId": "runs-sync-benthepythondev-schema-markup-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/benthepythondev~schema-markup-extractor/run-sync": {
            "post": {
                "operationId": "run-sync-benthepythondev-schema-markup-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "urls": {
                        "title": "URLs",
                        "type": "array",
                        "description": "Web pages to extract JSON-LD schema markup from.",
                        "default": [
                            "https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data"
                        ],
                        "items": {
                            "type": "string"
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
