GnistAI GnistAI
Log in

Wikidata

Structured knowledge base — entities, properties, and relationships from Wikidata.

Overview   |   MCP Docs   |   API Docs   |   OpenAPI   |   Playground   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 5 tools tools 5 5 Reference

Data source: Wikidata (Wikimedia)

MCP MCP Protocol

Endpoint https://context.gnist.ai/mcp/wikidata/
claude_desktop_config.json
{
  "mcpServers": {
    "gnist-wikidata": {
      "url": "https://context.gnist.ai/mcp/wikidata/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}
Shell
curl -X POST "https://context.gnist.ai/mcp/wikidata/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_wikidata_entity", "arguments": {"label": "example"}}}'

API REST API

API Root https://context.gnist.ai/rest/wikidata/

5 endpoints available:

Shell
curl "https://context.gnist.ai/rest/wikidata/search_wikidata_entity?label=example" \
  -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx

resp = httpx.get(
    "https://context.gnist.ai/rest/wikidata/search_wikidata_entity",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    params={
        "label": "example"
},
)
print(resp.json())

OpenAPI Spec  ·  Full API Docs

CLI Command Line

Command gc wikidata

CLI documentation will be available when the GnistAI SDK is published.

Install
pip install gnistai

Available Tools (5)

search_wikidata_entity
Search Wikidata for entities by name or alias.
ParameterTypeRequiredDescription
labelstringrequiredName or phrase to search for (e.g. "Barack Obama", "Apple Inc").
languagestringoptionalBCP-47 language code for labels and descriptions. Default "en". (default: "en")
limitintegeroptionalMaximum results to return (1–20, default 5). (default: 5)
get_wikidata_entity
Fetch a Wikidata entity with its statements, normalized to human-readable form.
ParameterTypeRequiredDescription
qidstringrequiredWikidata item ID (e.g. "Q76" for Barack Obama, "Q312" for Apple Inc).
get_wikidata_linked_ids
Return all external database identifiers for a Wikidata entity.
ParameterTypeRequiredDescription
qidstringrequiredWikidata item ID (e.g. "Q76" for Barack Obama).
wikidata_sparql
Execute a SPARQL query against the Wikidata Query Service.
ParameterTypeRequiredDescription
querystringrequiredSPARQL SELECT query string. Must be valid SPARQL 1.1.
timeout_sintegeroptionalQuery timeout in seconds (default 30, max 55). (default: 30)
report_feedback
Report a bug, feature request, or general feedback for this data source.
ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")

Related