Wikidata SPARQL Scraper - Run SPARQL Queries
Pricing
from $0.50 / 1,000 row scrapeds
Wikidata SPARQL Scraper - Run SPARQL Queries
Run SPARQL queries against the Wikidata Query Service and stream the results as a dataset.
Pricing
from $0.50 / 1,000 row scrapeds
Rating
0.0
(0)
Developer
Gio
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
Wikidata SPARQL Scraper
Run SPARQL queries against the Wikidata Query Service (query.wikidata.org) and get the rows back as a dataset, one flattened binding per row.
For knowledge-graph mining, structured data extraction, research datasets, entity enrichment.
Input
| Field | Type | Description |
|---|---|---|
query | String (required) | Your SPARQL query. The Wikidata endpoint enforces a 60s execution timeout. |
maxItems | Integer | Cap on rows pushed (after the query's LIMIT). Default 200, max 10000. |
Output
Each row flattens one SPARQL binding. For every variable ?x, the dataset gets:
x— the valuex_type—uri/literal/bnodex_lang— language tag (literals only)x_datatype— datatype URI (literals only)
{"country": "http://www.wikidata.org/entity/Q30", "country_type": "uri","countryLabel": "United States of America", "countryLabel_type": "literal", "countryLabel_lang": "en","capital": "http://www.wikidata.org/entity/Q61", "capital_type": "uri","capitalLabel": "Washington, D.C.", "capitalLabel_type": "literal", "capitalLabel_lang": "en"}
Example queries
Sovereign states + capitals:
SELECT ?country ?countryLabel ?capital ?capitalLabel WHERE {?country wdt:P31 wd:Q3624078.?country wdt:P36 ?capital.SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }}
All Nobel Prize winners:
SELECT ?person ?personLabel ?prizeLabel ?year WHERE {?person wdt:P166 ?prize .?prize wdt:P31/wdt:P279* wd:Q7191 .OPTIONAL { ?person p:P166 ?stmt . ?stmt ps:P166 ?prize . ?stmt pq:P585 ?date . BIND(YEAR(?date) AS ?year) }SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }}LIMIT 1000
Pricing
$0.0005/row.
Limitations
- Query timeout is 60s server-side. Heavy queries should add
LIMITand use specific entity filters. - Wikidata enforces a courteous-use User-Agent; this actor sets one automatically.
If this actor helped you, please leave a review on the Apify Store.