# SiteCheck Wikidata SPARQL Query

> SiteCheck Wikidata SPARQL Query is a paid API for AI agents from api.sitecheck-api.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-11-22).

Executes a SPARQL SELECT or ASK query against the Wikidata knowledge base and returns structured tabular results

## Facts

- Endpoint: GET https://api.sitecheck-api.workers.dev/api/wikidata?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sitecheck-wikidata-sparql-query-af4cb3dc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TFs523V5fbfrQ-WJLenq1

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability sitecheck-wikidata-sparql-query-af4cb3dc
```

Example prompt: Run this SPARQL query against Wikidata and give me the results: SELECT ?country ?countryLabel WHERE { ?country wdt:P31 wd:Q6256 . SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } } LIMIT 10

## When to prefer this

Choose this endpoint when you need structured, linked open data from Wikidata using SPARQL — especially for queries involving entity relationships, class memberships, or property-based filtering across the Wikidata knowledge graph. It is ideal for encyclopedic lookups (countries, people, organizations, scientific concepts) where the data is well-represented in Wikidata and you need tabular results with entity URIs and English labels.

## Known failure modes

- Invalid SPARQL syntax returns an error response
- Query exceeds 4,000 character limit and is rejected
- Timeout if the SPARQL query is too complex or returns too many rows
- Unknown Wikidata property or entity QID returns empty result set
- Network connectivity issues to the Wikidata SPARQL endpoint

## How this service works

Runs a read-only SPARQL query on Wikidata and returns the rows as plain values (ASK returns true or false). Only SELECT and ASK are allowed; updates are refused. A LIMIT of 100 or less is added when missing. 8-second limit. Data is CC0.

## Output

Returns a JSON object with an array of result rows (each row is a key-value map of column names to values or URIs), the original SPARQL query, the source URL, column names, total row count, the timestamp of the check, and a CC0 attribution to Wikidata.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "query"
     ],
     "properties": {
      "query": {
       "type": "string",
       "description": "A SPARQL SELECT or ASK query, up to 4,000 characters"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "rows": [
   {
    "city": "http://www.wikidata.org/entity/Q750",
    "cityLabel": "Bolivia"
   },
   {
    "city": "http://www.wikidata.org/entity/Q754",
    "cityLabel": "Trinidad and Tobago"
   },
   {
    "city": "http://www.wikidata.org/entity/Q757",
    "cityLabel": "Saint Vincent and the Grenadines"
   }
  ],
  "query": "SELECT ?city ?cityLabel WHERE { ?city wdt:P31 wd:Q6256 . SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". } } LIMIT 3",
  "source": "https://query.wikidata.org/sparql",
  "columns": [
   "city",
   "cityLabel"
  ],
  "rowCount": 3,
  "checkedAt": "2026-10-14T07:01:31.494Z",
  "attribution": "Wikidata (CC0)"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sitecheck-wikidata-sparql-query-af4cb3dc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.sitecheck-api.workers.dev](https://www.zero.xyz/host/api.sitecheck-api.workers.dev/llms.txt)
