Skip to main content

Query US government data with a single line of Python

Project description

AskAmerica

Query 17 US government datasets — SEC filings, FEC campaign finance, Census, weather, energy, crime, and more — with a single line of Python.

Install

pip install 'askamerica[engine]'
askamerica login            # get your free API key

The query engine JAR (~80 MB) is downloaded automatically on first use. To pre-download it explicitly (useful for CI or Docker):

askamerica install-engine   # optional — runs automatically on first query otherwise

Set your API key as an environment variable (or let askamerica login store it):

export ASKAMERICA_API_KEY=aa_free_...

Query

One-liner — returns a pandas DataFrame:

import askamerica as aa

df = aa.query("SELECT company_name, value_dollars FROM sec.financial_facts WHERE canonical_name = 'Revenue' ORDER BY value_dollars DESC FETCH FIRST 10 ROWS ONLY")
print(df)

Raw JDBC connection:

import askamerica as aa

conn = aa.connect()
stmt = conn.createStatement()
rs = stmt.executeQuery("SELECT cik, company_name FROM sec.filing_metadata ORDER BY filing_date DESC FETCH FIRST 5 ROWS ONLY")
while rs.next():
    print(rs.getString("company_name"))
conn.close()

Claude Desktop (MCP)

pip install 'askamerica[mcp]'
askamerica install-engine
askamerica mcp-config       # writes Claude Desktop config snippet

Sign up for a free API key at askamerica.ai.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

askamerica-0.22.0.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

askamerica-0.22.0-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file askamerica-0.22.0.tar.gz.

File metadata

  • Download URL: askamerica-0.22.0.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for askamerica-0.22.0.tar.gz
Algorithm Hash digest
SHA256 57cf58441fcd9b372e875aa58df38a62282c2034e3296e414ba259977eb824f9
MD5 9bbc80b19d82e2e236a0459d0c3393df
BLAKE2b-256 e302987b7ffe882a4daf8ef7c90b46efa8d88e381913ddb078319a472f3abe04

See more details on using hashes here.

Provenance

The following attestation bundles were made for askamerica-0.22.0.tar.gz:

Publisher: askamerica-engine.yml on kenstott/calcite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file askamerica-0.22.0-py3-none-any.whl.

File metadata

  • Download URL: askamerica-0.22.0-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for askamerica-0.22.0-py3-none-any.whl
Algorithm Hash digest
SHA256 870fe812d4c51ef0a567ca5ffdd937cb84797326ee19d82d62ff26565ce3726f
MD5 87ee551de485a1f9dc19f58282100607
BLAKE2b-256 566aa0a2dc968d48e2e6a34c4f6a196c409d5559442e2903ae04ccb4a2220363

See more details on using hashes here.

Provenance

The following attestation bundles were made for askamerica-0.22.0-py3-none-any.whl:

Publisher: askamerica-engine.yml on kenstott/calcite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page