KosmoKrator

data

Wikidata CLI for AI Agents

Use the Wikidata CLI from KosmoKrator to call Wikidata tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

Wikidata CLI Setup

Wikidata can be configured headlessly with `kosmokrator integrations:configure wikidata`.

Install, configure, and verify
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure wikidata --enable --read allow --write ask --json
kosmokrator integrations:doctor wikidata --json
kosmokrator integrations:status --json

Credentials

Authentication type: No credentials none. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

No credentials are required.

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call wikidata.wikidata_search_entities '{}' --json
Provider shortcut
kosmo integrations:wikidata wikidata_search_entities '{}' --json

Discovery

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

Discovery commands
kosmo integrations:docs wikidata --json
kosmo integrations:docs wikidata.wikidata_search_entities --json
kosmo integrations:schema wikidata.wikidata_search_entities --json
kosmo integrations:search "Wikidata" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

wikidata.wikidata_search_entities

Search Wikidata items or properties.

Read read
Parameters
none
Generic call
kosmo integrations:call wikidata.wikidata_search_entities '{}' --json
Shortcut
kosmo integrations:wikidata wikidata_search_entities '{}' --json

wikidata.wikidata_get_entities

Retrieve Wikidata entities by IDs or site/title pairs.

Read read
Parameters
none
Generic call
kosmo integrations:call wikidata.wikidata_get_entities '{}' --json
Shortcut
kosmo integrations:wikidata wikidata_get_entities '{}' --json

wikidata.wikidata_get_claims

Retrieve Wikidata claims for an entity, property, or claim ID.

Read read
Parameters
none
Generic call
kosmo integrations:call wikidata.wikidata_get_claims '{}' --json
Shortcut
kosmo integrations:wikidata wikidata_get_claims '{}' --json

wikidata.wikidata_sparql

Run a Wikidata Query Service SPARQL query.

Read read
Parameters
none
Generic call
kosmo integrations:call wikidata.wikidata_sparql '{}' --json
Shortcut
kosmo integrations:wikidata wikidata_sparql '{}' --json

wikidata.wikidata_entity_data_url

Build a Special:EntityData URL for JSON/RDF/Turtle/N-Triples/N3.

Read read
Parameters
none
Generic call
kosmo integrations:call wikidata.wikidata_entity_data_url '{}' --json
Shortcut
kosmo integrations:wikidata wikidata_entity_data_url '{}' --json

wikidata.wikidata_entity_page_url

Build a canonical Wikidata entity page URL.

Read read
Parameters
none
Generic call
kosmo integrations:call wikidata.wikidata_entity_page_url '{}' --json
Shortcut
kosmo integrations:wikidata wikidata_entity_page_url '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

wikidata.wikidata_search_entities 0 parameters
Schema command
kosmo integrations:schema wikidata.wikidata_search_entities --json
ParameterTypeRequiredDescription
No parameters.
wikidata.wikidata_get_entities 0 parameters
Schema command
kosmo integrations:schema wikidata.wikidata_get_entities --json
ParameterTypeRequiredDescription
No parameters.
wikidata.wikidata_get_claims 0 parameters
Schema command
kosmo integrations:schema wikidata.wikidata_get_claims --json
ParameterTypeRequiredDescription
No parameters.
wikidata.wikidata_sparql 0 parameters
Schema command
kosmo integrations:schema wikidata.wikidata_sparql --json
ParameterTypeRequiredDescription
No parameters.
wikidata.wikidata_entity_data_url 0 parameters
Schema command
kosmo integrations:schema wikidata.wikidata_entity_data_url --json
ParameterTypeRequiredDescription
No parameters.
wikidata.wikidata_entity_page_url 0 parameters
Schema command
kosmo integrations:schema wikidata.wikidata_entity_page_url --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.