Skip to content

Financial and Economic Data API

The MacroFinance API gives programmatic access to the financial database and economic database through 77 endpoints at https://api.macrofinance.ai. A free account downloads the last 5 years of history, up to 50 requests a month; other endpoints need a trial or paid plan.

Getting started

Authentication

Add api_key to each /api/ call; your key is in the activation email. /query uses the header Authorization: email;password. Keep both private and call the API from your own server or computer.

Requests and answers

GET with query parameters, or POST with a JSON body. /api/ answers are JSON: {"status": true, "data": …}. /query returns CSV; check for the header row, because it reports errors as text.

Errors

400 missing or wrong parameter, 403 your plan does not include the data, 429 monthly limit reached, 500 server error.

Daily prices as JSON

curl "https://api.macrofinance.ai/api/security_history?api_key=YOUR_API_KEY&ticker=I.SPX&limit=250"

An economic series as JSON

curl "https://api.macrofinance.ai/api/macro_data?api_key=YOUR_API_KEY&name=CPI%20All%20Items&limit=60"

CSV, as the Excel workbook does it

curl -H "Authorization: [email protected];YOUR_PASSWORD" "https://api.macrofinance.ai/query?code=I.SPX&start_date=2026-01-01"

History and downloads

Price and macro time series.

EndpointReturnsParametersAccess
/queryCSV history of one series; used by the Excel workbook. Sign in with the header Authorization: email;passwordcode, symbid or name; optional start_date, end_dateFree account
/api/security_historyDaily history of one security as JSONsecid, symbid or ticker; optional start, end, limit (up to 5000), columnsFree account
/api/macro_dataMacroeconomic series with signals as JSONmacrid, symbid, ticker or name; optional start, end, limit, columnsFree account
/api/security_history_exportSecurity history as a CSV, XLSX or JSON filesecid, symbid or ticker; optional format, start, end, columnsPlus and above
/api/macro_data_exportMacro series as a CSV, XLSX or JSON filemacrid, symbid, ticker or name; optional format, start, end, columnsPlus and above
/api/security_chartInteractive price chart page for one securitysecid, symbid or ticker; optional range (1M to MAX)Trial or paid

Markets

Cross-asset tables and rankings.

EndpointReturnsParametersAccess
/api/global_marketsHeadline cross-asset boardnoneTrial or paid
/api/equity_indicesRanked national and regional stock indicesoptional country, scope, sort, order, limitTrial or paid
/api/bondsGovernment bond yields, curves and spreadsoptional type, country, tenor, sort, order, limitTrial or paid
/api/fxExchange rates and the US Dollar Indexoptional min_move, sort, order, q, limitTrial or paid
/api/commoditiesCommodity futures, ETCs and indicesoptional min_move, sort, order, q, limitTrial or paid
/api/cryptoMajor crypto assets and crypto ETPsoptional kind, min_move, sort, order, q, limitTrial or paid
/api/securities_moversLargest movers in one asset classasset_class (stocks, indices, etfs, futures, fx, commodities, crypto, yields, credit); optional horizon, threshold_pct, direction, country, q, limitTrial or paid
/api/securities_movers_exportMovers list as a fileas securities_movers, plus formatPlus and above
/api/market_signalsLatest market signals, newest firstoptional limitTrial or paid
/api/factor_returns_analysisDistribution of returns under factor filterssecid, symbid or ticker; optional tf, start, end, histogram, filtersTrial or paid

Global macro and risk

World-level panels.

EndpointReturnsParametersAccess
/api/global_macroManufacturing and services PMI by regionnoneTrial or paid
/api/global_macro_weeklyEconomic surprise index by regionnoneTrial or paid
/api/global_liquidityCentral bank balance sheets, M2 and FX reservesoptional tables (cb, m2, fx)Trial or paid
/api/global_riskVolatility and credit risk indicatorsnoneTrial or paid
/api/global_risk_overviewRisk index and macro backdropoptional groupsTrial or paid
/api/macro_moversCountries ranked on one macro indicatorindicator or indicator_type (list=1 for the catalogue); optional metric, direction, region, country, limitTrial or paid
/api/macro_movers_exportMacro ranking as a fileas macro_movers, plus formatPlus and above
/api/economic_calendarEconomic releases and eventsoptional start, end, country, eventTrial or paid
/api/corporate_calendarCompany earnings calendaroptional start, end, country, eventTrial or paid

Countries

Economic data and factors by country.

EndpointReturnsParametersAccess
/api/country_factors_overviewCountry factor overviewcountry (name, ISO2 or ISO3)Trial or paid
/api/country_factors_markets_overviewCountry market factorscountry (name, ISO2 or ISO3)Trial or paid
/api/country_factors_macro_overviewCountry macro factorscountry (name, ISO2 or ISO3)Trial or paid
/api/country_factors_risk_overviewCountry risk factorscountry (name, ISO2 or ISO3)Trial or paid
/api/country_master_esi_overviewEconomic sentiment indicatorscountry (name, ISO2 or ISO3)Trial or paid
/api/country_advanced_esi_overviewDetailed sentiment indicatorscountry (name, ISO2 or ISO3)Trial or paid
/api/country_economic_overviewEconomic indicatorscountry (name, ISO2 or ISO3)Trial or paid
/api/country_manufacturing_overviewManufacturingcountry (name, ISO2 or ISO3)Trial or paid
/api/country_services_overviewServicescountry (name, ISO2 or ISO3)Trial or paid
/api/country_consumer_overviewConsumercountry (name, ISO2 or ISO3)Trial or paid
/api/country_construction_overviewConstructioncountry (name, ISO2 or ISO3)Trial or paid
/api/country_government_overviewGovernmentcountry (name, ISO2 or ISO3)Trial or paid
/api/country_inflation_overviewInflationcountry (name, ISO2 or ISO3)Trial or paid
/api/country_cpi_overviewConsumer price index detailcountry (name, ISO2 or ISO3)Trial or paid
/api/country_employment_overviewEmploymentcountry (name, ISO2 or ISO3)Trial or paid
/api/country_monetary_policy_overviewMonetary policycountry (name, ISO2 or ISO3)Trial or paid
/api/country_fiscal_policy_overviewFiscal policycountry (name, ISO2 or ISO3)Trial or paid
/api/country_trade_overviewTradecountry (name, ISO2 or ISO3)Trial or paid
/api/country_macro_detail_overviewOne macro variable for one countrysymbid, macrid, ticker, or country and indicatorTrial or paid
/api/country_macro_detail_factorsMomentum and trend signals of a macro variablesymbid, macrid, ticker, or country and indicatorTrial or paid

Stocks and fundamentals

Company, sector and industry data.

EndpointReturnsParametersAccess
/api/stock_lookupSearch the stock universequery; optional country, limitTrial or paid
/api/stock_overviewOverview of one stockentity_id or tickerTrial or paid
/api/stock_factorsComposite factor signals; the full grid needs Researchentity_id or tickerTrial or paid
/api/country_stocksRanked stocks of one countrycountry (name, ISO2 or ISO3); optional sort, order, sector, limitTrial or paid
/api/country_stock_fundamentalsFundamentals of a country’s stockscountry (name, ISO2 or ISO3); optional sector, industry_group, industry, subindustryTrial or paid
/api/security_factorsFactor model of one securitysymbid, secid or tickerTrial or paid
/api/factor_explainPlain explanation of a factorview_kind or idf; optional langTrial or paid
/api/stock_country_fundamentalsCountry aggregates for the stock’s countryentity_id or tickerQuant
/api/stock_sector_fundamentalsSector aggregatesentity_id or tickerQuant
/api/stock_indgrp_fundamentalsIndustry group aggregatesentity_id or tickerQuant
/api/stock_industry_fundamentalsIndustry aggregatesentity_id or tickerQuant
/api/stock_subindustry_fundamentalsSub-industry aggregatesentity_id or tickerQuant
/api/stock_sector_market_overviewMomentum, trend and volatility of the sectorentity_id or tickerQuant
/api/stock_indgrp_market_overviewThe same for the industry groupentity_id or tickerQuant
/api/stock_industry_market_overviewThe same for the industryentity_id or tickerQuant
/api/stock_subindustry_market_overviewThe same for the sub-industryentity_id or tickerQuant
/api/global_risk_factorsGlobal risk factor exposures of a securityentity_id or tickerQuant
/api/stock_outliersLarge statistical moves of a securityentity_id or ticker; optional window_days, days, limitQuant

Research and news

Reports, papers and news.

EndpointReturnsParametersAccess
/api/newsNews postsoptional start, end, country, stock, security, sector, industry, subindustry, queryTrial or paid
/api/quant_papersQuant paper references; summaries and links need Researchsymbid, secid, ticker or domain; optional limitTrial or paid
/api/researchSearch research reports; full access needs Researchquery, or entity_kind with entity or entity_idTrial or paid
/api/stock_research_reportsReports mentioning a stockentity_id, ticker or company; optional limitQuant
/api/country_research_reportsReports about a countrycountry (name, ISO2 or ISO3); optional limitQuant
/api/securities-research-reportsReports on an index, future, currency or bondsymbid, ticker or secid; optional limitQuant
/api/macro-research-reportsReports on a macro indicatorsymbid or ticker; optional limitQuant
/api/sector-research-reportsReports on a sectorsector_id or sector; optional limitQuant
/api/industries-research-reportsReports on an industryindustry_id or industry; optional limitQuant
/api/subindustries-research-reportsReports on a sub-industrysubindustry_id or subindustry; optional limitQuant
Back to the financial database. Informational only, not investment advice.