Skip to main content
POST
/
api
/
wikidata
/
sparql
/wikidata/sparql
curl --request POST \
  --url https://api.anysite.io/api/wikidata/sparql \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "query": "<string>",
  "timeout": 300
}
'
[
  {
    "@type": "@wikidata_sparql_row",
    "bindings": []
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
query
string
required

A SPARQL 1.1 query to run against the Wikidata Query Service

Minimum string length: 1
Example:

"SELECT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q146. SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\". } } LIMIT 10"

timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500

Response

Successful Response

@type
string
default:@wikidata_sparql_row
bindings
WikidataSparqlBinding · object[]