# JSON-LD Extractor - Structured Data and Syntax Checker (`variable_mitts/json-ld-page-extractor`) Actor

Extract JSON-LD structured data from public pages. Inspect entity types, IDs, JSON syntax errors and exact source locations.

- **URL**: https://apify.com/variable_mitts/json-ld-page-extractor.md
- **Developed by:** [Dhan sites](https://apify.com/variable_mitts) (community)
- **Categories:** SEO tools, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 88.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.28 / 1,000 html 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

## JSON-LD Extractor - Structured Data and Syntax Checker

Extract embedded JSON-LD from supplied public HTML pages. Inspect parsed documents, nested schema types, entity locations and JSON syntax errors without writing a scraper or changing the source website.

### Start with this workflow

Inspect structured-data entities without manually copying script tags.

**After the run:** Inspect entity types and script locations in REPORT. Syntax checks do not certify schema.org compliance or Google rich-result eligibility.

**What is billed:** Successfully checked HTTP 200 HTML pages, including pages without JSON-LD; failed fetches and non-HTML responses are free. Check the Pricing tab for the applicable subscription-tier rate. Result rows and billable input units can differ. A successful execution does not guarantee full coverage.

The example uses a small supplied fixture or the scraping-practice demonstration target. Replace it with input you are authorized to process; inspect coverage, diagnostics and limits before downstream use.

### Quick start

1. Open the Input tab or the public Example task and restore the example input.
2. Run the small example below. For website checks, replace URLs only with sites you own or have permission to inspect. For record tools, use non-sensitive sample records first.
3. Open the dataset for individual results, then read `REPORT` for coverage and diagnostics. A successful execution alone does not establish that all requested work was completed.
4. Download the relevant files from the Output tab, or retrieve the dataset through Apify's API for your next workflow step.

```json
{
  "startUrls": [
    "https://books.toscrape.com/"
  ],
  "maxPages": 3,
  "permissionConfirmed": true
}
```

### Output example

This excerpt comes from the Books to Scrape example run. The dataset contains the complete row.

```json
{
  "url": "https://books.toscrape.com/",
  "final_url": "https://books.toscrape.com/",
  "status": 200,
  "checked": true,
  "error": "",
  "json_ld": [],
  "schema_types": [],
  "script_count": 0,
  "valid_script_count": 0,
  "invalid_script_count": 0,
  "parse_errors": [],
  "object_count": 0,
  "entities": [],
  "entity_count": 0,
  "type_counts": {},
  "repeated_entity_ids": [],
  "scripts_inspected": 0,
  "inventory_truncated": false,
  "inventory_notice": "Raw @id and @type values; JSON-LD contexts are not expanded. Repeated IDs can be legitimate. Inventory is bounded to1000 entities and10000 visited values per inspected script."
}
```

### Input reference

| Field | Type | Required | Description |
|---|---|---|---|
| `startUrls` | array | Yes | 1–100 public HTML pages you have permission to audit. A small example is prefilled. |
| `allowedHosts` | array | No | Leave empty to infer exact hostnames and their www variants from Page URLs. Add separate language domains explicitly. |
| `maxPages` | integer | No | Maximum explicitly supplied pages to check (1–100). No discovered links are followed. The time budget can stop the run earlier. |
| `permissionConfirmed` | boolean | Yes | The prefilled demo checks books.toscrape.com, the scraping-practice demonstration site. If replacing the URLs, confirm that you own or have permission to audit those websites. Uncheck to cancel all page checks. |

### Advanced workflow

#### Entity inventory with precise source locations

Each parsed page now includes entities with script_index, JSON Pointer location, raw @id/@type and property names, plus type_counts and repeated_entity_ids. Repeated IDs can be legitimate and are evidence rather than validation errors. No JSON-LD context expansion or schema.org/rich-result certification. Strict intake rejects duplicate object keys, non-finite constants and overflowing numeric values. Inventory limits:500 scripts/page,10000 visited values per script,1000 exported entities/page,50 property names/entity; inventory_truncated and scripts_inspected expose incomplete inventory. Original accepted JSON remains in json_ld.

### Pricing

$1.6 per 1,000 successfully checked HTTP 200 HTML pages ($0.0016 each) at the entry tier. Failed fetches, robots restrictions and non-HTML responses have no page event fee. A checked page is charged even when there are no findings. No run-start event or automatic output-row event. The Pricing tab shows the applicable subscription-tier price. The spending limit can reduce the number of processed items.

For example, 100 billable items cost $0.16 in Actor event fees at the entry tier. Zero findings is different from zero processed items. Inspect the report's processed/checked counts and the run's charge events to reconcile a run.

### Limits and interpretation

At most 100 supplied pages, a 75-second processing budget and a 2 MB response cap. No automatic link crawling or JavaScript rendering. JSON syntax and entity inventory do not validate schema.org requirements, context expansion or rich-result eligibility. Pages without JSON-LD still count as checked pages.

Results cover only the inspected input. Truncation and unchecked records require review; do not treat them as a complete-source guarantee. Input is not overwritten. The Actor uses limited permissions.

### Troubleshooting and support

- **Run succeeded but output is diagnostic:** inspect `REPORT` and `INPUT_ERRORS`, correct the named fields, and rerun. Handled invalid input can finish with `SUCCEEDED` and no billable items.
- **Fewer results than requested:** check coverage, truncation, spending limits and the limits above. Website checks can also be restricted by robots rules, redirects or target availability.
- **Repeat a workflow:** save a task with your input and use Apify scheduling or its API. Review each run's coverage before passing results downstream.
- **Report a problem:** open this Actor's Issues tab with the run ID, expected behavior and a minimal non-sensitive input. Never post tokens, credentials or private source data.

### Related tools

- [site regression auditor](https://apify.com/variable_mitts/site-regression-auditor)
- [internal link source checker](https://apify.com/variable_mitts/internal-link-source-checker)

### Who is this for?

SEO specialists and data engineers inspecting JSON-LD entities on supplied public pages. Review extracted types, IDs and script locations.

### Frequently asked questions

#### Does the JSON-LD checker certify Google rich results?

No. It extracts structured data and checks supported JSON syntax. It does not certify schema.org compliance, Google eligibility or search appearance.

#### How do I try it before using my full input?

Open the Input tab, review the prefilled example, and run a small batch with a spending limit. Inspect the dataset and report before increasing the batch. Examples can incur the documented inspection or analysis fee; an execution marked successful can still contain rejected records or incomplete coverage.

#### Can I use the Actor through an API or on a schedule?

Yes. Use Apify's [Actor API](https://docs.apify.com/api/v2/acts-run-sync-get-dataset-items-post) or [schedules](https://docs.apify.com/platform/schedules). Keep credentials private and use the documented input fields. The pricing and limits below apply to API runs too.

### Related tools for the next step

- [Canonical and Hreflang Checker - SEO Regression Audit](https://apify.com/variable_mitts/site-regression-auditor)
- [JSON Dataset Validator - Required Fields and Data Types](https://apify.com/variable_mitts/dataset-contract-field-checker)

# Actor input Schema

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

1–100 public HTML pages you have permission to audit. A small example is prefilled.

## `allowedHosts` (type: `array`):

Leave empty to infer exact hostnames and their www variants from Page URLs. Add separate language domains explicitly.

## `maxPages` (type: `integer`):

Maximum explicitly supplied pages to check (1–100). No discovered links are followed. The time budget can stop the run earlier.

## `permissionConfirmed` (type: `boolean`):

The example checks Books to Scrape, a public site built for scraping practice. For other URLs, confirm that you have permission before running.

## Actor input object example

```json
{
  "startUrls": [
    "https://books.toscrape.com/"
  ],
  "allowedHosts": [
    "books.toscrape.com"
  ],
  "maxPages": 3,
  "permissionConfirmed": true
}
```

# Actor output Schema

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

No description

## `report` (type: `string`):

No description

## `csv` (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 = {
    "startUrls": [
        "https://books.toscrape.com/"
    ],
    "allowedHosts": [
        "books.toscrape.com"
    ],
    "maxPages": 3,
    "permissionConfirmed": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("variable_mitts/json-ld-page-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": ["https://books.toscrape.com/"],
    "allowedHosts": ["books.toscrape.com"],
    "maxPages": 3,
    "permissionConfirmed": True,
}

# Run the Actor and wait for it to finish
run = client.actor("variable_mitts/json-ld-page-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": [
    "https://books.toscrape.com/"
  ],
  "allowedHosts": [
    "books.toscrape.com"
  ],
  "maxPages": 3,
  "permissionConfirmed": true
}' |
apify call variable_mitts/json-ld-page-extractor --silent --output-dataset

```

## MCP server setup

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