Convert an amount between currencies using live exchange rates. $0.005 per request.
Send an amount and two ISO 4217 currency codes. Get back the converted amount using the latest available exchange rate.
| Method | POST |
|---|---|
| Path | /convert |
| Content-Type | application/json |
| field | required | description |
|---|---|---|
amount | yes | Numeric amount to convert |
from | yes | Source currency code, e.g. "USD" |
to | yes | Target currency code, e.g. "GBP" |
curl -X POST https://currency-converter.pdfextractapi.workers.dev/convert \
-H "Content-Type: application/json" \
-d '{"amount": 100, "from": "USD", "to": "GBP"}'
{ "amount": 100, "from": "USD", "to": "GBP", "rate": 0.7337, "result": 73.37, "date": "2026-08-27" }
Errors return a non-200 status with { "error": { "code": "...", "message": "..." } }. Common codes: invalid_amount, invalid_currency, unknown_currency, rate_lookup_failed.
This endpoint is paid per-request via the x402 protocol (HTTP 402 + USDC). Unpaid requests receive a 402 response with payment instructions.