Closed dpriskorn closed 2 months ago
we don't convert queries yet - i intend to try that tommorow using an LLM
HTTPException: 404: QueryBadFormed: A bad request has been sent to the endpoint: probably the SPARQL query is badly formed. Response: b'{\n "exception": "Invalid SPARQL query: Prefix wdt was not registered using a PREFIX declaration",\n "metadata": {\n "line": 5,\n "positionInLine": 8,\n "query": "#\\n\\nSELECT ?item ?itemLabel\\nWHERE {\\n ?item wdt:P31 wd:Q146. # Must be a cat\\n SERVICE wikibase:label { bd:serviceParam wikibase:language \\"[AUTO_LANGUAGE],en\\". }\\n}\\n",\n "startIndex": 43,\n "stopIndex": 49\n },\n "query": "#\\n\\nSELECT ?item ?itemLabel\\nWHERE {\\n ?item wdt:P31 wd:Q146. # Must be a cat\\n SERVICE wikibase:label { bd:serviceParam wikibase:language \\"[AUTO_LANGUAGE],en\\". }\\n}\\n",\n "resultsize": 0,\n "status": "ERROR",\n "time": {\n "computeResult": 0,\n "total": 0\n }\n}'
curl -X 'GET' \
'https://snapquery.bitplan.com/api/query/wikidata-examples/cats.csv'
works as well as:
curl -X 'GET' \
'https://snapquery.bitplan.com/api/query/wikidata-examples/cats.github?limit=5'
SELECT ?item ?itemLabel
WHERE {
?item wdt:P31 wd:Q146. # Must be a cat
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
LIMIT 5
item | itemLabel |
---|---|
http://www.wikidata.org/entity/Q378619 | CC |
http://www.wikidata.org/entity/Q498787 | Muezza |
http://www.wikidata.org/entity/Q677525 | Orangey |
http://www.wikidata.org/entity/Q851190 | Mrs. Chippy |
http://www.wikidata.org/entity/Q893453 | Unsinkable Sam |
-> 404