Our API supports sampling on all /results
endpoints to provide a uniform sample of the dataset for efficient data analysis and visualization. This feature is particularly useful for use cases like charting (if you only have 4 000 pixels on the chart, then 10 000 datapoints are plenty), where analyzing a full dataset isn’t necessary. Sampling returns a subset (with a uniform distribution) of data, optimizing usage of very large results with reduced latency and costs. You can apply sampling to the following endpoints:
sample_count
integer
sample_count
, the entire dataset is returned.sample_count
(e.g., sample_count = 10000
), the number is approximate. The actual number of rows returned may vary slightly (e.g., 10013, 10017), reflecting the probabilistic nature of the sampling process.sample_count
is incompatible with offset
, limit
, and filters
parameters.sample_count
can be used with columns
to specify which data fields to include in the sample.sample_count
relative to total rows, being probabilistic, may return 0 rows due to the probability based sampling calculation (e.g., 10 in 100,000, means each row has ~0.01% chance to be included)Example sampling response
Showing trimmed response for sample_count=200
instead of specified sample_count=10000
in example request to not overwhelm the doc.
Our API supports sampling on all /results
endpoints to provide a uniform sample of the dataset for efficient data analysis and visualization. This feature is particularly useful for use cases like charting (if you only have 4 000 pixels on the chart, then 10 000 datapoints are plenty), where analyzing a full dataset isn’t necessary. Sampling returns a subset (with a uniform distribution) of data, optimizing usage of very large results with reduced latency and costs. You can apply sampling to the following endpoints:
sample_count
integer
sample_count
, the entire dataset is returned.sample_count
(e.g., sample_count = 10000
), the number is approximate. The actual number of rows returned may vary slightly (e.g., 10013, 10017), reflecting the probabilistic nature of the sampling process.sample_count
is incompatible with offset
, limit
, and filters
parameters.sample_count
can be used with columns
to specify which data fields to include in the sample.sample_count
relative to total rows, being probabilistic, may return 0 rows due to the probability based sampling calculation (e.g., 10 in 100,000, means each row has ~0.01% chance to be included)Example sampling response
Showing trimmed response for sample_count=200
instead of specified sample_count=10000
in example request to not overwhelm the doc.