# Wikipedia JSON-LD Structured Data Scraper (`parseforge/wikipedia-jsonld-scraper`) Actor

Extracts JSON-LD structured data from Wikipedia pages by URL or search term. Returns flattened schema.org properties for articles, organizations, breadcrumbs, and more.

- **URL**: https://apify.com/parseforge/wikipedia-jsonld-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** SEO tools, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.62 / 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.
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?

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

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### Wikipedia JSON-LD Structured Data Scraper

**Scrape JSON-LD structured data from any Wikipedia page.** Every record returns the full schema.org markup, including article metadata, breadcrumbs, and entity details. Export to CSV, JSON, Excel, or XML.

Wikipedia embeds JSON-LD structured data in every page. This Actor reads the public page source, pulls every JSON-LD block, and flattens it into one fixed schema. You get clean, query-ready rows for articles, organizations, breadcrumbs, and more.

| Who uses it | What they scrape Wikipedia for |
|---|---|
| SEO analysts | Audit Wikipedia's structured data to model schema markup for their own sites |
| Knowledge graph engineers | Harvest entity relationships and facts from Wikipedia for graph databases |
| Data journalists | Extract article metadata and citations to track sourcing patterns |
| Academic researchers | Collect structured bibliographic data from Wikipedia references |

### What it does

This Actor collects JSON-LD structured data from Wikipedia pages by URL or search term, and returns each block as a flat row with all schema.org properties.

- 🔍 **Search or URL input:** Feed a Wikipedia search term or a list of page URLs, and the Actor resolves each page automatically.
- 📊 **Full schema.org coverage:** Extracts all JSON-LD types, including Article, Organization, BreadcrumbList, FAQPage, and more.
- 🧩 **Flattened output:** Every nested property becomes a dot-notated column, so no data is lost in arrays or objects.
- ⚡ **Bulk extraction:** Set maxItems up to 1,000,000 for paid users, or preview with 10 items on the free plan.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with Wikipedia data

**📈 Audit structured data at scale.**

An SEO agency runs the Actor on a list of Wikipedia URLs to compare schema.org usage across article types and inform client markup strategies.

**🧠 Build a knowledge graph.**

A data engineer extracts entity properties and relationships from Wikipedia pages to populate a Neo4j graph for semantic search.

**📰 Track citation networks.**

A researcher collects citation and author metadata from Wikipedia articles to analyze how sources are referenced over time.

**🤖 Train NLP models.**

A machine learning team scrapes article body and description fields from JSON-LD to create a training corpus for text summarization.

### Features

| | Details |
|---|---|
| **No API key** | Uses Wikipedia's public HTML, so you never register an app or wait for OAuth |
| **All JSON-LD types** | Captures Article, Organization, BreadcrumbList, FAQPage, and every other schema.org type found on the page |
| **Flat schema** | Nested JSON-LD is expanded into dot-notated columns for easy CSV or database import |
| **Bulk ready** | Scale from a 10-item preview to a million pages per run on paid plans |

### Configure the run

Drive the Actor from Wikipedia page URLs or a search term, and set maxItems to control how many pages are processed per run. The Input tab lists every parameter.

```json
{
 "startUrls": [
 {
 "url": "https://en.wikipedia.org"
 }
 ],
 "maxItems": 10
}
```

```json
{
 "startUrls": [
 {
 "url": "https://en.wikipedia.org"
 }
 ],
 "maxItems": 200
}
```

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Getting started

1. [Create a free Apify account](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [Wikipedia JSON-LD Structured Data Scraper](https://apify.com/parseforge/wikipedia-jsonld-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to Wikipedia through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/wikipedia-jsonld-scraper"
```

Then prompt the agent to run the scraper and return the results.

### Troubleshooting

**Why am I getting no results?**

Confirm your start URLs are valid Wikipedia pages that contain JSON-LD blocks. Some pages, like special or category pages, may have limited structured data. Try a search term for a common article.

**The Actor returns fewer items than maxItems.**

The Actor stops after processing all available pages from your start URLs or search term. If you need more, provide additional URLs or broaden your search term.

**Some JSON-LD properties are missing from the output.**

Wikipedia pages include different schema.org properties. The Actor extracts whatever is present in the page's JSON-LD. Check the page source to confirm which properties are available.

**I get a timeout or 403 error on some pages.**

Reduce the number of concurrent requests or add a delay between pages. If the issue persists, try a smaller batch.

### FAQ

| Question | Answer |
|---|---|
| Does this Actor require a Wikipedia API key? | It reads the public HTML of Wikipedia pages and extracts embedded JSON-LD directly. No registration or authentication is needed. |
| What JSON-LD types does it extract? | It extracts all schema.org types present in the page's JSON-LD blocks, including Article, Organization, WebSite, BreadcrumbList, FAQPage, and many others. The output schema includes every property found in the source. |
| Can I scrape multiple Wikipedia pages in one run? | Provide a list of start URLs or a search term, and set maxItems to the number of pages you want. Free users are limited to 10 items; paid users can go up to 1,000,000. |
| How is nested JSON-LD handled? | Nested objects and arrays are flattened into dot-notated columns, so properties like author.name or publisher.logo become separate fields in the output. |
| Does it work with non-English Wikipedia editions? | You can input URLs from any Wikipedia language edition, such as de.wikipedia.org or fr.wikipedia.org, and the Actor will extract the JSON-LD from those pages. |
| What output formats are supported? | You can export the results as CSV, JSON, Excel, or XML directly from the Apify platform. |
| Can I filter which JSON-LD blocks are returned? | The Actor returns all JSON-LD blocks found on each page. If you need to filter by type, you can do so after export using the @type field in your dataset. |
| Is this Actor affected by Wikipedia's rate limits? | The Actor uses polite crawling practices and respects Wikipedia's robots.txt. For very large runs, consider using a higher plan or adding delays between requests. |
| Does it extract data from Wikipedia tables or infoboxes? | This Actor extracts JSON-LD structured data embedded in the page source. For table extraction, use a dedicated HTML table scraper. |
| Can I schedule this Actor to run regularly? | You can set up a schedule in Apify to run the Actor daily, weekly, or at any custom interval to keep your structured data up to date. |

### Related actors

[ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp)

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Wikimedia Foundation, Inc. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

### 💰 How much does it cost to scrape Wikipedia JSON-LD Structured Data?

This Actor uses **pay-per-result** pricing: **$0.004 per result** collected. You are billed only for the results you receive, so a run that returns nothing costs nothing.

# Actor input Schema

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

List of Wikipedia page URLs to extract structured data from.

## `searchTerm` (type: `string`):

Search Wikipedia for pages matching this term. Leave empty to use start URLs.

## `maxItems` (type: `integer`):

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://en.wikipedia.org"
    }
  ],
  "maxItems": 10
}
```

# Actor output Schema

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

Complete dataset of all scraped records.

# 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://en.wikipedia.org"
        }
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/wikipedia-jsonld-scraper").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://en.wikipedia.org" }],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/wikipedia-jsonld-scraper").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://en.wikipedia.org"
    }
  ],
  "maxItems": 10
}' |
apify call parseforge/wikipedia-jsonld-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/wikipedia-jsonld-scraper"
        }
    }
}

```

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/b7K1R2yU8wEz74e7e/builds/cbVy0976UDST0aBf2/openapi.json
