qoery's API (0.1.0)

Download OpenAPI specification:

qoery Support: samuel.tinnerholm@gmail.com URL: https://qoery.com License: MIT

Every number on the internet, queryable. Instant access to millions of trusted statistics through a single natural language query or API call.

SDK Installation

Python SDK

Install from PyPI:

pip install qoery

PyPI: qoery

JavaScript SDK

Install from npm:

npm install qoery

npm: qoery

Queries

Natural language and SQL query execution

Natural Language Query

Submit a natural-language request and get back a curated time series response. The response also includes the generated SQL so you can switch to the SQL endpoint for faster/cheaper repeated queries.

Authorizations:
ApiKeyAuth

Responses

Request samples


curl "https://api.qoery.com/v0/query/nl" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"query": "population of France"}'

Response samples

Content type
application/json
{
  • "sql_query": "string",
  • "series": [
    ],
  • "metadata": { },
  • "description": "string"
}

SQL Query

Execute a read-only SELECT query and receive the results as curated time series. The response includes the executed SQL query and optional metadata.

Authorizations:
ApiKeyAuth

Responses

Request samples


curl "https://api.qoery.com/v0/query/sql" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"query": "SELECT * FROM series LIMIT 10"}'

Response samples

Content type
application/json
{
  • "series": [
    ],
  • "sql_query": "string",
  • "metadata": {
    }
}

Web Scraping

Web scraping and data extraction

Structured Web Scrape

Download a web page, and structured data as time series. Use query params html=true and/or markdown=true to include raw artifacts inline; otherwise artifact URLs are provided in artifacts.

Authorizations:
ApiKeyAuth
query Parameters
html
boolean
Default: false

Include page HTML inline in response

markdown
boolean
Default: false

Include page markdown inline in response

Responses

Request samples


curl "https://api.qoery.com/v0/scrape" \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/statistics"}'

Response samples

Content type
application/json
{
  • "series": [
    ],
  • "artifacts": {
    },
  • "cached": true,
  • "source_id": "string",
  • "metadata": {
    },
  • "html": "string",
  • "markdown": "string"
}

Usage

Usage statistics and rate limiting

Get usage statistics

Get current usage and rate limit information per endpoint

Authorizations:
ApiKeyAuth
query Parameters
uid
required
string <uuid>

User ID (UUID)

Responses

Request samples


curl "https://api.qoery.com/v0/usage?uid=your-user-id" \
  -H "X-API-Key: your-api-key"

Response samples

Content type
application/json
{
  • "period_start": "2019-08-24T14:15:22Z",
  • "period_end": "2019-08-24T14:15:22Z",
  • "plan": "string",
  • "endpoints": {
    }
}