# Wikidata on Onekey > 7 endpoints for Wikidata (7 stable, 0 beta), 1 to 5 credits each. Category: Knowledge & reference. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/wikidata Reference (Markdown): https://onekey.dev/docs/api/wikidata.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 7 mapped Wikidata endpoints return each: - `entity.id` (string): 6 - `entity.name` (string): 5 - `entity.description` (string): 4 - `content.title` (string): 1 - `content.url` (URL): 1 - `entity.stats.rank` (integer): 1 - `entity.url` (URL): 1 - plus 3 platform-specific fields under `ext.` ## Endpoints ### wikidata.entity Wikidata item: id, English label and description. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/wikidata/entity?id=Q42` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): Wikidata item id, e.g. Q42 - Fields returned: `entity.id`, `entity.name`, `entity.description` - Reference: https://onekey.dev/docs/api/wikidata/entity.md ### wikidata.instance_of Wikidata 'instance of' (P31) statements of an item. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/wikidata/instance_of?id=Q42` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): Wikidata item id, e.g. Q42 - Fields returned: `entity.id`, `entity.stats.rank`, `ext.property` - Reference: https://onekey.dev/docs/api/wikidata/instance_of.md ### wikidata.property Wikidata property: id, label, description and datatype. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/wikidata/property?id=P31` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): Wikidata property id, e.g. P31 - Fields returned: `entity.id`, `entity.name`, `entity.description`, `ext.dataType` - Reference: https://onekey.dev/docs/api/wikidata/property.md ### wikidata.search Search Wikidata items by label. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/wikidata/search?q=douglas%20adams` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search query - Fields returned: `entity.id`, `entity.name`, `entity.description`, `entity.url` - Reference: https://onekey.dev/docs/api/wikidata/search.md ### wikidata.search_property Search Wikidata properties by label. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/wikidata/search_property?q=instance%20of` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search query - Fields returned: `entity.id`, `entity.name`, `entity.description` - Reference: https://onekey.dev/docs/api/wikidata/search_property.md ### wikidata.sitelinks Wikipedia sitelinks (English) of a Wikidata item. - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/wikidata/sitelinks?id=Q42` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): Wikidata item id, e.g. Q42 - Fields returned: `content.title`, `content.url` - Reference: https://onekey.dev/docs/api/wikidata/sitelinks.md ### wikidata.sparql Run a read-only SPARQL SELECT on Wikidata (variables ?item, ?itemLabel, ?value). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/wikidata/sparql?q=SELECT%20%3Fitem%20%3FitemLabel%20WHERE%20%7B%20%3Fitem%20wdt%3AP31%20wd%3AQ146%20.%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20%7D%20%7D%20LIMIT%203` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): SPARQL SELECT query (<=250 chars) - Fields returned: `entity.id`, `entity.name`, `ext.value` - Reference: https://onekey.dev/docs/api/wikidata/sparql.md ## Sample request ```bash curl "https://api.onekey.dev/v1/wikidata/entity?id=Q42" \ -H "x-api-key: YOUR_API_KEY" ```