IP to currency API for prices in local money
Send a price and a visitor's IP address. Get back their currency and the converted amount in one request, for IPv4 and IPv6.
Pick a visitor
ip
81.2.69.142
49 USD shown to this visitor
37.45 GBP
British pound, at a rate of 0.76426
{ "from": "USD", "to": "GBP", "rate": "0.76426",
"givenAmount": "49.0", "convertedAmount": "37.449" }Included from the
Growth plan
from $49.99 a month
- Developer, not included
- Starter, not included
- Growth, included
- Professional, included
- Enterprise, included
IP address currency detection and conversion in one call
A local price needs three answers: where the visitor is, which currency they use there, and what your price is in it. This endpoint gives all three in one response.
Usual setup
Three services to keep in sync
IP geolocation API
ip to country
Your own lookup table
country to currency
Exchange rate API
price to local amount
Two keys, two bills and a table you update when a country changes its currency.
With CurrencyFreaks
One request
to
GBP
rate
0.76426
convertedAmount
37.449
One key, one bill, and the currency of every country kept up to date for you.
You pick the source. The IP picks the target.
There is no to parameter. The target currency comes from the IP address and is returned in the to field.
Parameters
apikeyRequiredThe key from your dashboard.
fromRequiredThe currency your price is stored in.
ipOptionalThe visitor's IPv4 or IPv6 address. Without it, the caller's IP is used.
amountOptionalThe price to convert. Defaults to 1.0.
formatOptionalSet to xml for an XML response.
- to
- "GBP"
- The currency of the IP address. This is the one the API chooses.
- rate
- "0.76426"
- The rate from your currency to theirs.
- convertedAmount
- "37.449"
- Your price in the visitor's currency.
- givenAmount
- "49.0"
- The amount you sent.
- from
- "USD"
- The currency you sent.
- ipAddress
- "81.2.69.142"
- The address that was looked up.
- date
- "2026-11-25 06:54:00+00"
- When the rate was last updated.
400, invalid ip
Provided IP Address 999.1.1.1 is invalid.
400, missing from
From Currency is invalid. It cannot be empty or null!
Call it from your server and pass the visitor's IP
Keep the key on the server, read the visitor's address from the incoming request, and cache the result for the session.
Behind a proxy or CDN
Read the client IP from the forwarded header your platform sets, not the socket address.
Cache per session
The currency rarely changes during a visit, so one request per session is enough.
Let people switch
Show the detected currency as the default, with a switcher next to the price.
Charge what you settle
Bill in the currency your payment provider settles, and show local prices as a guide.
Multi currency pricing without a location prompt
The same 49 USD price, shown to visitors from three of the IP addresses above.
Online stores
Show product prices in the shopper's own currency from the first page view, without a location prompt.
SaaS pricing pages
Give visitors a feel for the cost in the money they think in, while you bill in the currency you settle.
Travel and booking
Quote fares, add-ons and stays in the traveller's home currency.
Questions, answered
The things developers ask before they write the first line.
Still have a question?
Send us your question and a developer from the team will get back to you.
Contact the teamHow does the IP to Currency API work?
You send a price, the currency it is stored in, and the visitor's IP address. The API looks up the currency used where that IP is located and returns it in the to field, with the rate and the converted amount.
Do I need a separate IP geolocation API?
No. The currency lookup and the conversion happen in the same request, so there is one API, one key and one bill.
What if I do not send an IP address?
The API uses the IP of the caller. That is handy for a quick test from a browser, but on a server it is your server's address, so pass the visitor's IP in production.
Does it support IPv6?
Yes. Both IPv4 and IPv6 addresses are accepted.
Does the response include the visitor's country?
No. It returns the currency code in the to field, which is what a price needs. If you also need the country or city, use an IP geolocation service for that part.
What happens when the visitor's currency is the one I sent?
The to field matches from, the rate is 1 and the converted amount equals the amount you sent, so the same code path works for every visitor.
Which plans include it?
Growth, Professional and Enterprise. Growth is $49.99 a month with 150,000 requests and 10 minute rate updates.
What about visitors on a VPN?
The currency follows the IP address the API sees, so a VPN exit in another country gives that country's currency. Show the detected currency as a default and let visitors switch it.
More endpoints on the same key
Every visitor sees a price they understand
IP to currency comes with the Growth plan and above, together with historical data and 10 minute updates.