freeapis

简介

Currencylayer(APILayer 产品)提供 168 种货币的实时和历史汇率。认证是免费 API 密钥——与其他 APILayer API 一样,无效密钥返回 HTTP 200 且 "success": false(已实测)。

快速开始

实时汇率(替换 YOUR_KEY):

curl "http://api.currencylayer.com/live?access_key=YOUR_KEY&currencies=USD,CNY"
{
  "success": true,
  "timestamp": 1724300000,
  "source": "USD",
  "quotes": { "USDUSD": 1, "USDCNY": 7.2 }
}

历史数据:

curl "http://api.currencylayer.com/historical?access_key=YOUR_KEY&date=2024-01-01"

换算:

curl "http://api.currencylayer.com/convert?access_key=YOUR_KEY&from=USD&to=CNY&amount=100"

认证方式

  • 在 currencylayer.com 注册 → 免费 API 密钥(邮件发送)。
  • 通过 access_key 查询参数携带。
  • 无效密钥返回 200 + "success": false(已实测)——请检查 JSON。

速率限制与注意事项

  • 免费层:100 次请求/月(仅 USD 源)——额度小;付费档可扩展。
  • 免费层源货币是 USD;currencies= 精简响应。
  • API 走 http(部分档位 https 付费)——可用时用 https。
  • 历史和换算端点在付费档(免费层仅实时)。

常见问题

Currencylayer 免费吗? 免费层:100 次/月;更多需要付费。

为什么 200 但 success:false? APILayer 惯例——请检查响应体的 success 字段。

免费源货币是什么? USD。

汇率 分类更多

APIAuthHTTPSCORS
1Forge

Forex currency market data

API KeyYesUnknown
Amdoren

Free currency API with over 150 currencies

API KeyYesUnknown
Bank of Russia

Exchange rates and currency conversion

No authYesUnknown
Currency-api

Free Currency Exchange Rates API with 150+ Currencies & No Rate Limits

No authYesYes
CurrencyFreaks

Provides current and historical currency exchange rates with free plan 1K requests/month

API KeyYesYes