# Schema Builder: Write JSON-LD Structured Data for a Page (`bodacious_mistral/schema-builder`) Actor

Reads each page and writes ready-to-paste JSON-LD structured data from what the page shows. Values the page does not show are listed for you to fill in, never made up.

- **URL**: https://apify.com/bodacious_mistral/schema-builder.md
- **Developed by:** [Red Center Studio](https://apify.com/bodacious_mistral) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 pages built

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/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

## Schema Builder: Write JSON-LD Structured Data for a Page

Reads each page and writes ready-to-paste JSON-LD structured data from what the page shows. Values the page does not show are listed for you to fill in, never made up.

### What it does

Most structured data tools check markup you already wrote. This Actor writes it. Give it a list of pages. For each page it reads the HTML and returns one row with a ready-to-paste JSON-LD script tag, built only from what the page shows and from the optional details you give.

Every value in the JSON comes from the page or from your input. When a value that Google needs is not on the page, the property is left out of the JSON and listed for you to add, so you never publish a made-up address, price or date. The row says which properties came from the page, which came from your input and which are still missing.

What it reads on each page:

- Title, meta description, canonical address, page language, Open Graph and Twitter tags, the main heading and article dates and author meta tags.
- Breadcrumb trails: a nav marked as a breadcrumb, a list with a breadcrumb class, or an existing BreadcrumbList.
- The logo in the page header (an image with "logo" in its class, id, alt text or file name), with the apple-touch-icon as a fallback that the row warns about.
- Phone numbers and email addresses from tel: and mailto: links, an address element or a street address pattern in the footer or a contact block.
- Social profile links (Facebook, Instagram, LinkedIn, X or Twitter, YouTube, TikTok, GitHub). Share buttons are skipped.
- A search form, used for a site search action only when both the form address and the field name are known.
- Product signals: an og:type of product, product price meta tags, itemprop prices, or a visible price with a currency symbol next to an add-to-cart button.
- Question and answer pairs: details and summary elements, or headings that end in a question mark followed by answer text.
- Event signals: a start date together with a venue.
- Every JSON-LD block already on the page (it is parsed, its types are recorded and blocks that fail to parse are reported) and every microdata type.

### Types it writes

With `auto` (the default) the types are chosen from the page:

| Type | When it is written |
| --- | --- |
| Organization, or LocalBusiness | On the home page. LocalBusiness when a street address or a phone number is found, otherwise Organization |
| WebSite | On the home page, with a site search action when the page has a usable search form |
| WebPage | On every page |
| Article, or BlogPosting | When the page has og:type article, a published date, or an article element with a byline. BlogPosting for blog and post addresses |
| Product | When product signals are found. The offer needs a price and a currency from the page |
| FAQPage | When at least 2 question and answer pairs are found |
| BreadcrumbList | From a breadcrumb trail on the page. When the page shows none, from the address segments, with low confidence |
| Event | When a start date and a venue are found |

You can also pick types by name, including SoftwareApplication, which is never chosen by auto. A picked type with weak signals is written with low confidence and a list of what is missing. Types that the page already carries as valid structured data are not written again and appear in `alreadyPresent`. An existing block that does not parse, or that lacks a required property, appears in `invalidExisting`.

The entries share stable `@id` values and link to each other: the page is part of the site, the site has the organization as publisher, the page points to its breadcrumb. Site level entries (organization, website) use the site root address, so every page you build refers to the same ones.

### Checks against Google's structured data guidelines

A small built-in table, taken from Google Search Central's structured data documentation, lists what each type needs:

| Type | Required | Recommended |
| --- | --- | --- |
| Article | none | author, datePublished, headline, image, dateModified |
| Product | name, and one of offers, review or aggregateRating (an offer needs price and priceCurrency) | image, description, sku, brand |
| FAQPage | mainEntity with a question name and answer text | none |
| BreadcrumbList | itemListElement with a position and name for each item | none |
| Event | name, startDate, location | description, endDate, image, offers |
| LocalBusiness | name, address | telephone, url, image, openingHoursSpecification, priceRange |
| Organization | none | name, url, logo |
| SoftwareApplication | name, and one of offers or aggregateRating | applicationCategory, operatingSystem |

Missing required properties go in `missingRequired`. Missing recommended ones go in `toFill`. FAQ markup is valid schema.org that search and AI tools can read, but Google shows FAQ rich results only for well-known government and health sites (since August 2023). The row says so.

### Who it is for

Site owners and agencies who want structured data without writing it by hand, SEO and developer teams who want a first draft per page that they can check, and AI agents that need a page's structured data as a tool call.

### Input

Run it from the Console, the API, or as an agent tool. Minimal input:

```json
{
  "urls": [
    "https://www.iana.org/help/example-domains"
  ]
}
```

Every field is described in the input form. Free to run: you pay only for the page built you get back.

### Output

One row per input item. Rows with `status: "ok"` are results. Rows with `status: "error"` explain what went wrong and are never charged. A run summary is stored in the `OUTPUT` record.

Real output from a live run:

```json
{
  "status": "ok",
  "inputRef": "https://www.iana.org/help/example-domains",
  "auditedAt": "2026-12-04T09:25:29.799Z",
  "url": "https://www.iana.org/help/example-domains",
  "finalUrl": "https://www.iana.org/help/example-domains",
  "pageKind": "other",
  "alreadyPresent": [],
  "invalidExisting": [],
  "generatedTypes": [
    "WebPage",
    "BreadcrumbList"
  ],
  "missingRequired": [],
  "jsonLd": {
    "@context": "https://schema.org",
    "@graph": [
      {
        "@type": "WebPage",
        "@id": "https://www.iana.org/help/example-domains#webpage",
        "url": "https://www.iana.org/help/example-domains",
        "name": "Example Domains",
        "breadcrumb": {
          "@id": "https://www.iana.org/help/example-domains#breadcrumb"
        }
      },
      {
        "@type": "BreadcrumbList",
        "@id": "https://www.iana.org/help/example-domains#breadcrumb",
        "itemListElement": [
          {
            "@type": "ListItem",
            "position": 1,
            "name": "Home",
            "item": "https://www.iana.org/"
          },
          {
            "@type": "ListItem",
            "position": 2,
            "name": "Help",
            "item": "https://www.iana.org/help/"
          },
          {
            "@type": "ListItem",
            "position": 3,
            "name": "Example Domains",
            "item": "https://www.iana.org/help/example-domains"
          }
        ]
      }
    ]
  },
  "scriptTag": "<script type=\"application/ld+json\">\n{\n  \"@context\": \"https://schema.org\",\n  \"@graph\": [\n    {\n      \"@type\": \"WebPage\",\n      \"@id\": \"https://www.iana.org/help/example-domains#webpage\",\n      \"url\": \"https://www.iana.org/help/example-domains\",\n      \"name\": \"Example Domains\",\n      \"breadcrumb\": {\n        \"@id\": \"https://www.iana.org/help/example-domains#breadcrumb\"\n      }\n    },\n    {\n      \"@type\": \"BreadcrumbList\",\n      \"@id\": \"https://www.iana.org/help/example-domains#breadcrumb\",\n      \"itemListElement\": [\n        {\n          \"@type\": \"ListItem\",\n          \"position\": 1,\n          \"name\": \"Home\",\n          \"item\": \"https://www.iana.org/\"\n        },\n        {\n          \"@type\": \"ListItem\",\n          \"position\": 2,\n          \"name\": \"Help\",\n          \"item\": \"https://www.iana.org/help/\"\n        },\n        {\n          \"@type\": \"ListItem\",\n          \"position\": 3,\n          \"name\": \"Example Domains\",\n          \"item\": \"https://www.iana.org/help/example-domains\"\n        }\n      ]\n    }\n  ]\n}\n</script>",
  "perType": [
    {
      "type": "WebPage",
      "confidence": "high",
      "fromPage": [
        "url",
        "name",
        "breadcrumb"
      ],
      "fromInput": [],
      "missingRequired": [],
      "toFill": []
    },
    {
      "type": "BreadcrumbList",
      "confidence": "low",
      "fromPage": [
        "itemListElement"
      ],
      "fromInput": [],
      "missingRequired": [],
      "toFill": []
    }
  ],
  "warnings": [
    "The breadcrumb trail was built from the web address, because the page shows none. The names and the addresses of the upper levels come from the address segments, not from your menu, so check that each level is a real page with the right label."
  ],
  "nextStep": "Paste the script tag into the head of this page (or just before the closing body tag). Test it with Google's Rich Results Test and the Schema Markup Validator (validator.schema.org)."
}
```

One row per page: the final address, the page kind, `alreadyPresent`, `invalidExisting`, `generatedTypes`, the `jsonLd` object, the `scriptTag` text to paste (pretty printed, with every less-than sign escaped so page text cannot close the tag), a `perType` list with confidence, `fromPage`, `fromInput`, `missingRequired` and `toFill` for each type, `warnings` and a `nextStep`. Paste the script into the head of the page, then test it with Google's Rich Results Test and the Schema Markup Validator.

Error rows are free: an unreachable or blocked address, a final status outside 200 to 299, an empty page, a page that is not HTML, and a page where every type asked for is already present.

### Pricing

Pay per event. No monthly fee. The platform start event is charged automatically by Apify.

| Event | Charged when | Price |
| --- | --- | --- |
| Page built (`schema-built`) | Charged once for each page that returns a JSON-LD row. Error rows are free. | $0.01 per page built ($10 per 1,000) |

Set a maximum cost per run on the run options. The Actor stops cleanly when the limit is reached and never charges beyond it.

### Use with Apify MCP

AI assistants can call this Actor as a tool through the Apify MCP server:

`https://mcp.apify.com?tools=bodacious_mistral/schema-builder`

### Limits

- It reads the HTML as the server sends it. It runs no JavaScript and uses no browser, so details a script adds later are not seen. A page that looks empty before scripts run gets a warning.
- It writes markup for the page it reads. It does not fetch other pages, so breadcrumb names built from the address come from the address segments, not from the other pages' titles.
- It does not guess. A name that the page does not show, a currency that is only a dollar sign, opening hours, a price range and similar values are listed for you to add.
- Existing microdata is counted as present but not checked for completeness.
- A valid result does not promise a rich result. Google decides what to show.
- Only the first 1.5 MB of a page is read.
- Up to 100 pages per run, 5 at a time by default. Each page is limited to 30 seconds.
- Private and internal addresses are refused for safety and come back as an error row.

### Next step

[Check how AI search reads your site with the free GEO audit](https://redcenterstudio.com/geo-audit/). Built by Red Center Studio. Related: [GEO audit](https://redcenterstudio.com/geo-audit/).

# Actor input Schema

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

Pages to write structured data for, one per line. A bare domain or a full address. Only public pages are read and nothing on the site is changed.

## `types` (type: `array`):

What to write. auto detects the types from the page: the home page gets Organization (or LocalBusiness) and WebSite, every page gets WebPage, and Article, Product, FAQPage, BreadcrumbList and Event are added when the page shows them. Pick types by name to force them.

## `organization` (type: `object`):

Optional facts about your organisation that the page does not show. Anything you give here is marked as coming from your input.

## `concurrency` (type: `integer`):

How many pages to read at the same time. Lower it if you read many pages on one host.

## Actor input object example

```json
{
  "urls": [
    "https://www.iana.org/help/example-domains"
  ],
  "types": [
    "auto"
  ],
  "organization": {
    "name": "",
    "logoUrl": "",
    "sameAs": [],
    "telephone": ""
  },
  "concurrency": 5
}
```

# Actor output Schema

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

One row per input item.

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

Totals, charged events, stop reason and the next step. Stored as the OUTPUT record.

# 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.iana.org/help/example-domains"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bodacious_mistral/schema-builder").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.iana.org/help/example-domains"] }

# Run the Actor and wait for it to finish
run = client.actor("bodacious_mistral/schema-builder").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.iana.org/help/example-domains"
  ]
}' |
apify call bodacious_mistral/schema-builder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bodacious_mistral/schema-builder"
        }
    }
}
```

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/tkmuxF2kSBPR7Kbc1/builds/IyNAKbRXyglY3sbk3/openapi.json
