PHP Exchange Rates API
PHP Currency API
Get Live Exchange Rates in PHP. Simple integration, comprehensive documentation, and reliable exchange rate data for your PHP applications.
No card required. Free plan is 500 requests/month
<?php
$url = "https://currencyapi.net/api/v1/rates";
$params = [
"key" => "YOUR_API_KEY",
"base" => "USD",
"output" => "JSON"
];
$response = file_get_contents($url . "?" . http_build_query($params));
$data = json_decode($response, true);
print_r($data);Trusted by PHP developers worldwide
Join thousands of developers who rely on our Currency API for their PHP applications, with low latency JSON responses, dependable uptime, and reliable data sources.
Our API powers PHP applications across industries—from WordPress plugins to enterprise Laravel applications. Built for PHP developers, trusted by teams.
50M+ Requests Every Month
Built to handle high traffic smoothly and reliably.
10,000+ Happy Customers
Chosen by developers, startups, and growing teams.
Supporting Devs Since 2019
A proven platform you can count on long-term.
~50ms Average Latency
Fast responses for real-time PHP apps and websites.
Our Pricing Plans
Get started with our PHP Exchange Rates API for free. Perfect for PHP developers building personal projects or testing. Upgrade to paid plans for production PHP applications with higher limits, faster updates, and commercial usage rights.
Free
Perfect for personal projects
- 500 monthly requests
- Hourly updates
- Fetch currency rates in PHP
- Rate limits (10 req/min)
- Commercial use
- Technical support
- Change base currency
Commercial
Built for production applications
- Up to 10M+ monthly requests
- Updates as fast as 60 seconds
- Historical rates back to 2000
- Official PHP SDK included
- Convert endpoint for PHP
- Commercial use allowed
- Technical email support
- Team management
- Multiple API keys
- IP whitelisting/blacklisting
How Our PHP Currency API Works
Sign Up
Sign up for a free account to get started with our API. Paid plans start at just $9.99/month.
Get Your API Key
After signing up, you'll receive an API key. Use this key to authenticate requests to our API endpoints.
Integrate the API
Use our PHP SDK (composer require houseofapis/currencyapi) or code samples to quickly integrate.
Getting Started: PHP Integration
Implement our PHP Currency API in your application using either standard HTTP clients or our official PHP SDK. Both approaches are fully supported and documented.
<?php
$url = "https://currencyapi.net/api/v1/rates";
$params = [
"key" => "YOUR_API_KEY",
"base" => "USD",
"output" => "JSON"
];
$response = file_get_contents($url . "?" . http_build_query($params));
$data = json_decode($response, true);
print_r($data);Using Our PHP SDK
Our Official PHP SDK (houseofapis/currencyapi) provides a clean, object-oriented interface with fluent methods, error handling, and type safety.
Install with composer require houseofapis/currencyapi and enjoy a more intuitive development experience. Perfect for Laravel, Symfony, WordPress, and any PHP application.
<?php
use HouseOfApis\CurrencyApi\CurrencyApi;
$currencyApi = new CurrencyApi('YOUR_API_KEY');
$result = $currencyApi->setOutput('JSON')->setBase('USD')->rates();
print_r($result);
AI Assisted PHP Integration
Integrate our Exchange Rates API effortlessly with AI assistants. We provide a simple llms.txt file that contains all the information about our API in a format optimized for AI assistants and Large Language Models.
AI assistants like ChatGPT, Claude, Cursor, Windsurf, and others can quickly understand our API capabilities and help you integrate Currency API more efficiently into your PHP applications.
Simply reference our llms.txt file and let AI assistants guide you through PHP integration, code examples, and best practices. More information can be found on our LLM Documentation page.
What PHP Developers Build With Our API
See how PHP developers use our Currency API endpoints to power their applications. From real-time rates to historical analysis, discover the possibilities.
<?php
$url = "https://currencyapi.net/api/v1/rates";
$params = [
"key" => "YOUR_API_KEY",
"base" => "USD",
"output" => "JSON"
];
$response = file_get_contents($url . "?" . http_build_query($params));
$data = json_decode($response, true);
print_r($data);Live Exchange Rates
Fetch real-time exchange rates for 152+ currencies in a single API call. Perfect for building currency converters, e-commerce pricing engines, and financial dashboards.
PHP developers use this endpoint to power real-time currency displays, update product prices dynamically, and build trading applications that need current market rates.
Currency Conversion
Convert a currency from one to another with a single API request. Ideal for checkout flows, invoice generation, and payment processing systems.
PHP developers integrate this endpoint into Laravel and WordPress applications to handle multi-currency transactions, calculate shipping costs in different currencies, and build international payment gateways.
<?php
$url = "https://currencyapi.net/api/v1/convert";
$params = [
"key" => "YOUR_API_KEY",
"from" => "GBP",
"to" => "USD",
"amount" => 100,
"output" => "JSON"
];
$response = file_get_contents($url . "?" . http_build_query($params));
$data = json_decode($response, true);
print_r($data);<?php
$url = "https://currencyapi.net/api/v1/history";
$params = [
"key" => "YOUR_API_KEY",
"date" => "2020-01-01",
"base" => "USD",
"output" => "JSON"
];
$response = file_get_contents($url . "?" . http_build_query($params));
$data = json_decode($response, true);
print_r($data);Historical Exchange Rates
Access Historical Exchange Rates for a specific date going back to the year 2000. Essential for financial reporting, backtesting trading strategies, and analyzing currency trends over time.
PHP developers use historical data to build various graphs, analytics dashboards, generate financial reports, perform currency trend analysis, and create data visualizations for business intelligence tools.
Timeframe Analysis
The Timeframe Endpoint allows you to retrieve rates for multiple historical dates in one request. Perfect for analyzing currency movements over weeks, months, or years.
PHP developers leverage timeframe data to build portfolio tracking tools, create currency performance reports, analyze seasonal trends, and power financial forecasting models in data science applications.
<?php
$url = "https://currencyapi.net/api/v1/timeframe";
$params = [
"key" => "YOUR_API_KEY",
"start_date" => "2017-12-25",
"end_date" => "2018-01-10",
"base" => "USD",
"output" => "JSON"
];
$response = file_get_contents($url . "?" . http_build_query($params));
$data = json_decode($response, true);
print_r($data);Powerful Dashboard for PHP Developers
Manage your PHP API usage, monitor performance, and access powerful analytics through our intuitive dashboard. Everything you need to optimize your PHP currency data integration.

Dashboard Features
FAQs
Questions about using our API with PHP? Below are some of our most asked questions or feel free to get in touch.
How do I install the PHP SDK?
Install our PHP SDK using Composer: composer require houseofapis/currencyapi. The SDK is available on Packagist and supports PHP 7.2 and higher.
Once installed, use it with: use HouseOfApis\CurrencyApi\CurrencyApi;. Then create an instance with your API key to start making requests.
Do I need to use the SDK, or can I use HTTP clients directly?
You can use either approach! The SDK provides a cleaner, more object-oriented interface with built-in error handling and fluent methods.
If you prefer, you can use Guzzle, cURL, file_get_contents(), or any HTTP client library directly with our REST API. Both approaches are fully supported and documented.
Does the PHP SDK support namespaces and PSR standards?
Yes, the PHP SDK follows PSR-4 autoloading standards and uses proper namespaces.
If you want to find out more, checkout out the code in the PHP SDK GitHub repository.
Can I use this with Laravel, Symfony, or WordPress?
Absolutely! Our PHP Currency API works seamlessly with Laravel, Symfony, WordPress, CodeIgniter, and any PHP framework or CMS.
You can integrate it into controllers, create service providers, or use it in plugins. Check our PHP SDK Documentation for framework-specific examples.
What PHP versions are supported?
Our PHP SDK supports PHP 7.2 and higher. For direct API calls using HTTP clients like Guzzle or standard PHP functions, any PHP version that supports these will work.
We recommend PHP 7.4+ for the best experience and latest language features like typed properties and arrow functions.
How do I handle errors in PHP?
Use PHP's try/catch blocks. The SDK throws exceptions for API errors, network issues, and invalid requests.
Wrap your API calls: try { $result = $currencyApi->rates(); } catch (\Exception $e) { echo $e->getMessage(); }. See our Error Handling Documentation for detailed examples.