Knowledge Graphs • SPARQL + Wikimedia REST

Wikidata SPARQL and Wikipedia Summary MCP

Entity disambiguation agents need both structured Wikidata Q-ID graph traversal and clean introductory prose summaries. Pair wikidata_sparql and wikipedia_rest_summary to ground named entities accurately.

Gateway Runtime0-LLM Stdlib
Featured Organs2 Verified
Live Probe Avg1050 ms
Empty / Error Cost$0.00

W3C SPARQL JSON Bindings Without Custom RDF Toolchains

wikidata_sparql executes GET /sparql?query={sparql_query}&format=json with a compliant descriptive User-Agent, returning head and results.bindings arrays (e.g., querying instances of Artificial Intelligence wd:Q11660).

Fast Entity Grounding via Wikipedia REST v1

Once an entity title is resolved, wikipedia_rest_summary calls /api/rest_v1/page/summary/{title} to retrieve displaytitle, wikibase_item, and namespace metadata, returning $0 on HyperSwitch not_found 404s.

Live-Verified Organ Matrix & Schema Fields

Primary upstream endpoint for wikidata_sparql: https://query.wikidata.org/sparql?query={sparql_query}&format=json. Empty-result guard: Return non-billable empty result if results.bindings is empty.

Organ & MCP ToolAPI & SubdomainProtocolCache TTLLive ProbeVerified Sample Fields
wikidata_sparql
MCP: airesearch_wikidata_sparql
Wikidata Query Service SPARQL API
open_benchmarks_knowledge
sparql7d (604800s)HTTP 200 (900 ms)head, results, results.bindings[0].item, results.bindings[0].itemLabel
wikipedia_rest_summary
MCP: airesearch_wikipedia_rest_summary
Wikipedia REST Page Summary API
open_benchmarks_knowledge
rest_json7d (604800s)HTTP 200 (1201 ms)type, title, displaytitle, namespace, wikibase_item

Invoke via Streamable HTTP MCP or REST

Connect to https://devour-ai.fastmesh.dev/mcp or SuperBus https://mcp.fastmesh.dev/mcp (JSON-RPC 2.0):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "airesearch_wikidata_sparql",
    "arguments": {
      "sparql_query": "SELECT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q11660. SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". } } LIMIT 2"
    }
  }
}

Or call the deterministic REST endpoint directly:

curl -sS -X POST https://devour-ai.fastmesh.dev/v1/organs/wikidata_sparql/invoke \
  -H "Content-Type: application/json" \
  -d '{"params": {"sparql_query": "SELECT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q11660. SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". } } LIMIT 2"}}'

Technical FAQ

How are Wikidata 60-second query timeouts prevented?

Use explicit LIMIT clauses in SPARQL queries; 7-day caching eliminates duplicate graph traversals.

Related Research Organ Guides