Wikidata SPARQL — Run Any Query, Get Flat Rows avatar

Wikidata SPARQL — Run Any Query, Get Flat Rows

Pricing

from $1.00 / 1,000 results

Go to Apify Store
Wikidata SPARQL — Run Any Query, Get Flat Rows

Wikidata SPARQL — Run Any Query, Get Flat Rows

Run a SPARQL query against Wikidata and get flat rows — one row per result, with the columns named by the variables you selected. Free public endpoint, no key.

Pricing

from $1.00 / 1,000 results

Rating

0.0

(0)

Developer

alaudin burki

alaudin burki

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Categories

Features

Limited permissions

Share

Run a SPARQL query against Wikidata and get flat rows — one row per result, with the columns named by the variables you selected. Free public endpoint, no key.

This is the generalist: instead of a fixed schema, it returns whatever your query asked for.

What you get

Whatever variables your SELECT names. Each cell is unwrapped from SPARQL's {type, value} form, so ?countryLabel becomes a countryLabel field. Plus id and source.

Sample output

{ "id": "sparql:http://www.wikidata.org/entity/Q142",
"countryLabel": "France", "pop": "68605616" }

Limitations

  • You must write correct SPARQL, and the query is sent as-is. An invalid query returns a 400 from Wikidata, surfaced as an error rather than a result.
  • Complex property paths time out. wdt:P31/wdt:P279* across a large class can exceed Wikidata's query budget; the Actor allows 120 seconds, but a genuinely expensive query will still fail. Narrow it with VALUES, LIMIT or a specific class.
  • Cells are strings, because SPARQL returns everything as a literal or a URI — pop above is "68605616", not a number.
  • Use SERVICE wikibase:label to get readable labels; without it you get bare QIDs.
  • Wikidata is community-edited and changes; and its endpoint is a shared public resource, so run infrequently and with LIMIT.

Pricing

Pay per result.

Fields

FieldTypeWhat it holds
idstringStable row id, prefixed sparql: and taken from the first projected variable.
sourcestringAlways wikidata-sparql, so rows from several runs can be told apart.