Skip to main content

econdash

PyPI CI Python

Python client for the EconDash API: 750+ indicators across ten categories (macro, markets, labor, demographics, real estate, energy, transport, health, education and tech) for 290+ countries and regions, with source, licence and freshness metadata for every series.

pip install econdash

LangChain agents use the separate package langchain-econdash (EconDashToolkit). It calls this client, so the free trial, an API key and pay-per-call behave the same way. A 402 becomes a sentence for the model instead of a traceback.

from econdash import EconDash

ed = EconDash()  # free trial, no key needed

ed.search_indicators("inflation")[:3]  # -> list[Indicator]
ed.get_indicator("gdp-nominal")  # metadata, source, licence, freshness
s = ed.get_series("gdp-nominal", "USA", start=2000)
s.data[-1]  # Point(date=2025-01-01, value=3.07e13, ...)
ed.list_countries()  # -> list[Country]
ed.top_countries("gdp-nominal", year=2024, limit=10)
ed.cite("gdp-nominal", "USA").citation.text
# 'United States GDP nominal was $30.77 tn in 2025 (World Bank, 2025-01-01)'

Indicators can be addressed by slug (gdp-nominal, as in econdash.org/chart/gdp-nominal/USA) or by code (world_bank__gdp_nominal). start/end accept 2000, "2000-06", "2000-06-30" or a date.

Free trial, API key, or pay per call

One URL for everything. Without a key the free trial answers right away:

Limit Trial
Requests 300 per day, 30 per minute (per IP)
Countries 10: USA, CHN, DEU, JPN, GBR, FRA, IND, BRA, RUS, KOR
Indicators 50 core series (GDP, CPI, money supply, debt, trade, …)

Anything outside the trial (another country or indicator, or more requests than the free quota) answers HTTP 402 with payment options. You can either:

  • use an API key (subscription): create one at econdash.org/dashboard/api-keys (plans), then EconDash(api_key="ed_...") or set ECONDASH_API_KEY;
  • or let the client pay for that one call (below).

Without a key or wallet the client raises EconDashPaymentRequired for such calls, and nothing is paid.

With an API key

A key from an active subscription opens every indicator and country with full history, no per-IP trial limits, on every method including cite(). It allows 10,000 requests per calendar month; per-endpoint rate limits (60–120 requests per minute) still apply. A wrong or deactivated key gives EconDashAuthError (401), an inactive or expired subscription EconDashAuthError (403), and the monthly quota EconDashRateLimitError (429). With a key the client never pays per call.

Async

from econdash import AsyncEconDash

async with AsyncEconDash() as ed:
    series = await ed.get_series("cpi-inflation-rate-percent", "DEU", start=2010)

Errors

Exception When
EconDashAuthError 401/403: wrong or deactivated key, inactive or expired subscription
EconDashNotFound 404: unknown indicator or country
EconDashRateLimitError 429: monthly key quota or per-minute rate limit, retry_after in seconds
EconDashPaymentRequired 402: outside the free trial or over its quota. challenge holds the x402 requirements, www_authenticate the MPP ones. Nothing was paid
EconDashError base class, anything else

Pay per call (for AI agents)

Agents without an account can pay each call in USDC, about $0.02 per call at the time of writing. Payments are off by default: the client pays only when you pass a wallet and max_usd_per_call. Anything more expensive is refused before signing. Calls the free trial covers are not paid even with a wallet configured; once the free quota is used up, they are paid like any other call.

Rail Install Wallet argument
x402, USDC on Base pip install "econdash[x402]" x402_signer=eth_account.Account.from_key(...)
MPP, USDC on Tempo pip install "econdash[tempo]" (Python 3.11+) tempo_account=mpp.methods.tempo.TempoAccount.from_key(...)
MPP, USDC on Solana pip install "econdash[solana]" solana_keypair=solders.keypair.Keypair.from_base58_string(...)
import os

from econdash import EconDash
from solders.keypair import Keypair

ed = EconDash(
    solana_keypair=Keypair.from_base58_string(os.environ["AGENT_SOLANA_KEY"]),
    max_usd_per_call=0.05,
)
ed.get_series("gdp-nominal", "ZWE")  # outside the trial: one paid call
ed.get_series("gdp-nominal", "USA")  # inside the trial: free

You can configure several wallets; on a 402 the client tries x402 (Base), then MPP Tempo, then MPP Solana, and pays with the first one the API offers within your cap. On Solana the API broadcasts the signed transfer and answers after confirmation, so a paid call can take up to ~40 seconds. Keep agent wallets funded with small amounts only.

LangChain, LlamaIndex and CrewAI

Companion packages in packages/ wrap this client as agent tools with the same access rules: langchain-econdash, llama-index-tools-econdash (EconDashToolSpec and EconDashReader) and crewai-econdash. Outside the free trial a tool returns a short message for the model and no figures. The reader skips a series whose licence forbids redistribution. The four tool descriptions live in econdash.agent_text.

Examples

Notebooks in examples/ and in the companion packages: search → series → pandas chart, comparing countries, a LangChain agent, a LlamaIndex agent and a LlamaIndex RAG index, an agent paying per call (x402 / MPP).

Data and licences

Every Indicator carries source, source_url, license_name, license_url and attribution_text. Source licences differ (World Bank CC BY 4.0, IMF, OECD, FRED, …); see econdash.org/data-license. Please keep the attribution when you publish charts or numbers.

Development

uv sync --all-extras
uv run pytest            # offline tests on recorded API answers
uv run pytest -m live    # contract tests against the real API
uv run ruff check . && uv run mypy

Releases: bump __version__, CHANGELOG.md and CITATION.cff, then push a tag vX.Y.Z; GitHub Actions publishes to PyPI with trusted publishing (no tokens).

MIT licence. The data itself is licensed by its original sources.

Metadata

Release files for econdash 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for econdash 0.2.3
File Size Uploaded Provenance Actions
econdash-0.2.3.tar.gz 47.7 kB With provenance Details for econdash-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for econdash 0.2.3
File Interpreter ABI Platform Actions
econdash-0.2.3-py3-none-any.whl Python 3 none any Details for econdash-0.2.3-py3-none-any.whl

Total release size: 66.3 kB

Release files / econdash-0.2.3.tar.gz

Download URL econdash-0.2.3.tar.gz
Size 47.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5fd2d2454c3db3b5531bcedd70940a1abbeb64893f7ae43e379039d4e2054076
BLAKE2b-256 checksum
How to use checksums
b31794b1600f8b7027f172df0fe07a30bd018f977f11e9742aaa080907dec371
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release files / econdash-0.2.3-py3-none-any.whl

Download URL econdash-0.2.3-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ff6e11cdf241b4efcf01bcf52d4dd24925bfe67686e3c4046a090aaac7f476c
BLAKE2b-256 checksum
How to use checksums
fe83dfe4a9ff12b102857d60753ed69572612fc36d92a60d245358345879b599
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Security for econdash 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for econdash-0.2.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page