# Schema.Org Json Ld Extractor (`sync-network/schema-org-json-ld-extractor`) Actor

Extract Schema.org JSON-LD structured data from any website. Fast, lightweight HTTP-based scraper that pulls all JSON-LD scripts - perfect for SEO analysis, product data extraction, and AI/RAG pipelines. No browser overhead.

- **URL**: https://apify.com/sync-network/schema-org-json-ld-extractor.md
- **Developed by:** [Alam](https://apify.com/sync-network) (community)
- **Categories:** SEO tools, E-commerce, Developer tools
- **Stats:** 11 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 url processeds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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.org JSON-LD Extractor

Extract structured Schema.org (JSON-LD) data from websites via simple HTTP request. No browser needed — pure HTTP extraction with regex parsing.

### Features

- 🚀 **Fast** — HTTP request only, no browser rendering overhead
- 🎯 **Universal** — Works across thousands of sites using Schema.org
- 📊 **Structured** — Returns clean JSON-LD ready for analysis
- 🔍 **Comprehensive** — Extracts all Schema.org types (Product, Article, LocalBusiness, etc.)
- 🔄 **Proxy Support** — Optional Apify Proxy for bypassing anti-bot measures

### What It Does

Schema.org is a standard vocabulary for structured data on the web. Major sites (news publishers, e-commerce, Wikipedia, etc.) embed this data in `<script type="application/ld+json">` tags for SEO purposes.

This actor extracts that structured data without needing complex HTML parsing or browser automation.

### Use Cases

- **SEO Analysis** — Audit competitors' structured data implementation
- **Price Comparison** — Aggregate product data from multiple e-commerce sites
- **Lead Generation** — Extract LocalBusiness data (contact info, addresses, business hours)
- **AI/RAG Development** — Feed clean structured data to LLMs and knowledge bases
- **Content Platforms** — Pull article metadata for aggregators and news feeds
- **Research** — Analyze Schema.org adoption patterns across the web

### Input

| Field | Type | Description | Default |
|-------|------|-------------|---------|
| `startUrls` | array | URLs to extract Schema.org data from | `[{ "url": "https://example.com/" }]` |
| `timeout` | integer | Request timeout in seconds (1-60) | `10` |
| `userAgent` | string | Custom User-Agent header | `Mozilla/5.0 (compatible; SchemaOrgExtractor/1.0; +https://github.com/)` |
| `proxy` | object | Proxy configuration (Apify Proxy) | `{ "useApifyProxy": false }` |

### Output

Each URL produces one dataset item with the following structure:

```json
{
  "#url": "https://example.com/",
  "#schemaCount": 2,
  "#contexts": ["https://schema.org/"],
  "#types": ["WebSite", "Organization"],
  "schemas": [
    {
      "@context": "https://schema.org/",
      "@type": "WebSite",
      "url": "https://example.com/",
      "name": "Example Website"
    },
    {
      "@context": "https://schema.org/",
      "@type": "Organization",
      "name": "Example Inc.",
      "url": "https://example.com/"
    }
  ]
}
```

#### Fields

- `#url` — Source URL
- `#schemaCount` — Number of JSON-LD blocks found
- `#contexts` — Unique `@context` values found
- `#types` — Unique `@type` values found
- `schemas` — Array of parsed Schema.org objects (or error details if parsing failed)

### Usage Examples

#### Basic Extraction

```json
{
  "startUrls": [
    { "url": "https://www.nytimes.com/" }
  ]
}
```

#### Multiple URLs with Proxy

```json
{
  "startUrls": [
    { "url": "https://www.bbc.com/news/technology" },
    { "url": "https://en.wikipedia.org/wiki/Artificial_intelligence" }
  ],
  "timeout": 15,
  "proxy": {
    "useApifyProxy": true
  }
}
```

#### Custom Timeout and User-Agent

```json
{
  "startUrls": [
    { "url": "https://example.com/product/123" }
  ],
  "timeout": 30,
  "userAgent": "Mozilla/5.0 (compatible; MyBot/1.0)"
}
```

### Schema.org Coverage

This actor works on sites that implement Schema.org JSON-LD. Adoption varies by industry:

- **News publishers:** ~70% adoption (NYTimes, BBC, etc.)
- **E-commerce:** ~50-60% adoption (Amazon, eBay, etc.)
- **Wikipedia:** 100% adoption
- **Tech blogs:** Medium-high adoption
- **Recipe sites:** Very high adoption

Sites without Schema.org will return `schemas: []` — this is expected behavior, not an error.

### Limitations

- **Blocked Sites:** Some sites block simple HTTP requests (403, timeouts). Enable proxy support if needed.
- **No Rendering:** Static HTTP extraction only — doesn't execute JavaScript.
- **Success Rate:** ~30-60% coverage depending on industry and blocking countermeasures.

### Common Schema.org Types Extracted

- `Product` — E-commerce products with prices, availability, SKUs
- `Article` — News articles with authors, publish dates, headlines
- `LocalBusiness` — Business contact info, addresses, opening hours
- `Organization` — Company details, logos, social links
- `WebSite` — Site metadata, search action URLs
- `BreadcrumbList` — Navigation breadcrumbs
- `FAQPage` — Frequently asked questions
- `Recipe` — Recipe ingredients, cooking times, nutrition

### Why This Actor?

#### vs. Custom HTML Scrapers

- **Universal** — Same code works across thousands of sites
- **No Maintenance** — Schema.org is a standard, not site-specific markup
- **Clean Data** — Structured JSON-LD vs. messy HTML parsing

#### vs. Browser-Based Extractors

- **Fast** — HTTP request only, no rendering overhead
- **Cheap** — No browser memory/CPU costs
- **Reliable** — No JavaScript execution issues

#### vs. Similar Actors

- **Simplicity** — Clear output structure with summary fields
- **Proxy Support** — Built-in Apify Proxy integration
- **Comprehensive** — Extracts all schema types, not just specific ones

### Credits

Built by [Sync Computers](https://github.com/)

### License

Apache 2.0

# Actor input Schema

## `startUrls` (type: `array`):

URLs to extract Schema.org data from

## `timeout` (type: `integer`):

Maximum time to wait for HTTP response

## `userAgent` (type: `string`):

Optional custom User-Agent header

## `proxy` (type: `object`):

Select whether to use a proxy

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://example.com/"
    }
  ],
  "timeout": 10,
  "userAgent": "Mozilla/5.0 (compatible; SchemaOrgExtractor/1.0; +https://github.com)",
  "proxy": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "startUrls": [
        {
            "url": "https://example.com/"
        }
    ],
    "proxy": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("sync-network/schema-org-json-ld-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 = {
    "startUrls": [{ "url": "https://example.com/" }],
    "proxy": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("sync-network/schema-org-json-ld-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 '{
  "startUrls": [
    {
      "url": "https://example.com/"
    }
  ],
  "proxy": {
    "useApifyProxy": false
  }
}' |
apify call sync-network/schema-org-json-ld-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sync-network/schema-org-json-ld-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/LcbLahJPdYmcceEsE/builds/C66kV1ys7WJYYQsby/openapi.json
