Data source: Wikidata (Wikimedia)
https://context.gnist.ai/rest/wikidata/
AuthenticationAll requests require a Gnist-API-Key header (or api_key query parameter).
Free tier: 100 calls/day. Get your API key.
Tools (5)
search_wikidata_entitySearch Wikidata for entities by name or alias.
Resolves a natural-language label to one or more Wikidata QIDs. Use this
as the entry point before calling get_wikidata_entity or get_wikidata_linked_ids.
Args:
label: Name or phrase to search for (e.g. "Barack Obama", "Apple Inc").
language: BCP-47 language code for labels and descriptions. Default "en".
limit: Maximum results to return (1–20, default 5).
Returns:
Dictionary with 'count' and 'results' list. Each result has qid, label,
description, and aliases.
| Parameter | Type | Required | Description |
|---|---|---|---|
label | string | required | Name or phrase to search for (e.g. "Barack Obama", "Apple Inc"). |
language | string | optional | BCP-47 language code for labels and descriptions. Default "en". (default: "en") |
limit | integer | optional | Maximum results to return (1–20, default 5). (default: 5) |
{
"label": "example"
}get_wikidata_entityFetch a Wikidata entity with its statements, normalized to human-readable form.
Returns the entity's label, description, aliases, and all non-deprecated
statements as {property_label: [values]} pairs. Property labels are resolved
to English names (e.g. "P569" → "date of birth").
Args:
qid: Wikidata item ID (e.g. "Q76" for Barack Obama, "Q312" for Apple Inc).
Returns:
Entity metadata including statements dict. Statement values are normalized:
dates as YYYY-MM-DD, quantities as numbers, entities as "Label (QID)",
coordinates as "lat, lon".
| Parameter | Type | Required | Description |
|---|---|---|---|
qid | string | required | Wikidata item ID (e.g. "Q76" for Barack Obama, "Q312" for Apple Inc). |
{
"qid": "example"
}get_wikidata_linked_idsReturn all external database identifiers for a Wikidata entity.
Fetches all external-id type statements: IMDb, VIAF, ISNI, MusicBrainz,
GeoNames, OpenCorporates, Freebase, PubMed, ORCID, and many others.
This is the bridge between Wikidata and every other database in the MCP toolbox.
Args:
qid: Wikidata item ID (e.g. "Q76" for Barack Obama).
Returns:
Dictionary with 'qid', 'label', 'wikidata_url', and 'identifiers' —
a flat map of {database_name: identifier_value}.
| Parameter | Type | Required | Description |
|---|---|---|---|
qid | string | required | Wikidata item ID (e.g. "Q76" for Barack Obama). |
{
"qid": "example"
}wikidata_sparqlExecute a SPARQL query against the Wikidata Query Service.
Use for complex relational queries not covered by other tools — e.g.
"all EU heads of state born after 1970", "Nobel Prize winners in physics since 2000",
"companies headquartered in Oslo with stock exchange listings".
The Wikidata SPARQL endpoint uses Blazegraph. Queries must use Wikidata prefixes:
- wd: (entities), wdt: (direct claims), wikibase:, rdfs:label
Example: SELECT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q146. SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } }
Args:
query: SPARQL SELECT query string. Must be valid SPARQL 1.1.
timeout_s: Query timeout in seconds (default 30, max 55).
Returns:
Dictionary with 'columns' list and 'rows' list. Each row is a
{variable: value} dict with string values.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | required | SPARQL SELECT query string. Must be valid SPARQL 1.1. |
timeout_s | integer | optional | Query timeout in seconds (default 30, max 55). (default: 30) |
{
"query": "example"
}report_feedbackReport a bug, feature request, or general feedback for this data source.
Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.
Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |
{
"feedback": "example"
}Quick Start
curl -X POST "https://context.gnist.ai/rest/wikidata/search_wikidata_entity" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"label": "example"}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/rest/wikidata/search_wikidata_entity",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={
"label": "example"
},
)
print(resp.json())