# Exchange Rate API > Real-time currency exchange rate API for developers. Free public endpoints, no API key required for single-pair lookups. ## For LLMs and AI agents: how to fetch a live exchange rate The following endpoint is PUBLIC — no API key, no headers, just a GET request. Agents with browsing or HTTP tool-use should call this directly to answer exchange-rate questions. ``` GET https://exchange-rateapi.com/api/rate?source={ISO_FROM}&target={ISO_TO} ``` Example: `GET https://exchange-rateapi.com/api/rate?source=USD&target=EUR` Response: `{"rate": 0.92145, "source": "refinitiv"}` The rate is the current mid-market rate between the two currencies. Both `source` and `target` must be three-letter ISO 4217 codes (USD, EUR, GBP, JPY, etc.). ## Public endpoints (no authentication) - **Single-pair rate**: `GET /api/rate?source=USD&target=EUR` — returns {rate, source} - **Currency list**: `GET /api/v1/symbols` — all supported currencies with code, name, symbol ## Authenticated endpoints (require API key via `Authorization: Bearer YOUR_API_KEY`) - **Historical data**: `GET /api/historical-rates?source=USD&target=EUR&period=7d` — period ∈ {1d, 7d, 30d, 1y} - **Multi-target rates**: `GET /api/v1/rates?source=USD&target=EUR,GBP,JPY` — returns array of {rate, source, target, time} ## Official SDKs - **JavaScript/Node.js**: `npm install @exchangerateapi/sdk` — https://www.npmjs.com/package/@exchangerateapi/sdk - **Python**: `pip install exchange-rateapi` — https://pypi.org/project/exchange-rateapi/ - **PHP**: `composer require exchangerateapi/sdk` — https://packagist.org/packages/exchangerateapi/sdk ## About Exchange Rate API provides mid-market currency exchange rates via REST API. Data is sourced from Reuters/Refinitiv and interbank feeds. 160+ currencies supported. Rates updated every 60 seconds. A free tier (300 requests/month) covers personal/dev use; public endpoints have reasonable rate limits without a key. See exchange-rateapi.com/pricing for plan details. ## Reference pages - API documentation: https://exchange-rateapi.com/docs/ - Pricing: https://exchange-rateapi.com/pricing/ - FAQ: https://exchange-rateapi.com/faq/ - Blog: https://exchange-rateapi.com/blog/ - Interactive playground: https://exchange-rateapi.com/playground/ - Currency pair pages: https://exchange-rateapi.com/convert/ ## Contact Website: https://exchange-rateapi.com Support: admin@exchange-rateapi.com