Free Geolocation API
Developer API for geolocation and IP address information.
Loading...
Routes
https://geo.cmds.media/ip?ip={ip}
Useful for general information.
Code Examples
import requests
response = requests.get("https://geo.cmds.media/ip?ip=8.8.8.8")
data = response.json()
print(data)
curl "https://geo.cmds.media/ip?ip=8.8.8.8"
const response = await fetch("https://geo.cmds.media/ip?ip=8.8.8.8");
const data = await response.json();
console.log(data);
Example Response
{
"accuracy": 1000,
"asn": 15169,
"asn_org": "GOOGLE",
"city": null,
"continent": "North America",
"continent_code": "NA",
"country": "United States",
"country_iso": "US",
"currency": "usd",
"currency_symbol": "$",
"ip": "8.8.8.8",
"latitude": 37.751,
"longitude": -97.822,
"postal": null,
"region": null,
"region_iso": null,
"success": true,
"timezone": "America/Chicago",
"tz_offset": -4.0
}
https://geo.cmds.media/currency?ip={ip}
Useful for online stores with localized currency.
Code Examples
import requests
response = requests.get("https://geo.cmds.media/currency?ip=8.8.8.8")
data = response.json()
print(data)
curl "https://geo.cmds.media/currency?ip=8.8.8.8"
const response = await fetch("https://geo.cmds.media/currency?ip=8.8.8.8");
const data = await response.json();
console.log(data);
Example Response
{
"country": "United States",
"country_iso": "US",
"currency": "usd",
"currency_symbol": "$",
"ip": "8.8.8.8",
"success": true
}
https://geo.cmds.media/client?ip={ip}&ua={user_agent}
Returns geolocation plus device, browser, and OS information. Takes in User-Agent header.
Code Examples
import requests
headers = {
"User-Agent": "Mozilla/5.0"
}
response = requests.get(
"https://geo.cmds.media/client?ip=8.8.8.8",
headers=headers
)
data = response.json()
print(data)
curl "https://geo.cmds.media/client?ip=8.8.8.8" \
-H "User-Agent: Mozilla/5.0"
const response = await fetch("https://geo.cmds.media/client?ip=8.8.8.8", {
headers: {
"User-Agent": navigator.userAgent
}
});
const data = await response.json();
console.log(data);
Example Response
{
"asn": 15169,
"asn_org": "GOOGLE",
"browser": {
"name": "Chrome",
"version": "145.0.0"
},
"city": "Mountain View",
"continent": "North America",
"continent_code": "NA",
"country": "United States",
"country_iso": "US",
"device": {
"brand": null,
"model": null
},
"device_type": "desktop",
"ip": "8.8.8.8",
"latitude": 37.4056,
"longitude": -122.0775,
"os": {
"name": "Windows",
"version": "10"
},
"postal": "94043",
"region": "California",
"region_iso": "CA",
"success": true,
"timezone": "America/Los_Angeles",
"accuracy": 1000
}
https://geo.cmds.media/geo?ip={ip}
Detailed geolocation information including coordinates and ASN.
Code Examples
import requests
response = requests.get("https://geo.cmds.media/geo?ip=8.8.8.8")
data = response.json()
print(data)
curl "https://geo.cmds.media/geo?ip=8.8.8.8"
const response = await fetch("https://geo.cmds.media/geo?ip=8.8.8.8");
const data = await response.json();
console.log(data);
Example Response
{
"accuracy": 1000,
"asn": 15169,
"asn_org": "GOOGLE",
"city": "Mountain View",
"continent": "North America",
"continent_code": "NA",
"country": "United States",
"country_iso": "US",
"ip": "8.8.8.8",
"latitude": 37.4056,
"longitude": -122.0775,
"postal": "94043",
"region": "California",
"region_iso": "CA",
"success": true,
"timezone": "America/Los_Angeles",
"tz_offset": -7.0
}
https://geo.cmds.media/country?ip={ip}
Minimal country-level lookup designed for compliance checks and geo restrictions.
Code Examples
import requests
response = requests.get("https://geo.cmds.media/country?ip=8.8.8.8")
data = response.json()
print(data)
curl "https://geo.cmds.media/country?ip=8.8.8.8"
const response = await fetch("https://geo.cmds.media/country?ip=8.8.8.8");
const data = await response.json();
console.log(data);
Example Response
{
"country": "United States",
"country_iso": "US",
"continent": "NA",
"in_eu": false,
"ip": "8.8.8.8",
"success": true
}
How does rate limiting work?
Our API uses a token bucket algorithm for rate limiting. Each endpoint has a certain number of tokens that are replenished at a fixed rate. When you make a request, it consumes a token. If there are no tokens left, you will receive a 429 Too Many Requests response with a Retry-After header indicating when you can try again.
How are errors handled?
If a request fails, we will return a JSON response with a "success" field set to false and an "error" field containing a message describing the issue. Always check the "success" field before processing the response data.
If a field does not apply to a particular IP address (e.g., "city" for an IP that only resolves to a country), it will be returned as null.
FAQ
Is this API actually free?
Of course! Our API is completely free to use with generous rate limits. We do not require an API key or any form of authentication.
Where do you get your geolocation data?
We use a combination of public and private internal data sources, including MaxMind's GeoIP2 databases, to provide the largest coverage.
Can I use this API for commercial purposes?
Yes, you can use our API for both personal and commercial projects without any restrictions.
What should I do if I encounter an error?
If you encounter any issues or have questions, please contact us via our support form.
Do you have a paid plan or higher rate limits?
Currently, we do not offer a paid plan. We may consider it in the future if there is enough demand, but for now, we want to keep this API free for everyone.
As for rate limit increases, you may contact us with details about your usage via our support form.
I have a suggestion for a new feature or endpoint. How can I share it?
We welcome feedback and suggestions. Please share your ideas through our feedback form.
How often is your geolocation data updated?
We update our geolocation data when new geolocation data becomes available.
Can any language other than the ones listed be used?
Yes, you can use any programming language that can make HTTP requests to interact with our API. The examples provided are just a few common languages to help get you started.
I have another question that isn't listed here.
If you have any other questions, please feel free to reach out to us through our support form. We're here to help.