Overview
Wikidata is a free, collaboratively edited knowledge base maintained by the Wikimedia Foundation that stores structured data behind Wikipedia and other Wikimedia projects. You can query its billions of facts using the SPARQL query language or the simpler Action API—read-only queries do not require authentication. It is the go-to source for structured, multilingual, open knowledge about people, places, events, and concepts.
Beginner Tip
Start with the Wikidata Query Service (https://query.wikidata.org) to interactively build and test SPARQL queries before integrating them into your app—it provides autocomplete and instant results without any setup.
Measurement Record
What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.
- Request
- GET https://www.wikidata.org/w/api.php?action=wbgetentities&ids=Q42&format=json&languages=en
- Result
- HTTP 200 · application/json · 284,276 bytes · compressed
- Response time
- 1322 ms (median of 3) · fastest 1286 ms
- Transport
- TLSv1.3 · TLS_AES_128_GCM_SHA256 · certificate issued by Let's Encrypt
- Browser CORS
- No Access-Control-Allow-Origin header — call it from a server, not the browser
- Served by
- mw-api-ext.eqiad.main-7c8544589d-ndgvx
- Recorded
- 2026-08-10
Fields Returned
Top-level fields present in the response we captured, with the type and value we actually received.
| Field | Type | Value received |
|---|---|---|
| entities | object | {1 fields} |
| success | integer | 1 |
Captured Response
Captured from a real request to https://www.wikidata.org/w/api.php?action=wbgetentities&ids=Q42&format=json&languages=en on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.
{
"entities": {
"Q42": {
"pageid": 138,
"ns": 0,
"title": "Q42",
"lastrevid": 2528906229,
"modified": "2026-08-08T20:03:20Z",
"type": "item",
"id": "Q42",
"labels": {},
"descriptions": {
"…": "(1 more fields)"
},
"aliases": {},
"claims": {
"…": "(312 more fields)"
},
"sitelinks": {
"…": "(132 more fields)"
}
}
},
"success": 1
} Field Reference
entities Map of entity IDs (e.g., Q42) to their full data objects. Implementation Example
Calls a real endpoint of this API. Replace any placeholder credentials with your own key.
const url = "https://www.wikidata.org/w/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
headers: {
"Authorization": "Bearer YOUR_API_KEY"
}
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.
Measured Score Breakdown
Live HTTP request to the API endpoint
Fully tested on Aug 10, 2026
Technical Specifications
Related Tags
Similar APIs
View All →GENESIS
The GENESIS API provides access to official statistical data from the Federal Statistical Office of Germany (Destatis).
Socrata
Socrata is a powerful open data platform that gives you access to thousands of government and civic datasets from around the world.
API Setu
API Setu is an Indian Government platform that aggregates a wide variety of official APIs covering KYC verification, business registration, education records, and employment data.
Microlink.io
⭐ Beginner's PickMicrolink.io lets you extract structured data—like titles, descriptions, images, and metadata—from any webpage using a simple HTTP request.
Nobel Prize
⭐ Beginner's PickThe Nobel Prize API provides free, open access to data about all Nobel Prize laureates and prize events since 1901.