SPARQL Query
sparql_queryExecute SPARQL SELECT queries against public HTTPS SPARQL endpoints to retrieve data from open data portals and knowledge graphs.
Instructions
Execute a SPARQL SELECT query against any public HTTPS SPARQL endpoint.
Useful for querying open data portals and knowledge graphs that expose SPARQL endpoints, including:
data.europa.eu (European open data portal)
publications.europa.eu (EU Publications Office)
DBpedia, Wikidata
Any DCAT-AP compliant data catalog
Only HTTPS endpoints are allowed. Queries timeout after 15 seconds. Only SELECT queries are supported (read-only).
If the query does not contain a LIMIT clause, one is injected automatically (default: 25, max: 1000).
Args:
endpoint_url (string): HTTPS URL of the SPARQL endpoint
query (string): SPARQL SELECT query to execute
limit (number): Max rows to return (default: 25). Ignored if query already contains LIMIT.
response_format ('markdown' | 'json'): Output format
Examples:
Count Italian HVD datasets by publisher on data.europa.eu
Query Wikidata for entities related to a dataset topic
Explore EU controlled vocabularies on publications.europa.eu
Typical workflow: sparql_query (explore schema) → sparql_query (targeted query) → ckan_package_search (get dataset details)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max rows to return (default: 25, max: 1000). Injected as SPARQL LIMIT if not already present in query. | |
| query | Yes | SPARQL SELECT query to execute | |
| endpoint_url | Yes | HTTPS URL of the SPARQL endpoint | |
| response_format | No | Output format: 'markdown' for human-readable or 'json' for machine-readable | markdown |