datausa.data.query
Query US government statistical data (Census/ACS, BLS, IPEDS, and more) from Data USA. Group by one or more dimensions (e.g. State, Year, Industry) and retrieve one or more measures (e.g. Population, Median Household Income), optionally restricted to specific member keys. Returns dataset source/c...
This record as markdown: /tools/io-github-whiteknightonhorse-apibase/datausa.data.query.md
What datausa.data.query does on Apibase
AI agents call datausa.data.query to retrieve information from Apibase without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
cube | string | Yes | Data cube (dataset) name to query, e.g. "acs_yg_total_population_1". Look up names via datausa.reference.cubes. |
sort | string | — | Sort order as "field" or "field.order" where order is asc/desc, e.g. "Population.desc". |
limit | integer | — | Maximum number of result rows to return (default 100, max 1000). |
offset | integer | — | Number of result rows to skip, for pagination (default 0). |
include | string | — | Restrict results to specific member keys, formatted "Level:key,key;Level2:key" (e.g. "State:04000US06" for California only, or "Year:2021,2022"). Find member ke |
measures | array | Yes | Measure (metric) names to retrieve, e.g. ["Population"]. Look up available measures for a cube via datausa.reference.cubes. |
drilldowns | array | Yes | Dimension level names to group the results by, e.g. ["State"] or ["State", "Year"]. Look up available levels for a cube via datausa.reference.cubes. |
Parameters from the server's own tool schema.
Why datausa.data.query is rated Low
Tool retrieves public statistical data with no modification, deletion, or execution capabilities; read-only query operation.
From the tool's definition Query US government statistical data, retrieve rows, returns dataset source/citation
Attacks that exploit this kind of access
The rule that runs datausa.data.query safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Apibase, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For datausa.data.query, this is the rule to start with:
datausa.data.query is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Apibase, apply this rule, and every datausa.data.query call is checked against it from then on.
Questions about datausa.data.query
Query US government statistical data (Census/ACS, BLS, IPEDS, and more) from Data USA. Group by one or more dimensions (e.g. State, Year, Industry) and retrieve one or more measures (e.g. Population, Median Household Income), optionally restricted to specific member keys. Returns dataset source/citation plus the resulting rows (Data USA, Deloitte/Datawheel/MIT Media Lab, US government open data). It is categorised as a Read tool in the Apibase MCP Server, which means it retrieves data without modifying state.
datausa.data.query accepts 7 parameters: cube, sort, limit, offset, include, measures, drilldowns. Required: cube, measures, drilldowns. The full parameter table on this page comes from the server's own tool schema.
Register the Apibase MCP server in PolicyLayer and add a rule for datausa.data.query: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Apibase. Nothing to install.
datausa.data.query is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the datausa.data.query rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for datausa.data.query. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
datausa.data.query is provided by the Apibase MCP server (apibase-mcp-client). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Apibase, and thousands of servers like it.
This server
Across the catalogue