Raw schema
{
"type": "object",
"properties": {
"topic": {
"description": "Dataset name, e.g. 'act_scores' (the `name` from list_datasets or search_datasets). Names are unique across subject areas.",
"title": "Topic",
"type": "string"
},
"metric": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Figure (metric column) to summarize. Default: the dataset's key_metric.",
"title": "Metric"
},
"agg": {
"default": "avg",
"description": "How to summarize (default 'avg').",
"enum": [
"avg",
"sum",
"min",
"max",
"count",
"weighted_rate"
],
"title": "Agg",
"type": "string"
},
"group_by": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Columns to group by: year, code columns, or category columns. Omit for one overall row.",
"title": "Group By"
},
"filters": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Column -> value (or list of values). Keys are the code columns (district_code, school_code, county_fips, tract_geoid, demographic), the dataset's category columns, and a few lookup-table attributes (demographic_category, district_type, school_level, locale); describe_dataset's `filters` lists the exact keys and valid values. A list is OR; several keys AND together. A wrong key or value returns an error listing the valid ones.",
"title": "Filters"
},
"numeric_filters": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/NumericFilter"
},
"maxItems": 20,
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "ANDed comparisons on numeric metric columns, before pagination or aggregation. gt/gte/lt/lte use value; inclusive between uses values=[lower, upper]. Stored units: 0.9 means 90%. NULLs do not match. describe_dataset lists numeric_filter_columns.",
"title": "Numeric Filters"
},
"year": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Exact year. Use this or year_min/year_max, not both.",
"maximum": 2100,
"minimum": 1900,
"title": "Year"
},
"year_min": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "First year of a range (inclusive).",
"maximum": 2100,
"minimum": 1900,
"title": "Year Min"
},
"year_max": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Last year of a range (inclusive).",
"maximum": 2100,
"minimum": 1900,
"title": "Year Max"
},
"detail": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Level of detail, i.e. what one row describes: 'schools', 'districts', 'counties', 'tracts', 'states', ... (each dataset lists its own). Omit for the dataset's default.",
"enum": [
"counties",
"districts",
"schools",
"states",
"tracts",
null
],
"title": "Detail"
},
"limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Groups per page (default 100, at most 500).",
"maximum": 500,
"minimum": 1,
"title": "Limit"
},
"offset": {
"default": 0,
"description": "Number of rows to skip, for paging.",
"minimum": 0,
"title": "Offset",
"type": "integer"
},
"order_by": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Sort by 'value' (the summarized figure) or a group_by column. NULLs sort last.",
"title": "Order By"
},
"order": {
"default": "asc",
"description": "Sort direction for order_by: 'asc' or 'desc'.",
"enum": [
"asc",
"desc"
],
"title": "Order",
"type": "string"
}
},
"required": [
"topic"
],
"$defs": {
"NumericFilter": {
"additionalProperties": false,
"description": "One comparison on a numeric metric; between includes both endpoints.",
"properties": {
"column": {
"description": "Numeric metric from describe_dataset's numeric_filter_columns.",
"title": "Column",
"type": "string"
},
"op": {
"description": "Comparison; between is inclusive.",
"enum": [
"gt",
"gte",
"lt",
"lte",
"between"
],
"title": "Op",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Finite bound for gt/gte/lt/lte, in stored units (0.9 for 90%).",
"title": "Value"
},
"values": {
"anyOf": [
{
"maxItems": 2,
"minItems": 2,
"prefixItems": [
{
"anyOf": [
{
"type": "integer"
},
{
"type": "number"
}
]
},
{
"anyOf": [
{
"type": "integer"
},
{
"type": "number"
}
]
}
],
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Ordered [lower, upper] bounds for between; omit value.",
"title": "Values"
}
},
"required": [
"column",
"op"
],
"title": "NumericFilter",
"type": "object"
}
},
"title": "aggregateArguments"
}