公共 API · 只读
Syli Atlas API
54 个非洲国家、5 个地区及整个大陆 2015 至 2030 年的经济指标,提供 JSON 或 CSV 格式。免费、无需注册,每个响应都注明来源。
https://syliatlas.com/api/v1
- 身份验证
- 无
- Formats
- json · csv
- 限额
- 60 req/min · IP
- 数据
- imf_weo · 2026-10
GET /api/v1/areas
所有地区
所有地区:国家、地区、大陆、国际货币基金组织汇总。
参数
无参数。
响应
200 application/json · {data, meta}
429 rate_limited
超出后 60 每分钟请求数
- $ curl "https://syliatlas.com/api/v1/areas"
- const res = await fetch("https://syliatlas.com/api/v1/areas");
- const { data, meta } = await res.json();
- console.log(data.length);
- console.log(meta.sources[0]?.attribution.en);
- import requests
- r = requests.get("https://syliatlas.com/api/v1/areas", timeout=10)
- r.raise_for_status()
- body = r.json()
- data, meta = body["data"], body["meta"]
- # spreadsheets read the CSV route
- =IMPORTDATA("https://syliatlas.com/api/v1/areas/CIV/csv")
响应 200 OK application/json max-age=3600
基于在线数据的真实响应,已缩略(…)。
GET /api/v1/areas/{code}
单个地区,全部序列
包含全部序列的地区。
参数
code
string
path
必填
地区代码:国家为 ISO 3 代码,或地区代码、africa、国际货币基金组织汇总(见 /areas)。
values : CIV, west_africa, africa…
from
integer
query
期间的第一年。
values : 2015 – 2030 · 默认 : 2020
to
integer
query
期间的最后一年,须晚于 from。
values : 2015 – 2030 · 默认 : 2025
响应
200 application/json · {data, meta}
400 invalid_period
年份超出 2015–2030,或 from ≥ to
404 unknown_area
未知地区代码
429 rate_limited
超出后 60 每分钟请求数
- $ curl "https://syliatlas.com/api/v1/areas/CIV?from=2020&to=2025"
- const res = await fetch("https://syliatlas.com/api/v1/areas/CIV?from=2020&to=2025");
- const { data, meta } = await res.json();
- console.log(data.period.change_percent.real_gdp_index);
- console.log(meta.sources[0]?.attribution.en);
- import requests
- r = requests.get("https://syliatlas.com/api/v1/areas/CIV?from=2020&to=2025", timeout=10)
- r.raise_for_status()
- body = r.json()
- data, meta = body["data"], body["meta"]
- # spreadsheets read the CSV route
- =IMPORTDATA("https://syliatlas.com/api/v1/areas/CIV/csv")
响应 200 OK application/json max-age=3600
基于在线数据的真实响应,已缩略(…)。
响应结构 · 19 fields
data
object
包含全部序列的地区。
data.code
string
代码:国家为 ISO 3(CIV),否则为地区代码(west_africa、africa、SSA)。
data.kind
string
地区类型。
取值 : country | region | continent | imf_aggregate
data.region
string | null
国家所属的非洲联盟区域;其他情况为 null。
取值 : north_africa | west_africa | central_africa | east_africa | southern_africa | null
data.members
string[]
构成某地区或大陆的国家代码。国家和国际货币基金组织汇总为空(其构成由国际货币基金组织确定)。
data.share_of_africa_gdp
(number | null)[]
占非洲现价美元 GDP 的比重(%),与 years.list 对齐。由 Syli Atlas 计算。
单位 : %
meta
object
关于响应。
meta.from
integer
所用的第一年。
meta.to
integer
所用的最后一年。
GET /api/v1/compare
多个地区并列
找到的地区,按请求顺序排列。
参数
codes
string
query
必填
2 至 6 个地区代码,以逗号分隔。未知代码不会出现在 data 中。
values : CIV,GHA,SEN…
from
integer
query
期间的第一年。
values : 2015 – 2030 · 默认 : 2020
to
integer
query
期间的最后一年,须晚于 from。
values : 2015 – 2030 · 默认 : 2025
响应
200 application/json · {data, meta}
400 invalid_period
年份超出 2015–2030,或 from ≥ to
429 rate_limited
超出后 60 每分钟请求数
- $ curl "https://syliatlas.com/api/v1/compare?codes=CIV,GHA"
- const res = await fetch("https://syliatlas.com/api/v1/compare?codes=CIV,GHA");
- const { data, meta } = await res.json();
- console.log(data.map((a) => a.code));
- console.log(meta.sources[0]?.attribution.en);
- import requests
- r = requests.get("https://syliatlas.com/api/v1/compare?codes=CIV,GHA", timeout=10)
- r.raise_for_status()
- body = r.json()
- data, meta = body["data"], body["meta"]
- # spreadsheets read the CSV route
- =IMPORTDATA("https://syliatlas.com/api/v1/areas/CIV/csv")
响应 200 OK application/json max-age=3600
基于在线数据的真实响应,已缩略(…)。
响应结构 · 16 fields
data
CompareItem[]
找到的地区,按请求顺序排列。
data[].code
string
代码:国家为 ISO 3(CIV),否则为地区代码(west_africa、africa、SSA)。
data[].kind
string
地区类型。
取值 : country | region | continent | imf_aggregate
data[].region
string | null
国家所属的非洲联盟区域;其他情况为 null。
取值 : north_africa | west_africa | central_africa | east_africa | southern_africa | null
meta
object
关于响应。
meta.from
integer
所用的第一年。
meta.to
integer
所用的最后一年。
meta.codes
string[]
请求的代码。
GET /api/v1/ranking
按指标排名的国家
国家按数值从高到低排列;无数值者排在最后。
参数
indicator
string
query
用于排名的指标(见 /indicators)。
values : real_gdp_index | real_gdp_growth | gdp_usd_bn | gdp_per_capita_usd | gdp_per_capita_ppp | inflation | public_debt_pct_gdp | population_m | fiscal_balance_pct_gdp | current_account_pct_gdp | unemployment · 默认 : real_gdp_index
mode
string
query
change:from 与 to 之间的变化;value:to 年的数值。
values : change | value · 默认 : change
region
string
query
仅保留某一地区的国家。
values : north_africa | west_africa | central_africa | east_africa | southern_africa
from
integer
query
期间的第一年。
values : 2015 – 2030 · 默认 : 2020
to
integer
query
期间的最后一年,须晚于 from。
values : 2015 – 2030 · 默认 : 2025
响应
200 application/json · {data, meta}
400 invalid_period
年份超出 2015–2030,或 from ≥ to
429 rate_limited
超出后 60 每分钟请求数
- $ curl "https://syliatlas.com/api/v1/ranking?indicator=real_gdp_index"
- const res = await fetch("https://syliatlas.com/api/v1/ranking?indicator=real_gdp_index");
- const { data, meta } = await res.json();
- console.log(data[0].name.fr, data[0].value, meta.unit);
- console.log(meta.sources[0]?.attribution.en);
- import requests
- r = requests.get("https://syliatlas.com/api/v1/ranking?indicator=real_gdp_index", timeout=10)
- r.raise_for_status()
- body = r.json()
- data, meta = body["data"], body["meta"]
- # spreadsheets read the CSV route
- =IMPORTDATA("https://syliatlas.com/api/v1/areas/CIV/csv")
响应 200 OK application/json max-age=3600
基于在线数据的真实响应,已缩略(…)。
响应结构 · 18 fields
data
RankingItem[]
国家按数值从高到低排列;无数值者排在最后。
data[].code
string
代码:国家为 ISO 3(CIV),否则为地区代码(west_africa、africa、SSA)。
data[].kind
string
地区类型。
取值 : country | region | continent | imf_aggregate
data[].region
string | null
国家所属的非洲联盟区域;其他情况为 null。
取值 : north_africa | west_africa | central_africa | east_africa | southern_africa | null
data[].position
integer | null
名次,1 = 数值最高;该国无数值时为 null。
data[].value
number | null
排名数值,单位见 meta.unit。
meta
object
关于响应。
meta.from
integer
所用的第一年。
meta.to
integer
所用的最后一年。
meta.indicator
string
排名所依据的指标。
取值 : real_gdp_index | real_gdp_growth | gdp_usd_bn | gdp_per_capita_usd | gdp_per_capita_ppp | inflation | public_debt_pct_gdp | population_m | fiscal_balance_pct_gdp | current_account_pct_gdp | unemployment
meta.mode
string
change 或 value。
取值 : change | value
meta.unit
string
value 的单位:指标单位(value 模式)或其变化单位(change 模式)。
取值 : percent | percent_of_gdp | percent_of_labour_force | usd_billion | usd | intl_dollar | million_people | index_2015 | points
meta.region
string | null
保留的地区,全部则为 null。
取值 : north_africa | west_africa | central_africa | east_africa | southern_africa | null
GET /api/v1/indicators
指标:单位、含义、来源
全部指标,按序列顺序排列。
参数
无参数。
响应
200 application/json · {data, meta}
429 rate_limited
超出后 60 每分钟请求数
- $ curl "https://syliatlas.com/api/v1/indicators"
- const res = await fetch("https://syliatlas.com/api/v1/indicators");
- const { data, meta } = await res.json();
- console.log(data.map((i) => i.key + ": " + i.unit));
- console.log(meta.sources[0]?.attribution.en);
- import requests
- r = requests.get("https://syliatlas.com/api/v1/indicators", timeout=10)
- r.raise_for_status()
- body = r.json()
- data, meta = body["data"], body["meta"]
- # spreadsheets read the CSV route
- =IMPORTDATA("https://syliatlas.com/api/v1/areas/CIV/csv")
响应 200 OK application/json max-age=3600
基于在线数据的真实响应,已缩略(…)。
响应结构 · 16 fields
data
Indicator[]
全部指标,按序列顺序排列。
data[].key
string
series 和参数中使用的键。
取值 : real_gdp_index | real_gdp_growth | gdp_usd_bn | gdp_per_capita_usd | gdp_per_capita_ppp | inflation | public_debt_pct_gdp | population_m | fiscal_balance_pct_gdp | current_account_pct_gdp | unemployment
data[].unit
string
数值的单位(标签见文档)。
取值 : percent | percent_of_gdp | percent_of_labour_force | usd_billion | usd | intl_dollar | million_people | index_2015 | points
data[].kind
string
rate:已是百分比;level:数量;index:2015 年 = 100。
取值 : rate | level | index
data[].change_unit
string
其变化的单位:比率为百分点,其余为百分比。
取值 : percent | points
data[].source
object
数据出处。
data[].source.id
string
来源。
取值 : imf_weo
data[].source.code
string | null
来源处的序列代码(IMF DataMapper);由 Syli Atlas 计算时为 null。
meta
object
关于响应。
meta.years
object
涵盖年份。
meta.years.first
integer
第一年。
meta.years.last
integer
最后一年。
GET /api/v1/areas/{code}/csv
以 CSV 获取单个地区
第 1 行是注明来源的注释(#)。随后是表头,以及 2015 至 2030 年每年一行。列:year、status、real_gdp_index、real_gdp_growth、gdp_usd_bn、gdp_per_capita_usd、gdp_per_capita_ppp、inflation、public_debt_pct_gdp、population_m、fiscal_balance_pct_gdp、current_account_pct_gdp、unemployment。status 取值为 actual、estimate 或 projection;空单元格表示无数值。单位:见 /indicators。
参数
code
string
path
必填
地区代码:国家为 ISO 3 代码,或地区代码、africa、国际货币基金组织汇总(见 /areas)。
values : CIV, west_africa, africa…
响应
200 text/csv
404 unknown_area
未知地区代码
429 rate_limited
超出后 60 每分钟请求数
- $ curl -O "https://syliatlas.com/api/v1/areas/CIV/csv"
- const res = await fetch("https://syliatlas.com/api/v1/areas/CIV/csv");
- const text = await res.text();
- // line 1: the source; then one row per year
- import pandas as pd
- url = "https://syliatlas.com/api/v1/areas/CIV/csv"
- df = pd.read_csv(url, comment="#")
- print(df[["year", "status", "real_gdp_index"]])
- =IMPORTDATA("https://syliatlas.com/api/v1/areas/CIV/csv")
响应 200 OK text/csv max-age=3600
基于在线数据的真实响应,已缩略(…)。
指标
series、change_percent 和 change_points 的所有键及其单位。比率按百分点变化,水平值和指数按百分比变化。相同列表见 GET /api/v1/indicators。
real_gdp_index
实际 GDP(指数)GDP 物量,2015 年 = 100,根据国际货币基金组织实际增长率链接而成。由 Syli Atlas 计算。 指数,2015 年 = 100
index_2015
percent
—
real_gdp_growth
实际 GDP 增长率按不变价格计算的 GDP 年度变动。 %
percent
points
NGDP_RPCH
gdp_usd_bn
GDP(现价美元)按现价计算的国内生产总值,以美元计。 十亿现价美元
usd_billion
percent
NGDPD
gdp_per_capita_usd
人均 GDP现价美元 GDP 除以人口。 现价美元
usd
percent
NGDPDPC
gdp_per_capita_ppp
人均 GDP(购买力平价)按购买力平价计算的人均 GDP(现价国际元):用于比较生活水平。 现价国际元(购买力平价)
intl_dollar
percent
PPPPC
inflation
通胀消费价格年均变动。 %
percent
points
PCPIPCH
public_debt_pct_gdp
公共债务广义政府总债务,占 GDP %。 占 GDP %
percent_of_gdp
points
GGXWDG_NGDP
population_m
人口总人口。 百万人
million_people
percent
LP
fiscal_balance_pct_gdp
财政余额广义政府净贷出(+)或净借入(−),占 GDP %。 占 GDP %
percent_of_gdp
points
GGXCNL_NGDP
current_account_pct_gdp
经常账户与世界的货物、服务和收入贸易差额,占 GDP %。 占 GDP %
percent_of_gdp
points
BCA_NGDPD
unemployment
失业失业人数占劳动力的百分比。国际货币基金组织并未公布所有国家的数据。 占劳动力 %
percent_of_labour_force
points
LUR
可能取值
API 的所有封闭列表。带标签的相同内容见 GET /api/v1(values)。
kindcountry- 54 个非洲国家之一。
region- 非洲联盟 5 个区域之一;合计由 Syli Atlas 计算。
continent- 整个非洲;合计由 Syli Atlas 计算。
imf_aggregate- 国际货币基金组织原样发布的汇总:全球、撒哈拉以南非洲。
regionnorth_africa- 北部非洲
west_africa- 西部非洲
central_africa- 中部非洲
east_africa- 东部非洲
southern_africa- 南部非洲
years.statusactual- 观测值。
estimate- 国际货币基金组织估计值:该年已结束,但数据尚非最终数据。
projection- 国际货币基金组织预测值。
unitpercent- %
percent_of_gdp- 占 GDP %
percent_of_labour_force- 占劳动力 %
usd_billion- 十亿现价美元
usd- 现价美元
intl_dollar- 现价国际元(购买力平价)
million_people- 百万人
index_2015- 指数,2015 年 = 100
points- 百分点
modechange- from 与 to 之间的变化。
value- to 年的数值。
共用结构
多个响应中共用的对象。完整的机器可读描述:/api/v1/openapi.json (OpenAPI 3.1).
AreaRef · 一个地区。
code
string
代码:国家为 ISO 3(CIV),否则为地区代码(west_africa、africa、SSA)。
kind
string
地区类型。
取值 : country | region | continent | imf_aggregate
region
string | null
国家所属的非洲联盟区域;其他情况为 null。
取值 : north_africa | west_africa | central_africa | east_africa | southern_africa | null
Names · 法文和英文文本。
fr
string
法文。
en
string
英文。
Pages · 该地区在本站的页面。
fr
string
法文页面。
en
string
英文页面。
Docs · 本文档。
fr
string
法文文档。
en
string
英文文档。
Source · 数据来源,附需复制的署名(attribution.fr 或 attribution.en)。
Years · 序列的年份。
first
integer
序列的第一年。
last
integer
序列的最后一年。
estimate_from
integer
国际货币基金组织估计的第一年。
projection_from
integer
国际货币基金组织预测的第一年。
list
integer[]
所有年份;每个序列的第 i 位对应 list[i] 年。
status
string[]
每年的状态,与 list 对齐。
取值 : actual | estimate | projection
Series · 每个指标一个列表,与 years.list 对齐。
real_gdp_index
(number | null)[]
实际 GDP(指数),2015 年 = 100,years.list 中每年一个数值(null:无数值)。
单位 : 指数,2015 年 = 100
real_gdp_growth
(number | null)[]
实际 GDP 增长率,%,years.list 中每年一个数值(null:无数值)。
单位 : %
gdp_usd_bn
(number | null)[]
GDP,十亿现价美元,years.list 中每年一个数值(null:无数值)。
单位 : 十亿现价美元
gdp_per_capita_usd
(number | null)[]
人均 GDP,现价美元,years.list 中每年一个数值(null:无数值)。
单位 : 现价美元
gdp_per_capita_ppp
(number | null)[]
人均 GDP(购买力平价),现价国际元,years.list 中每年一个数值(null:无数值)。
单位 : 现价国际元(购买力平价)
inflation
(number | null)[]
通胀,%,years.list 中每年一个数值(null:无数值)。
单位 : %
public_debt_pct_gdp
(number | null)[]
公共债务,占 GDP %,years.list 中每年一个数值(null:无数值)。
单位 : 占 GDP %
population_m
(number | null)[]
人口,百万人,years.list 中每年一个数值(null:无数值)。
单位 : 百万人
fiscal_balance_pct_gdp
(number | null)[]
财政余额,占 GDP %,years.list 中每年一个数值(null:无数值)。
单位 : 占 GDP %
current_account_pct_gdp
(number | null)[]
经常账户,占 GDP %,years.list 中每年一个数值(null:无数值)。
单位 : 占 GDP %
unemployment
(number | null)[]
失业率,占劳动力 %,years.list 中每年一个数值(null:无数值)。
单位 : 占劳动力 %
Period · 所请求期间的变化。某年无数值时为 null。
from
integer
期间的第一年。
to
integer
期间的最后一年。
ChangePercent · 水平值和指数的变化,以百分比计。
real_gdp_index
number | null
from 与 to 之间实际 GDP(指数)的变化,单位为 %。
单位 : %
gdp_usd_bn
number | null
from 与 to 之间现价美元 GDP 的变化,单位为 %。
单位 : %
gdp_per_capita_usd
number | null
from 与 to 之间人均 GDP 的变化,单位为 %。
单位 : %
gdp_per_capita_ppp
number | null
from 与 to 之间购买力平价人均 GDP 的变化,单位为 %。
单位 : %
population_m
number | null
from 与 to 之间人口的变化,单位为 %。
单位 : %
ChangePoints · 比率的变化,以百分点计。
real_gdp_growth
number | null
from 与 to 之间实际 GDP 增长率的变化,单位为百分点。
单位 : 百分点
inflation
number | null
from 与 to 之间通胀的变化,单位为百分点。
单位 : 百分点
public_debt_pct_gdp
number | null
from 与 to 之间公共债务的变化,单位为百分点。
单位 : 百分点
fiscal_balance_pct_gdp
number | null
from 与 to 之间财政余额的变化,单位为百分点。
单位 : 百分点
current_account_pct_gdp
number | null
from 与 to 之间经常账户的变化,单位为百分点。
单位 : 百分点
unemployment
number | null
from 与 to 之间失业率的变化,单位为百分点。
单位 : 百分点
Rank · 该国在默认期间按实际 GDP 增长在非洲及所属地区的名次。每版计算一次,因此不受 from 和 to 影响。
Position · 排名中的位置。
position
integer
名次,1 = 增长最高。
out_of
integer
参与排名的国家数量。
Missing · 序列中的缺口。
indicator
string
指标。
取值 : real_gdp_index | real_gdp_growth | gdp_usd_bn | gdp_per_capita_usd | gdp_per_capita_ppp | inflation | public_debt_pct_gdp | population_m | fiscal_balance_pct_gdp | current_account_pct_gdp | unemployment
years
integer[]
无数值的年份。
Performance
每个路由在服务器中耗费的时间,从请求到达至响应发出,不含网络。每次请求均测量,另有每小时探测,确保调用较少的路由也有测量值。预算:第 99 百分位 10 ms。每个响应还会在 Server-Timing 头中给出自身耗时。
/api/v1/areas
1.9 ms
1.9 ms
1.9 ms
within budget
/api/v1/areas/{code}
1.0 ms
1.0 ms
1.0 ms
within budget
/api/v1/ranking
2.4 ms
2.4 ms
2.4 ms
within budget
/api/v1/areas/{code}/csv
0.8 ms
1.3 ms
1.3 ms
within budget
last hour measured : 2026-11-12 08:00 UTC
总耗时:因国家而异
总耗时 = 网络往返 + 服务器耗时。服务器位于荷兰。响应由 Cloudflare 缓存,其在许多非洲城市设有接入点:若响应已在缓存中,便从最近的城市发出,省去往返欧洲的时间。每次发布新数据时都会清空缓存。
公开的数量级数据(Cloudflare、Hats Network、OpenMetal),因运营商而异。没有接入点的国家经由最近的城市连接。
引用来源
数据沿用其来源的许可。使用国际货币基金组织数据时请引用:“来源:国际货币基金组织,World Economic Outlook(2026年10月)”,附链接,再注明“经由 Syli Atlas”。每个 CSV 的第 1 行及“方法”页面给出确切来源。Syli Atlas 计算的内容(合计、排名、变化)采用 CC BY 4.0:可自由再利用,包括商业用途,需注明 Syli Atlas。
错误
格式始终相同,附有可在程序中判断的稳定代码。
- {
- "error": {
- "code": "unknown_area",
- "message": "Unknown area: XXX",
- "docs": "https://syliatlas.com/zh/api#errors"
- }
- }
限额与缓存
- 每个 IP 地址每分钟请求数
- 60
- 剩余配额
- ratelimit-limit · ratelimit-remaining
- 超出限额
- 429 · retry-after
- Cache
- max-age=3600 · etag
- 服务器耗时
- server-timing
数据每天最多变化一次:请发送 If-None-Match,304 响应几乎没有开销。
不在范围内
不含股票价格。 它们来自 MansaAPI,其许可允许在本站显示但不允许再分发。这些数据保留在交易所页面上,待官方来源许可后将逐个交易所纳入 API。 查看交易所