Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Query Wikidata SPARQL for scholarly metadata, authors, and entities
.claude/skills/brycewang-stanford-wikidata-api-guide/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 25% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 51% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 56% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 58% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 281% | 0% |
Wikidata is a free, collaborative, multilingual knowledge base maintained by the Wikimedia Foundation. It contains structured data about millions of entities including scholarly articles, academic journals, researchers, universities, and scientific concepts. Each entity has a unique QID and properties linking it to other entities, forming a rich knowledge graph.
For academic researchers, Wikidata serves as a powerful tool for bibliometric analysis, disambiguation of author names, mapping institutional relationships, and linking scholarly outputs across different identifier systems (DOI, ORCID, PubMed ID, arXiv ID, etc.). The SPARQL query service provides a flexible, standards-based interface for complex graph queries.
The Wikidata Query Service is entirely free, requires no authentication, and supports the full SPARQL 1.1 query language. It is especially powerful for cross-referencing scholarly metadata that spans multiple databases and identifier systems.
No authentication is required. The Wikidata SPARQL endpoint is free and open.
bash# No API key needed -- set a descriptive User-Agent header as courtesy curl -G "https://query.wikidata.org/sparql" \ --data-urlencode "query=SELECT ?item WHERE { ?item wdt:P31 wd:Q5 } LIMIT 5" \ -H "Accept: application/json" \ -H "User-Agent: ResearchClaw/1.0 (academic research tool)"
GET https://query.wikidata.org/sparql?query={SPARQL}&format=jsonParameters:
query (required): URL-encoded SPARQL queryformat: Response format (json, xml, csv, tsv)bashcurl -G "https://query.wikidata.org/sparql" \ --data-urlencode 'query= SELECT ?paper ?paperLabel ?doi WHERE { ?author wdt:P496 "0000-0002-1825-0097" . ?paper wdt:P50 ?author ; wdt:P356 ?doi . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } } LIMIT 20' \ -H "Accept: application/json" \ -H "User-Agent: ResearchClaw/1.0"
sparqlSELECT ?journal ?journalLabel ?issn (COUNT(?article) AS ?articleCount) WHERE { ?journal wdt:P31 wd:Q5633421 ; wdt:P236 ?issn . ?article wdt:P1433 ?journal . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } } GROUP BY ?journal ?journalLabel ?issn ORDER BY DESC(?articleCount) LIMIT 20
pythonimport requests SPARQL_URL = "https://query.wikidata.org/sparql" HEADERS = { "Accept": "application/json", "User-Agent": "ResearchClaw/1.0 (academic research tool)" } def query_wikidata(sparql_query): """Execute a SPARQL query against Wikidata.""" resp = requests.get( SPARQL_URL, params={"query": sparql_query}, headers=HEADERS ) resp.raise_for_status() data = resp.json() return data["results"]["bindings"] # Find all identifier mappings for a researcher sparql = """ SELECT ?person ?personLabel ?orcid ?scopus ?dblp ?gscholar WHERE { ?person wdt:P496 "0000-0002-1825-0097" . OPTIONAL { ?person wdt:P496 ?orcid . } OPTIONAL { ?person wdt:P1153 ?scopus . } OPTIONAL { ?person wdt:P2456 ?dblp . } OPTIONAL { ?person wdt:P1960 ?gscholar . } SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } } """ results = query_wikidata(sparql) for r in results: print(f"Name: {r.get('personLabel', {}).get('value', 'N/A')}") print(f" ORCID: {r.get('orcid', {}).get('value', 'N/A')}") print(f" Scopus: {r.get('scopus', {}).get('value', 'N/A')}") print(f" DBLP: {r.get('dblp', {}).get('value', 'N/A')}") print(f" Google Scholar: {r.get('gscholar', {}).get('value', 'N/A')}")
sparqlSELECT ?uni ?uniLabel ?country ?countryLabel ?coord WHERE { ?uni wdt:P31 wd:Q3918 ; wdt:P17 ?country ; wdt:P625 ?coord . FILTER(?country = wd:Q30) SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } } LIMIT 50
Author Disambiguation: Use Wikidata to resolve author names by cross-referencing ORCID, Scopus ID, DBLP, and Google Scholar identifiers. This is particularly useful when a common name maps to multiple researchers.
Bibliometric Graph Construction: Build citation and co-authorship networks by querying the relationships between authors, papers, journals, and institutions in the Wikidata graph.
Identifier Translation: Convert between DOI, PubMed ID, arXiv ID, and other identifiers using Wikidata's comprehensive property mappings. This enables linking records across heterogeneous databases.
Institutional Analysis: Map university affiliations, geographic distributions, and organizational hierarchies for researchers in a specific field.
SERVICE wikibase:label for human-readable labels instead of QIDs| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 11,185 | 6,000 | -46% | 1 | 1 | 0% | 2,399 | 2,990 | +25% | 0 | 0 | — |
case-02 | pass→pass | 12,093 | 12,460 | +3% | 1 | 1 | 0% | 2,936 | 4,629 | +58% | 0 | 0 | — |
case-03 | fail→pass | 13,619 | 11,495 | -16% | 1 | 1 | 0% | 2,683 | 4,059 | +51% | 0 | 0 | — |
case-04 | fail→fail | 12,395 | 8,187 | -34% | 1 | 1 | 0% | 1,960 | 2,937 | +50% | 0 | 0 | — |
case-05 | pass→pass | 3,938 | 7,230 | +84% | 1 | 1 | 0% | 736 | 2,807 | +281% | 0 | 0 | — |
case-06 | pass→pass | 7,391 | 5,217 | -29% | 1 | 1 | 0% | 1,026 | 2,617 | +155% | 0 | 0 | — |
case-07 | pass→pass | 6,493 | 5,651 | -13% | 1 | 1 | 0% | 1,263 | 2,488 | +97% | 0 | 0 | — |
case-08 | pass→pass | 5,640 | 3,290 | -42% | 1 | 1 | 0% | 852 | 2,244 | +163% | 0 | 0 | — |
case-09 | pass→pass | 8,357 | 6,999 | -16% | 1 | 1 | 0% | 1,358 | 2,719 | +100% | 0 | 0 | — |
case-10 | pass→pass | 12,792 | 2,858 | -78% | 1 | 1 | 0% | 2,162 | 2,142 | -1% | 0 | 0 | — |
case-11 | pass→pass | 4,937 | 3,764 | -24% | 1 | 1 | 0% | 940 | 2,160 | +130% | 0 | 0 | — |
case-12 | pass→pass | 7,749 | 4,664 | -40% | 1 | 1 | 0% | 1,106 | 2,292 | +107% | 0 | 0 | — |
case-13 | pass→pass | 6,956 | 2,862 | -59% | 1 | 1 | 0% | 972 | 2,123 | +118% | 0 | 0 | — |
case-14 | pass→pass | 5,401 | 3,382 | -37% | 1 | 1 | 0% | 788 | 2,276 | +189% | 0 | 0 | — |
case-15 | pass→pass | 12,271 | 12,536 | +2% | 1 | 1 | 0% | 1,988 | 3,682 | +85% | 0 | 0 | — |
case-16 | pass→pass | 8,874 | 6,223 | -30% | 1 | 1 | 0% | 1,224 | 2,613 | +113% | 0 | 0 | — |
case-17 | fail→pass | 15,213 | 11,265 | -26% | 1 | 1 | 0% | 2,427 | 3,779 | +56% | 0 | 0 | — |
case-18 | pass→pass | 7,893 | 4,968 | -37% | 1 | 1 | 0% | 1,210 | 2,408 | +99% | 0 | 0 | — |
case-19 | pass→pass | 13,954 | 13,925 | -0% | 1 | 1 | 0% | 1,929 | 3,914 | +103% | 0 | 0 | — |
case-20 | pass→pass | 5,137 | 2,788 | -46% | 1 | 1 | 0% | 829 | 2,100 | +153% | 0 | 0 | — |
case-21 | pass→pass | 8,785 | 7,047 | -20% | 1 | 1 | 0% | 1,444 | 3,102 | +115% | 0 | 0 | — |
case-22 | pass→pass | 13,689 | 16,130 | +18% | 1 | 1 | 0% | 2,090 | 4,749 | +127% | 0 | 0 | — |
case-23 | pass→pass | 9,505 | 6,572 | -31% | 1 | 1 | 0% | 1,845 | 2,919 | +58% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +13 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.