Geolocalized Currency Conversion - Local Currency Conversion Using IP

Convert any amount from one currency to the local currency of the provided IP address or the client machine's IP address location, using the current exchange rates. This type of conversion is particularly beneficial for international businesses, e-commerce platforms, and financial applications that cater to a global audience. It allows you to provide users with pricing and transaction details in their local currency, enhancing user experience, improving customer satisfaction, and increasing conversion rates

10K Free Credits, No Credit Card Required

Features

IP-Based Currency Conversion

Convert any currency to the local currency of a given IP address. Whether you're using IPv4 or IPv6, our API accurately identifies the location and provides conversions based on the latest exchange rates, ensuring localized and relevant results.

Automatic Client-Side Localization

If no IP address is provided, our API automatically uses the client's IP address to determine the local currency. This allows currency conversions without manual input.

Dynamic Update Frequency

Customize the frequency of exchange rate updates for your conversions. Choose from intervals like every minute, hour, or day to get the most precise and timely conversions, tailored to your specific needs and scenarios.

Documentation

API Endpoint

GET

https://api.apifreaks.com/v1.0/currency/converter/ip-to-currency

Test
LANGUAGE
Python
PHP
Java
Node
Ruby
$ pip install requests

API Request

ParameterRequiredTypeDefaultDescription
updatesNoString1mExchange rates update period. Possible values are: (1) 1d - daily update (2) 1h - hourly update (3) 10m - 10 minute update (4) 1m - 1 minute update
fromYesString-From currency symbol
ipNoString-IPv4 or IPv6 geolocated currency
amountNoInteger1The amount to be converted

API Response

For a comprehensive view of the API response structure and detailed field descriptions, explore the interactive Response Table by clicking here.

HTTP Error Codes

HTTP StatusReasons
400
Provided IP Address [IP_ADDRESS] is invalid.
404
Geolocation of provided IP [IP_ADDRESS] is unknown.
404
Rates of provided currency [CURRENCY_CODE] are not available in our database!

How-To-Guides

Currency Conversion Using IP

Convert the provided currency to the local currency of the IP address location that is passed using the ip query parameter. Both IPv4 and IPv6 addresses are supported. If no ip is provided, then the ip of the client machine will be used. The from parameter specifies which base currency needs to be converted. If the amount parameter is not passed, then default amount value of 1 will be converted.

$ curl 'https://api.apifreaks.com/v1.0/currency/converter/ip-to-currency?apikey=API-KEY&from=GBP&ip=182.186.18.91&amount=500'
# Response { "date": "2023-03-22 08:03:00+00", "from": "GBP", "to": "PKR", "rate": "346.232", "ipAddress": "182.186.18.9", "givenAmount": "500.0", "convertedAmount": "173115.892" }

Currency Conversion by Specifying Exchange Rates Update Period

Pass the updates query parameter to get the conversion according to exchange rates that are updated after a specific period. The possible values are 1d, 1h, 10m, and 1m which will return the converted currencies that get updated every 1 day, 1 hour, 10 minutes and 1 minute respectively.

# Get currency conversion with exchange rates updated every 10 minutes.
$ curl 'https://api.apifreaks.com/v1.0/currency/converter/ip-to-currency?apikey=API-KEY&from=GBP&ip=182.186.18.91&amount=500&updates=10m'
# Response { "date": "2023-03-22 08:03:00+00", "from": "GBP", "to": "PKR", "rate": "346.232", "ipAddress": "182.186.18.9", "givenAmount": "500.0", "convertedAmount": "173115.892" }

Pricing

To use the Geolocalized Currency Converter API, API credits are required. Charges are applied only for successful queries, indicated by a 2xx status code. If a request results in a 4xx or 5xx status code, no credits will be deducted, and any credits already charged will be promptly refunded.

For each successful request, 5 credits will be charged to access the Geolocalized Currency Converter API. Utilize the Credits Usage API to efficiently monitor your recent consumption of both one-off and subscription credits. This API provides a streamlined way to track and manage your credit usage, ensuring you stay informed about your remaining balance and can optimize your resource allocation effectively.

Price Estimation Calculator