SPARQL Query Runner
Pricing
from $0.35 / 1,000 bindings
SPARQL Query Runner
Point at ANY public SPARQL endpoint (Wikidata, DBpedia, UniProt, government & museum Linked-Open-Data) and run a query over the W3C SPARQL 1.1 Protocol. SELECT flattens to dynamic columns per binding, ASK to a boolean, CONSTRUCT/DESCRIBE to triples. One actor, any knowledge graph. Pay per binding.
Pricing
from $0.35 / 1,000 bindings
Rating
0.0
(0)
Developer
Datamule
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
0
Monthly active users
22 days ago
Last modified
Categories
Share
Point at ANY public SPARQL endpoint, send a query, get a dataset. One actor speaks to every knowledge graph in the Linked-Open-Data world over the W3C SPARQL 1.1 Protocol — no per-site scraper, no host enumeration.
SPARQL is the query language of the semantic web. Wikidata, DBpedia, UniProt / EBI (life sciences), Bio2RDF, the EU / EEA and national-library / museum Linked-Open-Data endpoints, and thousands of government open-data triplestores all serve the identical protocol. Give this actor an endpoint URL and a SPARQL query and it turns the result straight into rows.
Quick start: top 3 countries by population from Wikidata (3 rows, about $0.0015)
Typical job: run a SPARQL SELECT query against a public knowledge graph and get the result as a table you can export to CSV, Excel or JSON.
- Paste this into the Input tab (JSON view):
{"endpoint": "https://query.wikidata.org/sparql","query": "SELECT ?country ?countryLabel ?population WHERE { ?country wdt:P31 wd:Q3624078 . ?country wdt:P1082 ?population . SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\" } } ORDER BY DESC(?population) LIMIT 3","maxRecords": 3}
- Select Start.
- Open the dataset. Each SELECT variable is its own column.
Real output from a local run of this exact input on 2026-09-25 (_raw and empty ASK/triple columns omitted):
| country | countryLabel | population |
|---|---|---|
| http://www.wikidata.org/entity/Q148 | People's Republic of China | 1404890000 |
| http://www.wikidata.org/entity/Q668 | India | 1326093247 |
| http://www.wikidata.org/entity/Q30 | United States | 340110988 |
Values come live from Wikidata, so they change when the source is edited. To change the job, edit the query (its variables become your columns) and keep maxRecords or a LIMIT so the bill stays bounded. The Input tab opens prefilled with this same query and cap. For a quick endpoint health check instead, use the ASK { ?s ?p ?o } example below; it returns one true/false row per endpoint, not data.
What it does
Sends your query to the endpoint with Accept: application/sparql-results+json and
flattens the response. The output shape follows the query form:
| Query form | Output |
|---|---|
| SELECT | One row per result binding. Each SELECT variable becomes a top-level column equal to its .value — the columns are literally your query's variables. A variable left unbound in a binding (e.g. an OPTIONAL that didn't match) is null. The full typed binding (uri / literal / bnode, datatype, xml:lang) is preserved losslessly in _raw. |
| ASK | A single row: { "_queryType": "ask", "boolean": true/false }. |
| CONSTRUCT / DESCRIBE | Best-effort: the query is sent with Accept: application/n-triples and one row is emitted per triple (subject / predicate / object). If the endpoint won't return N-Triples, the source is skipped with a warning (never fabricated). |
Every row carries _endpoint, _queryType, _rowIndex and _raw.
Input
| Field | Description |
|---|---|
endpoint | A SPARQL endpoint URL, e.g. https://query.wikidata.org/sparql. Required unless endpoints is given. |
endpoints | Optional: run the same query across several endpoints (mirrors / cross-KG). Each row is tagged with its _endpoint. |
query | Required for custom requests. The ready-to-run example and form prefill use the Wikidata top-3 SELECT above; SELECT / ASK are primary and CONSTRUCT / DESCRIBE best-effort. |
method | GET (default) or POST (for queries too long for a URL). |
maxRecords | Optional global cap on rows across all endpoints (one billable event per row). |
userAgent | Optional override. A descriptive User-Agent is sent by default — required in practice for Wikidata, which blocks blank / generic UAs. |
defaultGraphUri / namedGraphUri | Optional SPARQL-protocol dataset graph parameters. |
timeoutSecs | Optional read timeout (default 90s; endpoints enforce their own server-side caps). |
bearer / extraHeaders | Optional, for auth-gated deployments. Never required, never logged. |
Examples
All-purpose portable query (works on almost any endpoint):
{ "endpoint": "https://dbpedia.org/sparql", "endpoints": ["https://sparql.uniprot.org/sparql"], "query": "ASK { ?s ?p ?o }", "maxRecords": 2 }
Wikidata — countries and their population (dynamic columns country, countryLabel, population):
{"endpoint": "https://query.wikidata.org/sparql","query": "SELECT ?country ?countryLabel ?population WHERE { ?country wdt:P31 wd:Q3624078 . OPTIONAL { ?country wdt:P1082 ?population } SERVICE wikibase:label { bd:serviceParam wikibase:language \"en\" } } LIMIT 50"}
Resilience
An endpoint that returns a 4xx/5xx, times out, or answers with a non-SPARQL body (an HTML error / anti-bot page, a SPARQL syntax-error response) is skipped with a warning and the batch continues. A run where every endpoint is skipped fails so nothing broken ships. A reachable endpoint that returns 0 bindings yields 0 rows and a clean success.
Pricing
Pay-per-event: one binding charge per emitted row.
Your max run charge is respected: each row is billed as it is written, the Actor checks the remaining budget before every endpoint request, and it stops before any row you have not paid for (a budget below one row makes no request).
| Run | Rows | Cost at the FREE tier ($0.0005 per row) |
|---|---|---|
| Quick start above | 3 | $0.0015 |
| ASK health check (2 endpoints) | 2 | $0.001 |
| Wikidata countries example (LIMIT 50) | up to 50 | up to $0.025 |
| 1,000 rows | 1,000 | $0.50 |
Paid Apify plans get a lower per-row price (down to $0.00025). If you leave maxRecords empty and the query has no LIMIT, you pay for every row the endpoint returns.