This gist contains some notes on constructing a query for census and economic data from the DataUSA.io site. This is a quick-start guide to their API; for in-depth documentation check out their API documentation.
A great way to learn how to structure a query is to visit a specific datausa.io page and click on the "Options" button on top of any graph, then select "API" to see the query syntax that created the graph.