HTTP API
Query with SQL via the HTTP API
Data may be queried by posting SQL to the /v1/sql
API and /v1/firesql
API for Firecached data. For documentation on the Spice Firecache see .
See Tables for a list of tables to query or browse the example queries listed in the menu.
Requirements and limitations
An API key is required for all SQL queries.
Results are limited to 500 rows. Use the Apache Arrow Flight API to fetch up to 1M rows in a single query or the Async HTTP API to fetch results with paging.
Requests are limited to 90 seconds.
Execute a SQL query and return the results.\n\nThis endpoint allows users to execute SQL queries directly from an HTTP request. The SQL query is sent as plain text in the request body.
The format of the response, one of 'application/json' (default), 'application/vnd.spiceai.sql.v1+json', 'text/csv' or 'text/plain'.
SpiceAI SQL v1+json result
Bad Request
Internal Server Error
POST /v1/sql HTTP/1.1
Host: data.spiceai.io
X-API-KEY: YOUR_API_KEY
Accept: text
Content-Type: application/json
Content-Length: 2
{}
{}
Last updated
Was this helpful?