Netflix, YouTube, and Spotify price according to local markets. Why miss out?
{
"country": "Romania",
"adjustedPrice": 15.85,
"discountPercentage": 58
}
We developed a straightforward API that accepts GET requests. The amount (in USD) to be converted is a mandatory parameter. Additionally, you can provide either the customer's IP address or their country code in ISO-3166 format (2 or 3 characters).
The API uses the Purchase Power Parity (PPP) algorithm to adjust the price based on the customer’s country of origin. It will return the adjusted price in USD, unless the local currency is requested.
Here you will find some sample code to get started, but feel free to explore our full documentation for more details.
<?php
$ipAddress = "{IP-ADDRESS}";
$amount = "{AMOUNT}";
$url = "https://api.pppapi.com/v1/json?amount=$amount&ipAddress=$ipAddress";
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
# Query using customer's ip address
curl https://api.pppapi.com/v1/json?amount=50&ipAddress=82.24.22.44
# Query using customer's country of origin
curl https://api.pppapi.com/v1/json?amount=50&countryCode=UAE
import requests
ip_address = "{IP-ADDRESS}"
amount = "{AMOUNT}"
url = f"https://api.pppapi.com/v1/json?amount={amount}&ipAddress={ip_address}"
response = requests.get(url)
data = response.json()
print(data)
Start for free with our Basic Plan, which includes 20 requests per day. Upgrade to the Professional Plan for unlimited requests and fast, dedicated support.