Wikidata API and MCP server for AI agents

Let Claude, ChatGPT or your own agent read Wikidata. No Wikidata API key needed.

Add to your agent

Paste this into Claude Code, Cursor, Codex or any agent. It adds the server itself.

Read https://bowmark.ai/sites/wikidata.md and add Bowmark's Wikidata MCP server to my agent.

Functions

Open a function to see its parameters and run it with your own API key.

  • getEntityReads one Wikidata entity (Q item or P property) via wbgetentities: label, description, aliases, simplified claims keyed by property id, and…

    POST /v1/sites/wikidata/getEntity

    Parameters

    Default "en".

    curl -X POST https://api.bowmark.ai/v1/sites/wikidata/getEntity \
      -H "Authorization: Bearer $BOWMARK_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"args":{"id":"Q42"}}'
    Sign in to run
    Responsereturns WikidataEntity | null
    interface WikidataClaimValue {
      value: string; // entity id for item/property values, else the literal
      type: string; // "entity", "string", "time", "quantity" …
    }
    
    interface WikidataEntity {
      id: string;
      label: string | null;
      description: string | null;
      aliases: string[];
      claims: Record<string, WikidataClaimValue[]>; // by property id, e.g. P31
      sitelinks: Record<string, string>; // site key → page title
      url: string;
    }
  • sparqlRuns a SPARQL query against the public Wikidata Query Service and returns the variables and rows of plain string values.

    POST /v1/sites/wikidata/sparql

    Parameters

    A SPARQL SELECT/ASK query.

    curl -X POST https://api.bowmark.ai/v1/sites/wikidata/sparql \
      -H "Authorization: Bearer $BOWMARK_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"args":{"query":"SELECT ?c WHERE { ?c wdt:P31 wd:Q6256 } LIMIT 2"}}'
    Sign in to run
    Responsereturns WikidataSparqlResult
    interface WikidataSparqlResult {
      variables: string[];
      rows: Record<string, string | null>[];
    }