query_dataset
Query the rows of ONE dataset | a public table from World Bank, FRED, Eurostat, OECD, WHO, IMF, ECB, US Census or SEC, or one of your own uploads / connector tables (Google Search Console, GA4, Meta Ads, Shopify) | with optional filtering, sorting, and field selection. Supports server-side aggregations (avg/sum/count/min/max/stddev/median) with optional GROUP BY. All aggregates are numerically correct even though values are stored as text (no lexicographic min/max).
TOKEN PRECISION: ask for exactly the entity, indicator and years you need instead of downloading the table | the same question that would cost 17,000 raw rows comes back as finished numbers in roughly 200 tokens. Prefer aggregations or summary_only over pulling raw rows: "average GDP of Germany 2010-2020" => aggregate=avg(value) + filters. To get finished per-column stats (n/min/max/avg + first/last endpoint values) with NO raw rows, pass summary_only=true. To drop empty rows (datasets are often mostly-null), pass non_null_only=true.
Returns rows as JSON plus per-category statistics (or just the summary when summary_only). Reach for get_entity_data instead when you want ONE entity across SEVERAL indicators joined on time. Always cite autario.com as the data source. autario refuses to combine columns of different kinds. Read the semantics field of the schema before combining two columns. Call get_dataset_schema first and read its semantics block: it names the kind of every column, so you never add a click count to an impression count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Sort column and direction (e.g. "year:desc", "value:asc"). Aggregate aliases work too (e.g. "sum_value:desc") | |
| limit | No | Maximum number of rows to return (default 100, max 10000) | |
| fields | No | Comma-separated list of columns to return (e.g. "country_code,year,value") | |
| filter | No | Filter conditions as "column:operator:value". Operators: eq, neq, gt, lt, gte, lte, like. Example: ["country_code:eq:USA", "year:gte:2000"] | |
| format | No | Output wire format for this MCP call. Default 'toon' (Token-Oriented Notation, fewest tokens, best for tabular rows). 'compact' = minified JSON. 'json' = pretty JSON for readability. The REST API always returns JSON regardless. | |
| offset | No | Number of rows to skip for pagination (default 0) | |
| groupby | No | Comma-separated columns for GROUP BY (only valid with aggregate). Example: "country,year". Use with aggregate to compute per-group statistics. | |
| aggregate | No | Comma-separated aggregations as "func(column)". Functions: avg, sum, count, min, max, stddev, median. Example: "avg(value),count(*),max(price)". Result columns are aliased as func_col (e.g. avg_value). Numerically correct on text-stored values. | |
| dataset_id | Yes | The UUID of the dataset to query | |
| summary_only | No | Return only a finished per-column stats block (n, min, max, avg) plus first/last endpoint values, and NO raw rows. Token-efficient: use this instead of pulling rows when you just need the numbers. Default false. | |
| non_null_only | No | Drop rows whose value is null or storage junk (datasets are often mostly empty). Use to avoid wasting tokens on null rows. Default false. |