经济数据 API

API ID 15035

一个订阅中的宏观数据:自1990年以来的美国国债收益率曲线、名义收益率、真实收益率、短期国债、长期国债、利差和倒挂,以及217个国家的通胀数据、世界银行CPI,加上每月的欧盟统计局HICP和通胀计算器

API 文档

端点

请求
通货膨胀API - 按国家划分的消费者物价指数和经济指标 每个请求最多返回100个结果 以JSON格式
Endpoint ID: 39751
GET https://zylalabs.com/api/15035/economic+data+api/39751/inflation+api
输入参数

通货膨胀 — 端点功能

对象 描述
mode 可选 Latest = newest yearly value per country and indicator (EU countries also get the newest monthly HICP); history = one row per country and year; monthly = Eurostat HICP per month (EU/EEA/candidate countries); adjust = what an amount from one year (or month) is worth in another, using the official.
countries 可选 ISO2 (US, DE, BG), ISO3 (USA, BGR) or English names (Germany). Up to 50. Empty = US, DE, GB, JP, BG. Several values: comma separated.
indicators 可选 For latest: inflation, cpi, gdp, gdpGrowth, gdpPerCapita, unemployment, population, interestRate (or the raw World Bank code, e.g. FP.CPI.TOTL.ZG). Empty = inflation. Several values: comma separated.
indicator 可选 For history: one indicator key, e.g. inflation or gdpGrowth. Default inflation.
startYear 可选 For history: first year (1960 or later). Default 10 years ago.
endYear 可选 For history: last year. Default the latest year with data.
startMonth 可选 For monthly: first month YYYY-MM. Default 24 months back.
endMonth 可选 For monthly: last month YYYY-MM. Default the newest month.
amount 可选 For adjust: the money amount to convert, e.g. 100. Default 100.
country 可选 For adjust: one country, e.g. US or Germany. Default US.
fromYear 可选 For adjust: the year of the original amount. Default 10 years before To year.
toYear 可选 For adjust: the target year. Default the latest year with CPI data.
fromMonth 可选 For adjust with monthly precision (EU countries, HICP index): YYYY-MM.
toMonth 可选 For adjust with monthly precision (EU countries, HICP index): YYYY-MM.
limit 可选 Maximum rows returned. Between 1 and 20000.

剩余免费测试请求:3 / 3。


输入参数

mode
countries
indicators
indicator
startYear
endYear
startMonth
endMonth
amount
country
fromYear
toYear
fromMonth
toMonth
limit
API 示例响应
JSON
{
    "count": 5,
    "items": [
        {
            "country": "US",
            "countryName": "United States",
            "iso3": "USA",
            "indicator": "inflation",
            "indicatorCode": "FP.CPI.TOTL.ZG",
            "value": 2.9495,
            "unit": "% per year",
            "year": 2024,
            "previousValue": 4.1163,
            "previousYear": 2023,
            "change": -1.1668,
            "source": "World Bank, World Development Indicators (FP.CPI.TOTL.ZG), licence CC BY 4.0",
            "fetchedAt": "2026-11-17T05:25:00Z"
        },
        {
            "country": "US",
            "countryName": "United States",
            "iso3": "USA",
            "indicator": "unemployment",
            "indicatorCode": "SL.UEM.TOTL.ZS",
            "value": 4.198,
            "unit": "% of labor force",
            "year": 2025,
            "previousValue": 4.022,
            "previousYear": 2024,
            "change": 0.176,
            "source": "World Bank, World Development Indicators (SL.UEM.TOTL.ZS), licence CC BY 4.0",
            "fetchedAt": "2026-11-17T11:25:01Z"
        },
        {
            "country": "DE",
            "countryName": "Germany",
            "iso3": "DEU",
            "indicator": "inflation",
            "indicatorCode": "FP.CPI.TOTL.ZG",
            "value": 2.1718,
            "unit": "% per year",
            "year": 2025,
            "previousValue": 2.2565,
            "previousYear": 2024,
            "change": -0.0847,
            "monthlyHicp": {
                "month": "2026-10",
                "yoy": 2.8,
                "mom": -0.1,
                "index": 103.8,
                "indexBase": "Index, 2025=100",
                "estimated": true
            },
            "source": "World Bank, World Development Indicators (FP.CPI.TOTL.ZG), licence CC BY 4.0; Eurostat, HICP monthly data (prc_hicp_minr), (c) European Union, reuse authorised with the source ackn",
            "fetchedAt": "2026-11-17T05:25:00Z"
        },
        {
            "country": "DE",
            "countryName": "Germany",
            "iso3": "DEU",
            "indicator": "unemployment",
            "indicatorCode": "SL.UEM.TOTL.ZS",
            "value": 3.711,
            "unit": "% of labor force",
            "year": 2025,
            "previousValue": 3.4,
            "previousYear": 2024,
            "change": 0.311,
            "source": "World Bank, World Development Indicators (SL.UEM.TOTL.ZS), licence CC BY 4.0",
            "fetchedAt": "2026-11-17T11:25:01Z"
        },
        {
            "country": "BG",
            "countryName": "Bulgaria",
            "iso3": "BGR",
            "indicator": "inflation",
            "indicatorCode": "FP.CPI.TOTL.ZG",
            "value": 4.5808,
            "unit": "% per year",
            "year": 2025,
            "previousValue": 2.4465,
            "previousYear": 2024,
            "change": 2.1343,
            "monthlyHicp": {
                "month": "2026-10",
                "yoy": 6,
                "mom": 0.8,
                "index": 106.72,
                "indexBase": "Index, 2025=100",
                "estimated": true
            },
            "source": "World Bank, World Development Indicators (FP.CPI.TOTL.ZG), licence CC BY 4.0; Eurostat, HICP monthly data (prc_hicp_minr), (c) European Union, reuse authorised with the source ackn",
            "fetchedAt": "2026-11-17T05:25:00Z"
        }
    ]
}
通货膨胀 — 代码片段

curl --location --request GET 'https://zylalabs.com/api/15035/economic+data+api/39751/inflation+api?mode=latest&countries=US,DE,BG&indicators=inflation,unemployment&limit=5' --header 'Authorization: Bearer YOUR_API_KEY' 


    
请求
国债收益率API - 美国收益率曲线 每日利率 历史 每个请求返回最多100个结果作为JSON
Endpoint ID: 39752
GET https://zylalabs.com/api/15035/economic+data+api/39752/treasury+yields+api
输入参数

国债收益率 — 端点功能

对象 描述
mode 可选 Latest = the newest yield curve; date = one day (a holiday or weekend returns the previous business day and says so); history = every business day between Start and End date; spreads = spread time series only; inversion = periods when 10Y-2Y or 10Y-3M was negative inside the range.
curve 可选 Nominal = daily par yield curve (1M-30Y, since 1990); real = real yield curve / TIPS (5Y-30Y, since 2003); bills = T-bill bank discount and coupon equivalent rates (since 2002); longterm = long-term composite and 20Y CMT (since 2000). Spreads and inversions use the nominal curve.
date 可选 For mode date: the day you want, YYYY-MM-DD, for example 2024-03-15.
startDate 可选 For history, spreads and inversion: first day, YYYY-MM-DD. Default 30 days before End date. Max range 40 years.
endDate 可选 For history, spreads and inversion: last day, YYYY-MM-DD. Default today.
maturities 可选 Optional filter, for example 2Y, 10Y, 3M, 30Y. Empty = every maturity of the curve.
frequency 可选 For history and spreads: daily (every business day), weekly (last business day of each week) or monthly (last business day of each month).
limit 可选 Maximum rows returned (newest kept when the range is longer). Between 1 and 20000.

剩余免费测试请求:3 / 3。


输入参数

mode
curve
date
startDate
endDate
maturities
frequency
limit
API 示例响应
JSON
{
    "count": 5,
    "items": [
        {
            "date": "2026-11-02",
            "curve": "nominal",
            "yields": {
                "1M": 4.05,
                "1.5M": 4.09,
                "2M": 4.16,
                "3M": 4.21,
                "4M": 4.19,
                "6M": 4.25,
                "1Y": 4.38,
                "2Y": 4.59,
                "3Y": 4.65,
                "5Y": 4.7,
                "7Y": 4.79,
                "10Y": 4.91,
                "20Y": 5.31,
                "30Y": 5.28
            },
            "spreads": {
                "10Y-2Y": 0.32,
                "10Y-3M": 0.7,
                "30Y-5Y": 0.58,
                "2Y-3M": 0.38
            },
            "inverted10y2y": false,
            "inverted10y3m": false,
            "source": "U.S. Treasury, Daily Treasury Par Yield Curve Rates",
            "sourceUrl": "https://home.treasury.gov/resource-center/data-chart-center/interest-rates/TextView?type=daily_treasury_yield_curve&field_tdr_date_value=2026",
            "unit": "percent"
        },
        {
            "date": "2026-11-03",
            "curve": "nominal",
            "yields": {
                "1M": 4.03,
                "1.5M": 4.09,
                "2M": 4.15,
                "3M": 4.21,
                "4M": 4.18,
                "6M": 4.26,
                "1Y": 4.4,
                "2Y": 4.61,
                "3Y": 4.68,
                "5Y": 4.74,
                "7Y": 4.83,
                "10Y": 4.95,
                "20Y": 5.35,
                "30Y": 5.32
            },
            "spreads": {
                "10Y-2Y": 0.34,
                "10Y-3M": 0.74,
                "30Y-5Y": 0.58,
                "2Y-3M": 0.4
            },
            "inverted10y2y": false,
            "inverted10y3m": false,
            "source": "U.S. Treasury, Daily Treasury Par Yield Curve Rates",
            "sourceUrl": "https://home.treasury.gov/resource-center/data-chart-center/interest-rates/TextView?type=daily_treasury_yield_curve&field_tdr_date_value=2026",
            "unit": "percent"
        },
        {
            "date": "2026-11-04",
            "curve": "nominal",
            "yields": {
                "1M": 4.01,
                "1.5M": 4.08,
                "2M": 4.15,
                "3M": 4.21,
                "4M": 4.2,
                "6M": 4.25,
                "1Y": 4.39,
                "2Y": 4.58,
                "3Y": 4.64,
                "5Y": 4.69,
                "7Y": 4.77,
                "10Y": 4.9,
                "20Y": 5.3,
                "30Y": 5.28
            },
            "spreads": {
                "10Y-2Y": 0.32,
                "10Y-3M": 0.69,
                "30Y-5Y": 0.59,
                "2Y-3M": 0.37
            },
            "inverted10y2y": false,
            "inverted10y3m": false,
            "source": "U.S. Treasury, Daily Treasury Par Yield Curve Rates",
            "sourceUrl": "https://home.treasury.gov/resource-center/data-chart-center/interest-rates/TextView?type=daily_treasury_yield_curve&field_tdr_date_value=2026",
            "unit": "percent"
        },
        {
            "date": "2026-11-05",
            "curve": "nominal",
            "yields": {
                "1M": 4.03,
                "1.5M": 4.07,
                "2M": 4.15,
                "3M": 4.17,
                "4M": 4.16,
                "6M": 4.19,
                "1Y": 4.28,
                "2Y": 4.46,
                "3Y": 4.53,
                "5Y": 4.59,
                "7Y": 4.7,
                "10Y": 4.84,
                "20Y": 5.27,
                "30Y": 5.25
            },
            "spreads": {
                "10Y-2Y": 0.38,
                "10Y-3M": 0.67,
                "30Y-5Y": 0.66,
                "2Y-3M": 0.29
            },
            "inverted10y2y": false,
            "inverted10y3m": false,
            "source": "U.S. Treasury, Daily Treasury Par Yield Curve Rates",
            "sourceUrl": "https://home.treasury.gov/resource-center/data-chart-center/interest-rates/TextView?type=daily_treasury_yield_curve&field_tdr_date_value=2026",
            "unit": "percent"
        },
        {
            "date": "2026-11-06",
            "curve": "nominal",
            "yields": {
                "1M": 4.02,
                "1.5M": 4.07,
                "2M": 4.15,
                "3M": 4.19,
                "4M": 4.19,
                "6M": 4.23,
                "1Y": 4.33,
                "2Y": 4.51,
                "3Y": 4.59,
                "5Y": 4.64,
                "7Y": 4.74,
                "10Y": 4.86,
                "20Y": 5.29,
                "30Y": 5.26
            },
            "spreads": {
                "10Y-2Y": 0.35,
                "10Y-3M": 0.67,
                "30Y-5Y": 0.62,
                "2Y-3M": 0.32
            },
            "inverted10y2y": false,
            "inverted10y3m": false,
            "source": "U.S. Treasury, Daily Treasury Par Yield Curve Rates",
            "sourceUrl": "https://home.treasury.gov/resource-center/data-chart-center/interest-rates/TextView?type=daily_treasury_yield_curve&field_tdr_date_value=2026",
            "unit": "percent"
        }
    ]
}
国债收益率 — 代码片段

curl --location --request GET 'https://zylalabs.com/api/15035/economic+data+api/39752/treasury+yields+api?mode=history&curve=nominal&frequency=daily&limit=5' --header 'Authorization: Bearer YOUR_API_KEY' 


    

API 访问密钥和身份验证

注册后,每个开发者都会被分配一个个人 API 访问密钥,这是一个唯一的字母和数字组合,用于访问我们的 API 端点。要使用 经济数据 API 进行身份验证,只需在 Authorization 标头中包含您的 bearer token。

标头
标头 描述
授权 必需 应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。

无长期承诺。随时升级、降级或取消。

起价
$10,000/年


  • 自定义数量
  • 自定义速率限制
  • 专业客户支持
  • 实时 API 监控

概览

一项订阅中的宏观数据:自1990年以来的美国国债收益率曲线、名义收益率、实际收益率、短期票据、长期收益率、利差和倒挂,以及217个国家的通胀数据、世界银行消费价格指数,加上每月的欧盟统计局调和消费者价格指数和通胀计算器

经济数据 API FAQs

一个订阅中的宏观数据:美国国债收益率曲线(名义、实际、短期债券、自1990年以来的长期债券、利差和倒挂)以及217个国家的通胀(世界银行CPI),加上每月的欧盟统计局HICP和通胀计算器

每个请求最多100个结果 使用限制参数进行设置

每个请求从公共源收集实时数据 相同的请求可以从缓存中服务最长达6小时

列表参数接受多个用逗号分隔的值,例如:伦敦,巴黎

端点接受这些查询参数,全部为可选:模式,国家,指标,指标,开始年份,结束年份,开始月份,结束月份,金额,国家,从年份,到年份,从月份,到月份,限制。模式:最新 = 每个国家和指标最新的年度值(欧盟国家还会获得最新的月度HICP);历史 = 每个国家和年份一行;每月 = 欧盟统计局每月HICP(欧盟/欧洲经济区/候选国);调整 = 从一年(或一个月)获得的金额在另一年(或月)中的价值,使用官方数据。国家:ISO2(美国,德国,保加利亚),ISO3(美国,保加利亚)或英文名称(德国)。最多50个。为空 = 美国,德国,英国,日本,保加利亚。多个值:用逗号分隔。

该端点接受以下查询参数,均为可选:模式,曲线,日期,开始日期,结束日期,期限,频率,限制。模式:最新 = 最新收益率曲线;日期 = 一天(假期或周末返回前一个工作日并说明);历史 = 开始和结束日期之间的每个工作日;利差 = 仅利差时间序列;倒挂 = 在范围内10年期减去2年期或10年期减去3个月期为负的时期。曲线:名义 = 每日面值收益率曲线(1个月至30年,自1990年起);实际 = 实际收益率曲线/TIPS(5年期至30年期,自2003年起);票据 = 国库券银行贴现率和票息等值利率(自2002年起);长期 = 长期综合和20年期CMT(自2000年起)

一般常见问题

Zyla API Hub 就像一个大型 API 商店,您可以在一个地方找到数千个 API。我们还为所有 API 提供专门支持和实时监控。注册后,您可以选择要使用的 API。请记住,每个 API 都需要自己的订阅。但如果您订阅多个 API,您将为所有这些 API 使用相同的密钥,使事情变得更简单。
价格以 USD(美元)、EUR(欧元)、CAD(加元)、AUD(澳元)和 GBP(英镑)列出。我们接受所有主要的借记卡和信用卡。我们的支付系统使用最新的安全技术,由 Stripe 提供支持,Stripe 是世界上最可靠的支付公司之一。如果您在使用卡片付款时遇到任何问题,请通过 [email protected]

此外,如果您已经以这些货币中的任何一种(USD、EUR、CAD、AUD、GBP)拥有有效订阅,该货币将保留用于后续订阅。只要您没有任何有效订阅,您可以随时更改货币。
定价页面上显示的本地货币基于您 IP 地址的国家/地区,仅供参考。实际价格以 USD(美元)为单位。当您付款时,即使您在我们的网站上看到以本地货币显示的等值金额,您的卡片对账单上也会以美元显示费用。这意味着您不能直接使用本地货币付款。
有时,银行可能会因其欺诈保护设置而拒绝收费。我们建议您首先联系您的银行,检查他们是否阻止了我们的收费。此外,您可以访问账单门户并更改关联的卡片以进行付款。如果这些方法不起作用并且您需要进一步帮助,请通过 [email protected]
价格由月度或年度订阅决定,具体取决于所选计划。
API 调用根据成功请求从您的计划中扣除。每个计划都包含您每月可以进行的特定数量的调用。只有成功的调用(由状态 200 响应指示)才会计入您的总数。这确保失败或不完整的请求不会影响您的月度配额。
Zyla API Hub 采用月度订阅系统。您的计费周期将从您购买付费计划的那一天开始,并在下个月的同一日期续订。因此,如果您想避免未来的费用,请提前取消订阅。
要升级您当前的订阅计划,只需转到 API 的定价页面并选择您要升级到的计划。升级将立即生效,让您立即享受新计划的功能。请注意,您之前计划中的任何剩余调用都不会转移到新计划,因此在升级时请注意这一点。您将被收取新计划的全部金额。
要检查您本月剩余多少 API 调用,请参考响应标头中的 "X-Zyla-API-Calls-Monthly-Remaining" 字段。例如,如果您的计划允许每月 1,000 个请求,而您已使用 100 个,则响应标头中的此字段将显示 900 个剩余调用。
要查看您的计划允许的最大 API 请求数,请检查 "X-Zyla-RateLimit-Limit" 响应标头。例如,如果您的计划包括每月 1,000 个请求,此标头将显示 1,000。
"X-Zyla-RateLimit-Reset" 标头显示您的速率限制重置之前的秒数。这告诉您何时您的请求计数将重新开始。例如,如果它显示 3,600,则意味着还有 3,600 秒直到限制重置。
是的,您可以随时通过访问您的账户并在账单页面上选择取消选项来取消您的计划。请注意,升级、降级和取消会立即生效。此外,取消后,您将不再有权访问该服务,即使您的配额中还有剩余调用。
为了让您有机会在没有任何承诺的情况下体验我们的 API,我们提供 7 天免费试用,允许您免费进行最多 50 次 API 调用。此试用只能使用一次,因此我们建议将其应用于您最感兴趣的 API。虽然我们的大多数 API 都提供免费试用,但有些可能不提供。试用在 7 天后或您进行了 50 次请求后结束,以先发生者为准。如果您在试用期间达到 50 次请求限制,您需要"开始您的付费计划"以继续发出请求。您可以在个人资料中的订阅 -> 选择您订阅的 API -> 定价标签下找到"开始您的付费计划"按钮。或者,如果您在第 7 天之前不取消订阅,您的免费试用将结束,您的计划将自动计费,授予您访问计划中指定的所有 API 调用的权限。请记住这一点以避免不必要的费用。
7 天后,您将被收取试用期间订阅的计划的全额费用。因此,在试用期结束前取消很重要。因忘记及时取消而提出的退款请求不被接受。
当您订阅 API 免费试用时,您可以进行最多 50 次 API 调用。如果您希望超出此限制进行额外的 API 调用,API 将提示您执行"开始您的付费计划"。您可以在个人资料中的订阅 -> 选择您订阅的 API -> 定价标签下找到"开始您的付费计划"按钮。
付款订单在每月 20 日至 30 日之间处理。如果您在 20 日之前提交请求,您的付款将在此时间范围内处理。
您可以通过我们的聊天渠道联系我们以获得即时帮助。我们始终在线,时间为上午 8 点至下午 5 点(EST)。如果您在该时间之后联系我们,我们将尽快回复您。此外,您可以通过 [email protected]

相关 API