Overview
SnakeQuery provides a simple REST API that transforms natural language queries into structured data operations. This API is designed for server-side applications and backend services where API keys can be securely stored.Backend Services Only: Never expose your API key in client-side code. This API should only be used from secure server environments.
Base URL
Authentication
SnakeQuery API uses Bearer token authentication. Include your API key in the Authorization header:Getting Your API Key
- Visit SnakeQuery Dashboard
- Sign up or log in to your account
- Navigate to the Setup section
- Copy your API key
Keep your API key secure and never commit it to version control. Use environment variables to store it safely.
Content Type
All requests must include theContent-Type
header:
Error Handling
HTTP Status Codes
Status Code | Description |
---|---|
200 | Success |
400 | Bad Request - Invalid query or parameters |
401 | Unauthorized - Invalid or missing API key |
402 | Payment Required - Insufficient credits |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |
504 | Gateway Timeout - Request processing timeout |
Error Response Format
Common Error Codes
INVALID_API_KEY
: The provided API key is invalid or expiredINSUFFICIENT_CREDITS
: Account has run out of query creditsINVALID_QUERY
: The natural language query is malformedINVALID_SCHEMA
: The provided response schema is invalidFETCH_ERROR
: Unable to fetch data from the provided URLRATE_LIMIT_EXCEEDED
: Too many requests in the time window
Quick Start Example
SDKs and Libraries
While you can use the REST API directly with Fetch, we recommend using our official SDKs for better developer experience:Next Steps
- Learn about the Query endpoint - the core of SnakeQueryβs functionality
- Explore advanced features like response schemas for structured data
- Check out best practices for optimal performance
π¬ Community & Support
- Node.js SDK Discussions - Node.js specific questions and community
- Python SDK Discussions - Python specific questions and community
- Support Email - Direct technical support