Currency Converter

Convert an amount between currencies using live exchange rates. $0.005 per request.

What it does

Send an amount and two ISO 4217 currency codes. Get back the converted amount using the latest available exchange rate.

Endpoint

MethodPOST
Path/convert
Content-Typeapplication/json

Fields

fieldrequireddescription
amountyesNumeric amount to convert
fromyesSource currency code, e.g. "USD"
toyesTarget currency code, e.g. "GBP"

Example

curl -X POST https://currency-converter.pdfextractapi.workers.dev/convert \
  -H "Content-Type: application/json" \
  -d '{"amount": 100, "from": "USD", "to": "GBP"}'

Example response

{ "amount": 100, "from": "USD", "to": "GBP", "rate": 0.7337, "result": 73.37, "date": "2026-08-27" }

Errors

Errors return a non-200 status with { "error": { "code": "...", "message": "..." } }. Common codes: invalid_amount, invalid_currency, unknown_currency, rate_lookup_failed.

Payment

This endpoint is paid per-request via the x402 protocol (HTTP 402 + USDC). Unpaid requests receive a 402 response with payment instructions.

Try it in your browser