Skip to main content

econdash

PyPI CI Python

Python client for the EconDash macroeconomic data API: 750+ indicators (GDP, inflation, debt, trade, labour, money supply, …) for 290+ countries and regions, with source, licence and freshness metadata for every series.

pip install econdash
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, ...)'

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 vs API key

Without a key the client works on the free trial:

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, …)

Outside the trial the API answers 403 and the client raises EconDashAuthError ("Country ZWE not available in trial"). That is the trial limit, not a bug.

For full access create a key at econdash.org/dashboard/api-keys (plans) and pass it:

ed = EconDash(api_key="ed_...")  # or set ECONDASH_API_KEY

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: bad key, inactive subscription, data outside the trial
EconDashNotFound 404: unknown indicator or country
EconDashRateLimitError 429, retry_after in seconds
EconDashPaymentRequired 402, challenge holds the x402 payment requirements
EconDashError base class, anything else

Pay per call with x402 (for AI agents)

Agents without an account can pay each call in USDC on Base via x402 ($0.02 per call at the time of writing). It is off by default: the client never spends money unless you turn it on and set a cap.

pip install "econdash[x402]"
import os

from eth_account import Account
from econdash import EconDash

ed = EconDash(
    pay_with_x402=True,
    x402_signer=Account.from_key(os.environ["AGENT_PRIVATE_KEY"]),
    max_usd_per_call=0.05,  # x402 refuses to sign anything more expensive
)
ed.get_series("gdp-nominal", "ZWE")

If the price is above max_usd_per_call, nothing is signed and EconDashPaymentRequired is raised. Keep agent wallets funded with small amounts only.

Examples

Notebooks in examples/: search → series → pandas chart, comparing countries, a LangChain agent, an agent paying with x402.

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 are published to PyPI from GitHub Actions on a GitHub Release (trusted publishing).

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

Metadata

Release files for econdash 0.1.1

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.1.1
File Size Uploaded
econdash-0.1.1.tar.gz 20.5 kB Details

Built distribution (wheel)

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

Total release size: 30.9 kB

Release files / econdash-0.1.1.tar.gz

Download URL econdash-0.1.1.tar.gz
Size 20.5 kB
Tags Source
SHA-256 checksum
How to use checksums
be29791e4afb4142985b51e7a3207da495a75bb1692a68f0371ad62c14aa5f2f
BLAKE2b-256 checksum
How to use checksums
6208b5d4e1d93672b9f0f301aa71b97fe79820238643fd83f4fb3405ccf7381f
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 11, 2026.

Transparency log

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

Download URL econdash-0.1.1-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2cd06aafac191b4fea25f1f6dd334ec5c54778db5d15c1958ed33c4a63912a4f
BLAKE2b-256 checksum
How to use checksums
eb62c366103a72666ac8a16b53f8977131892bde0e324a2247e030be67f44cdc
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 11, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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