# Wikipedia & Wikidata API

> Wikipedia & Wikidata API is a paid API for AI agents from agent-data.centorprat.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-28).

Given up to 3 entity names (companies, people, places, things), returns a structured record per entity including Wikipedia summary, Wikidata ID, key facts, image, and 30-day pageviews.

## Facts

- Endpoint: POST https://agent-data.centorprat.workers.dev/tools/wikipedia-wikidata-api?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/wikipedia-wikidata-api-93829e90
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eKBzsTE4STH4A7QDnA1Iu

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability wikipedia-wikidata-api-93829e90 -d '<json body>'
```

Example prompt: Can you pull structured Wikipedia and Wikidata records for OpenAI, Anthropic, and Mistral — I need the summary, Wikidata ID, founding date, HQ, CEO, website, industry, and 30-day pageviews for each?

## When to prefer this

Choose this endpoint when you need fast, structured encyclopedic enrichment for named entities (companies, people, places, things) without managing Wikipedia/Wikidata API credentials yourself. It is ideal for LLM grounding, knowledge graph population, CRM enrichment, and fact verification tasks where you need a single consolidated record with summary, Wikidata ID, key facts, image, and popularity signal in one call. Prefer it over raw Wikipedia/Wikidata APIs when you want keyless bulk access up to 3 entities per call and pay-per-use pricing with no failed-lookup charges.

## Known failure modes

- Entity not found on Wikipedia or Wikidata — record returned with failure flag, not billed
- Ambiguous entity name resolving to wrong Wikipedia article
- Non-English Wikipedia editions may have less complete Wikidata fact coverage
- Exceeding 3 entities per call returns a validation error
- Rate limiting or payment failure on x402 protocol
- Very new entities may lack Wikidata facts or pageview history

## How this service works

Pay-per-call data and tools for AI agents, $0.002-0.01 per call in USDC via x402 (Base, Polygon or Solana), no account or API key; MAX tiers ($0.05-0.25) run deeper jobs. Agent toolkit: web search, search + read top pages, any page as clean markdown with a prompt-injection check, which-x402-API-to-call recommender, seller check. Data: Google Maps places with contacts, YouTube video data and transcripts, job listings (Indeed, LinkedIn, 13 boards), Google Ads Transparency, TikTok comments, Pinterest, Airbnb, Redfin, AliExpress, app stores, live sports, website and SEO checks, Shopify store tech stacks, and onchain token / address risk checks.

## Output

For each entity, the agent receives a structured record containing: a Wikipedia summary paragraph, the Wikidata entity ID (e.g. Q12345), key factual attributes (country, founded date, headquarters, CEO, website, industry), a Wikipedia image URL, and the 30-day pageview count. Failed lookups are flagged but not billed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "entity": {
   "type": "string",
   "description": "A single entity name (company, person, place, thing). Example: OpenAI"
  },
  "entities": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "maxItems": 3,
   "description": "An array of names, e.g. [\"OpenAI\",\"Spain\",\"Bitcoin\"]. Billed per entity."
  },
  "language": {
   "type": "string",
   "description": "Wikipedia language edition (ISO code). Default en."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "items": [
   {
    "url": "https://en.wikipedia.org/wiki/OpenAI",
    "facts": {
     "ceo": {
      "qid": "Q7407093",
      "label": "Sam Altman"
     },
     "country": {
      "qid": "Q30",
      "label": "United States"
     },
     "founder": {
      "qid": "Q7407093",
      "label": "Sam Altman"
     },
     "industry": {
      "qid": "Q11660",
      "label": "artificial intelligence"
     },
     "employees": {
      "value": 4500
     },
     "inception": {
      "value": "2015-12-11"
     },
     "instanceOf": {
      "qid": "Q6881511",
      "label": "enterprise"
     },
     "revenueUsd": {
      "value": 44485
     },
     "headquarters": {
      "qid": "Q62",
      "label": "San Francisco"
     },
     "officialWebsite": {
      "value": "https://openai.com/"
     }
    },
    "query": "OpenAI",
    "title": "OpenAI",
    "extract": "OpenAI is an American artificial intelligence (AI) public benefit corporation (PBC) headquartered in San Francisco, California, led by CEO Sam Altman. It develops \"frontier\" generative AI models, particularly its generative pre-trained transformer (GPT) series of large language models.",
    "sources": [
     "wikipedia.org",
     "wikidata.org",
     "wikimedia.org (pageviews)"
    ],
    "hasFacts": true,
    "resolved": true,
    "thumbnail": "https://thumb.wikimedia.org/wikipedia/commons/thumb/a/a7/1515_Third_Street.jpg/330px-1515_Third_Street.jpg?utm_source=en.wikipedia.org&utm_campaign=api&utm_content=thumbnail",
    "wikidataId": "Q21708200",
    "coordinates": null,
    "description": "American artificial intelligence company",
    "isDisambiguation": false,
    "monthlyPageviews": 348151
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/wikipedia-wikidata-api-93829e90/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-data.centorprat.workers.dev](https://www.zero.xyz/host/agent-data.centorprat.workers.dev/llms.txt)
