# Wikidata Query Service

Category: [Books and research](https://free-web-services.com/web-services/documentation/)  
Page: https://free-web-services.com/web-services/documentation/wikidata-query-service.html  
Documentation: https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service

The Wikidata Query Service answers SPARQL queries over Wikidata, the structured database behind Wikipedia with more than 100 million items: for example all cities with more than a million inhabitants, or all paintings by a given artist with their museums. Results are JSON, XML or CSV. Free, no key needed; data is CC0. Send a User-Agent and keep queries efficient.

- API key: Not needed
- Pricing: Free, no key needed; data is CC0.
- From the browser: Yes (CORS)
- Formats: JSON, XML
- Interface: REST, HTTP-GET
- Provider: wikidata.org
- Last checked: Working on November 16th, 2026

Example request:

```sh
curl 'https://query.wikidata.org/sparql?query=SELECT%20%3Fpop%20WHERE%20%7B%20wd%3AQ84%20wdt%3AP1082%20%3Fpop%20%7D&format=json'
```

The JavaScript works in a web page as well as in Node.js 18 or newer.

