Atlas / Skills / brycewang-stanford / Wikidata Api Guide

Wikidata Api GuideSAFE

skills/brycewang-stanford/wikidata-api-guide

🔬 A curated collection of 23,000+ agent skills for empirical research across 8 social science disciplines. | 精选 23,000+ AI Agent 技能库,覆盖8大社会科学学科的实证研究。CoPaper.AI 20分钟完成一篇可复现的规范实证论文,并支持用户上传 Skills。-- Maintained by CoPaper.AI from Stanford REAP.

Verdict
SAFE
Grade
B
Trust score
89 /100
Version
—
Hosts
1 documented
License
NOASSERTION
Stars
4,537
01

Overview

🔬 A curated collection of 23,000+ agent skills for empirical research across 8 social science disciplines. | 精选 23,000+ AI Agent 技能库,覆盖8大社会科学学科的实证研究。CoPaper.AI 20分钟完成一篇可复现的规范实证论文,并支持用户上传 Skills。-- Maintained by CoPaper.AI from Stanford REAP.

Read from source at commit e1ba289846fdOBSERVED · 2026-10-08
02

Host compatibility

What the documentation claims. We have not run a compatibility test.

HostStatusNotes
openclawmentioned
03

What it tells the agent

The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.

---
name: wikidata-api-guide
description: "Query Wikidata SPARQL for scholarly metadata, authors, and entities"
metadata:
  openclaw:
    emoji: "🌐"
    category: "literature"
    subcategory: "metadata"
    keywords: ["wikidata", "sparql", "linked-data", "metadata", "knowledge-graph", "scholarly"]
    source: "https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service"
---

# Wikidata SPARQL API Guide

## Overview

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.

## Authentication

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)"
```

## Core Endpoints

### SPARQL Query Endpoint

```
GET https://query.wikidata.org/sparql?query={SPARQL}&format=json
```

**Parameters:**
- `query` (required): URL-encoded SPARQL query
- `format`: Response format (`json`, `xml`, `csv`, `tsv`)

### Query: Find Papers by a Researcher (via ORCID)

```bash
curl -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"
```

### Query: Journal Impact and Article Counts

```sparql
SELECT ?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
```

### Python Example: Cross-Reference Author Identifiers

```python
import 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')}")
```

### Query: Institutions by Country with Coordinates

```sparql
SELECT ?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
```

## Common Research Patterns

**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.

## Rate Limits and Best Practices

- **Query timeout:** 60 seconds; optimize complex queries with filters and limits
- **Request rate:** No strict published limit, but keep requests under 1 per second for sustained usage
- **User-Agent required:** Always include a descriptive User-Agent header identifying your application
- **LIMIT clause:** Always include a LIMIT clause to prevent accidentally fetching millions of results
- **Label service:** Use `SERVICE wikibase:label` for human-readable labels instead of QIDs
- **Caching:** Wikidata results are fairly stable; cache results for repeated queries
- **Bulk queries:** For large-scale data extraction, consider using Wikidata du
04

Trust audit

SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeNA
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
none-observed
Network
none-observed
Shell
none-observed
Dependencies
pinned
Secrets in source
none-found

Findings (0)

No findings outside the package's declared scope.

Gates applied: no_behavioural_pass.

Audited 2026-10-08 · audit v0.4.1 · source sha e1ba289846fdfull audit observations/trust-audit/skill/brycewang-stanford__wikidata-api-guide.json · Report an issue / request a re-scan
05

Audit history

Every audit this skill has had.

DateSourceVerdictGradeScoreChange
2026-10-08e1ba289846fdSAFEB89first audit
06

Questions

What does the Wikidata Api Guide skill do?

🔬 A curated collection of 23,000+ agent skills for empirical research across 8 social science disciplines. | 精选 23,000+ AI Agent 技能库,覆盖8大社会科学学科的实证研究。CoPaper.AI 20分钟完成一篇可复现的规范实证论文,并支持用户上传 Skills。-- Maintained by CoPaper.AI from Stanford REAP.

Is Wikidata Api Guide safe to install?

The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.

What can Wikidata Api Guide access on my machine?

The audit observed no filesystem, network or shell use at all in its source.

Which assistants does Wikidata Api Guide work with?

Its documentation mentions openclaw. That is what the text claims, not a compatibility test we ran.

How current is this page?

The grade is for one exact copy of the source (e1ba289846fd), read on 2026-10-08. The repository is watched, and a new audit runs when it changes — this is the first audit.

Advertisement