Skip to main content
GET
/
convert
Currency Conversion
curl --request GET \
  --url https://api.exchangeratesapi.com.au/convert \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "free": true,
  "query": {
    "from": "AUD",
    "to": "USD",
    "amount": 100
  },
  "info": {
    "rate": 0.643512
  },
  "date": "2025-08-31",
  "result": 64.3512
}

Overview

The conversion endpoint allows you to convert between AUD and other supported currencies. This endpoint requires authentication and is subject to your plan’s monthly quota.
This endpoint requires authentication. Get your API key to start making requests.

Authentication

Authorization
string
required
Bearer token with your API key: Bearer your_api_key_here

Request

Parameters

from
string
required
Source currency code (any supported currency)
to
string
required
Target currency code (any supported currency except TWI)
amount
number
required
Amount to convert (positive number)

Example Requests

curl "https://api.exchangeratesapi.com.au/convert?from=AUD&to=USD&amount=100" \
  -H "Authorization: Bearer your_api_key_here"

Response

{
  "success": true,
  "free": true,
  "query": {
    "from": "AUD",
    "to": "USD",
    "amount": 100
  },
  "info": {
    "rate": 0.643512
  },
  "date": "2025-08-31",
  "result": 64.3512
}
success
boolean
required
Always true for successful conversions
free
boolean
required
Always true for free tier conversions (distinguishes from authenticated endpoint)
query
object
required
Echo of the conversion parameters used
query.from
string
required
Source currency code
query.to
string
required
Target currency code
query.amount
number
required
Amount that was converted
info
object
required
Information about the exchange rate used
info.rate
number
required
Exchange rate used for conversion (from currency per to currency) with precision varying by currency (up to 6 decimal places for most, whole numbers for IDR/VND as provided by RBA)
date
string
required
Date of the exchange rate used (YYYY-MM-DD format)
result
number
required
Converted amount rounded to 4 decimal places

Rate Limiting

The free conversion endpoint has strict rate limiting to ensure fair usage:

Limits

  • 3 requests per hour per IP address
  • Limit resets every hour (not rolling)
  • Based on client IP address
  • Applies only to the free /convert endpoint

Rate Limit Headers

Every response includes rate limit information:
HTTP/2 200 OK
X-RateLimit-Limit: 3
X-RateLimit-Remaining: 2
X-RateLimit-Window: 3600
X-RateLimit-Reset: 2025-09-01T15:00:00Z
HeaderDescription
X-RateLimit-LimitMaximum requests allowed per window (3)
X-RateLimit-RemainingRequests remaining in current window
X-RateLimit-WindowWindow duration in seconds (3600 = 1 hour)
X-RateLimit-ResetWhen the current window resets

Rate Limit Exceeded

When you exceed the limit:
{
  "success": false,
  "error": {
    "code": 429,
    "type": "rate_limit_exceeded",
    "info": "Rate limit exceeded. Try again in 2847 seconds."
  }
}
Response Headers:
HTTP/2 429 Too Many Requests
X-RateLimit-Limit: 3
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 2025-09-01T15:00:00Z

Limitations

Cross-Currency Support

Free conversions support all currency pairs:
# ✅ AUD to USD
curl "https://api.exchangeratesapi.com.au/convert?from=AUD&to=USD&amount=100"

# ✅ USD to EUR (cross-currency conversion)
curl "https://api.exchangeratesapi.com.au/convert?from=USD&to=EUR&amount=100"

# ✅ GBP to JPY (cross-currency conversion)  
curl "https://api.exchangeratesapi.com.au/convert?from=GBP&to=JPY&amount=100"

TWI Restriction

Trade-Weighted Index (TWI) cannot be used for conversions:
# ❌ Not allowed - will return 400 error  
curl "https://api.exchangeratesapi.com.au/convert?from=AUD&to=TWI&amount=100"

Latest Rates Only

Free conversions only use the latest available rates. Historical conversion requires an authenticated account.

Error Responses

Invalid Currency (400)

{
  "success": false,
  "error": {
    "code": 400,
    "type": "bad_request",
    "info": "Unsupported currency 'XYZ'"
  }
}

TWI Conversion (400)

{
  "success": false,
  "error": {
    "code": 400,
    "type": "bad_request", 
    "info": "TWI is not allowed for conversion"
  }
}

Invalid Amount (400)

{
  "success": false,
  "error": {
    "code": 400,
    "type": "bad_request",
    "info": "Invalid amount. Must be a positive number"
  }
}

Missing Parameters (400)

{
  "success": false,
  "error": {
    "code": 400,
    "type": "bad_request", 
    "info": "Missing required parameters: from, to, amount"
  }
}

Method Not Allowed (405)

{
  "success": false,
  "error": {
    "code": 405,
    "type": "method_not_allowed",
    "info": "Method POST not allowed. Only GET, HEAD, and OPTIONS are supported."
  }
}

Upgrade to Unlimited

For production use, unlimited conversions, and additional features:

Free Tier Use Cases

The free conversion endpoint is perfect for:

1. Testing & Development

// Test currency conversion logic
async function testConversion() {
  const testCases = [
    { from: 'AUD', to: 'USD', amount: 100 },
    { from: 'AUD', to: 'EUR', amount: 50 },
    { from: 'AUD', to: 'GBP', amount: 25 }
  ];
  
  for (const test of testCases) {
    try {
      const response = await fetch(
        `https://api.exchangeratesapi.com.au/convert?` +
        `from=${test.from}&to=${test.to}&amount=${test.amount}`
      );
      const data = await response.json();
      console.log(`${test.amount} ${test.from} = ${data.result} ${test.to}`);
    } catch (error) {
      console.error('Test failed:', error);
    }
  }
}

2. Demos & Prototypes

<!-- Simple conversion calculator -->
<div id="converter">
  <input type="number" id="amount" placeholder="Amount in AUD" min="0.01" step="0.01">
  <select id="currency">
    <option value="USD">US Dollar</option>
    <option value="EUR">Euro</option>
    <option value="GBP">British Pound</option>
    <option value="JPY">Japanese Yen</option>
  </select>
  <button onclick="convert()">Convert</button>
  <div id="result"></div>
</div>

<script>
async function convert() {
  const amount = document.getElementById('amount').value;
  const currency = document.getElementById('currency').value;
  
  if (!amount || amount <= 0) {
    alert('Please enter a valid amount');
    return;
  }
  
  try {
    const response = await fetch(
      `https://api.exchangeratesapi.com.au/convert?from=AUD&to=${currency}&amount=${amount}`
    );
    const data = await response.json();
    
    if (data.success) {
      document.getElementById('result').innerHTML = 
        `${amount} AUD = ${data.result} ${currency}`;
    } else {
      throw new Error(data.error.info);
    }
  } catch (error) {
    document.getElementById('result').innerHTML = 
      `Error: ${error.message}`;
  }
}
</script>

3. Educational Projects

Perfect for learning about APIs, HTTP requests, and currency conversion logic without needing to sign up for accounts.
Production Usage: While the free tier is great for testing, production applications should use authenticated endpoints for reliability and higher limits.

Authorizations

Authorization
string
header
required

API key authentication using Bearer token

Query Parameters

from
enum<string>
required

Source currency code

Available options:
AUD,
USD,
EUR,
GBP,
JPY,
CNY,
KRW,
INR,
SGD,
NZD,
THB,
MYR,
IDR,
VND,
HKD,
PHP,
CAD,
CHF,
TWD,
TWI,
SDR
to
enum<string>
required

Target currency code

Available options:
AUD,
USD,
EUR,
GBP,
JPY,
CNY,
KRW,
INR,
SGD,
NZD,
THB,
MYR,
IDR,
VND,
HKD,
PHP,
CAD,
CHF,
TWD,
TWI,
SDR
amount
number
required

Amount to convert

Required range: x > 0
date
string

Historical date for conversion (YYYY-MM-DD). Requires authentication.

Response

Conversion result

success
boolean
required
Example:

true

query
object
required
info
object
required
date
string
required
result
number
required

Conversion result

free
boolean

Indicates if this was a free (unauthenticated) request