# IP Geolocation API: VPN Check, Time Zone and Currency Rates (`nabeelbaghoor/ip-geolocation-timezone-currency-api`) Actor

IP geolocation API for IPv4 and IPv6: country, city, coordinates, ASN, ISP, VPN, proxy and Tor detection, abuse contacts, time zones, sunrise and sunset, user agent parsing (ipgeolocation.io) plus live and historical exchange rates (CurrencyFreaks). Bring your own key.

- **URL**: https://apify.com/nabeelbaghoor/ip-geolocation-timezone-currency-api.md
- **Developed by:** [Nabeel Hassan](https://apify.com/nabeelbaghoor) (community)
- **Categories:** Developer tools, Business, Integrations
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 ip geolocation records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## IP Geolocation API: VPN Check, Time Zone and Currency Rates

Look up the country, city, coordinates, ASN, ISP, VPN and proxy status, time zone and local currency of any IPv4 or IPv6 address with your own ipgeolocation.io key, plus live and historical exchange rates from CurrencyFreaks, as clean rows you can export to CSV, Excel or JSON.

ipgeolocation.io and CurrencyFreaks are two APIs run by the same company (JFreaks Software Solutions). This actor wraps the read endpoints of the ipgeolocation.io API v3: IP geolocation, IP security (VPN, proxy, Tor, bot and threat detection), ASN, abuse contact, time zone, time conversion, astronomy and user agent parsing. It also wraps the CurrencyFreaks API v2.0: latest and historical exchange rates for fiat, crypto and metals, time series, fluctuation, conversion, IP to currency and the supported currency list. Use it for fraud screening, visitor analytics, ad and content localization, log enrichment, compliance checks, scheduling across time zones and multi currency pricing. Bring your own API key.

BYOK, not live tested: every route, parameter and response field comes from the providers' own documentation (ipgeolocation.io/documentation, the official ipgeolocation.io Postman collection, and currencyfreaks.com/documentation), and routes were probed on 2026-11-02 with an invalid key. The actor has not been run against a live key.

### What it does

- **IP geolocation**: continent, country, region, district, city, postal code, latitude and longitude, EU flag, calling code, languages, currency, ASN and time zone for each IP. Paid plans add accuracy radius, DMA code, network, company, hostname, security and abuse fields through include modules.
- **IP security and VPN detection**: threat score, VPN, proxy, residential proxy, Tor, relay, bot, spam, known attacker and cloud provider flags with provider names and confidence scores (paid plans).
- **ASN lookup**: AS name, organization, country, type, domain, RIR, allocation date and route counts by AS number or IP, with optional peers, upstreams, downstreams, routes and raw WHOIS (paid plans).
- **Abuse contact**: the registry abuse contact for an IP: route, organization, address, emails and phone numbers (paid plans).
- **Time zone**: current local time, UTC offset, DST status and the next DST transitions for an IANA time zone name, an address, coordinates, an IP, an IATA or ICAO airport code or a UN/LOCODE.
- **Time conversion**: convert a time from one IANA time zone to another, with the difference in hours and minutes.
- **Astronomy**: sunrise, sunset, solar noon, day length, twilight and golden hour times, sun and moon position, moonrise, moonset and moon phase for any place and date.
- **User agent parsing**: browser or bot name and version, device type and brand, engine and operating system from any user agent string.
- **Exchange rates (CurrencyFreaks)**: latest rates on every plan; historical rates back to 1984-11-28, time series and fluctuation on paid plans, for 1,000+ fiat currencies, cryptocurrencies and precious metals.
- **Currency conversion and IP to currency**: convert amounts at the latest or a past rate, or into the local currency of an IP address.
- **Plan aware**: a feature your plan lacks ends the run cleanly with a message naming the plan that has it.
- **Read only and pay only for results**: empty answers and refused lookups become a free row that says why.

### How to get your own key

1. Sign up at app.ipgeolocation.io. The free plan gives 1,000 credits a day for life and covers IP geolocation (default fields), time zone, time conversion, astronomy and user agent parsing. Paid plans add include modules, IP security, ASN, abuse contact, domain lookups and other languages.
2. For the currency modes, sign up at currencyfreaks.com/signup. The free plan gives 1,000 calls a month for latest rates against USD; paid plans add other bases, historical rates, conversion, time series, fluctuation and IP to currency.
3. Paste the keys into the **ipgeolocation.io API key** and **CurrencyFreaks API key** fields, or set the DATA_API_KEY (and DATA_API_KEY_CURRENCY) secrets. Both providers document only a query parameter for the key, so the actor adds it to the request and removes it from every log line and message.

### Input

| Field | Modes | Notes |
| --- | --- | --- |
| `mode` | all | `ipLookup`, `ipSecurity`, `asnLookup`, `abuseContact`, `timezone`, `timeConvert`, `astronomy`, `userAgent`, `fxLatest`, `fxHistorical`, `fxTimeSeries`, `fxFluctuation`, `fxConvert`, `ipToCurrency`, `currencies` |
| `apiKey` | ipgeolocation.io modes | your ipgeolocation.io key; falls back to the DATA_API_KEY secret |
| `currencyApiKey` | CurrencyFreaks modes | your CurrencyFreaks key; falls back to DATA_API_KEY_CURRENCY, then DATA_API_KEY |
| `ips` | ipLookup, ipSecurity, asnLookup, abuseContact, ipToCurrency | one IPv4 or IPv6 address per line (ipLookup also takes domains on paid plans) |
| `asns` | asnLookup | AS numbers such as AS15169 |
| `include` | ipLookup | `geo_accuracy`, `dma_code`, `security`, `abuse`, `hostname`, `liveHostname`, `hostnameFallbackLive` (paid) |
| `asnInclude` | asnLookup | `peers`, `downstreams`, `upstreams`, `routes`, `whois_response` |
| `fields`, `excludes` | ipLookup, ipSecurity, asnLookup, abuseContact | comma separated field filters with dot notation |
| `lang` | ipLookup, IP based timezone and astronomy | 13 languages; other than English needs a paid plan |
| `lookupBy` | timezone, astronomy | `timeZoneName`, `location`, `coordinates`, `ip`, `iata`, `icao`, `locode` |
| `places` | timezone, astronomy | one place per line in the chosen form |
| `dates` | astronomy, fxHistorical | one YYYY-MM-DD per line |
| `elevation`, `eventTimeZone` | astronomy | meters above sea level; time zone for the event times |
| `timeConversions` | timeConvert | `America/New_York Asia/Tokyo 2026-12-08 11:00` per line |
| `userAgents` | userAgent | one user agent string per line |
| `base`, `symbols` | fx rate modes | base code (USD on the free plan) and codes to return |
| `startDate`, `endDate` | fxHistorical, fxTimeSeries, fxFluctuation | inclusive range |
| `conversions` | fxConvert | `100 USD EUR`, or `100 USD EUR 2024-01-31` for a past rate |
| `amount` | ipToCurrency | amount in the base currency |
| `maxResults` | all | stop after this many rows (default 1,000) |

### Output

An IP geolocation row:

```json
{
    "mode": "ipLookup",
    "recordType": "geolocation",
    "query": "91.128.103.196",
    "found": true,
    "ip": "91.128.103.196",
    "continentCode": "EU",
    "countryCode": "SE",
    "countryName": "Sweden",
    "stateProv": "Stockholms lan",
    "city": "Stockholm",
    "zipcode": "164 40",
    "latitude": 59.4051,
    "longitude": 17.9551,
    "isEu": true,
    "callingCode": "+46",
    "currencyCode": "SEK",
    "asNumber": "AS1257",
    "asOrganization": "Tele2 Sverige AB",
    "timeZone": "Europe/Stockholm",
    "utcOffset": 1,
    "currentTime": "2026-10-29 11:33:55.296+0100",
    "isDst": false
}
```

An IP security row:

```json
{
    "mode": "ipSecurity",
    "recordType": "security",
    "query": "39.63.58.51",
    "found": true,
    "ip": "39.63.58.51",
    "threatScore": 0,
    "isVpn": false,
    "isProxy": false,
    "isResidentialProxy": false,
    "isTor": false,
    "isBot": false,
    "isCloudProvider": false
}
```

An exchange rate row:

```json
{
    "mode": "fxLatest",
    "recordType": "rate",
    "query": "latest",
    "found": true,
    "date": "2026-08-25",
    "rateTime": "2026-08-25 13:26:00+00",
    "base": "USD",
    "currency": "EUR",
    "rate": 0.9278605451,
    "inverseRate": 1.0777481651
}
```

Time zone rows carry `timeZone`, `utcOffset`, `localDateTime`, `isDst` and the DST transitions; astronomy rows carry `sunrise`, `sunset`, `solarNoon`, `dayLength`, `moonPhase` and the sun and moon positions; user agent rows carry `uaName`, `uaType`, `deviceType`, `deviceBrand`, `osName` and `osVersion`; conversion rows carry `from`, `to`, `amount`, `rate` and `converted`. The values above are illustrative.

### Pricing

Pay per event, only for rows with data:

| Event | Price |
| --- | --- |
| IP geolocation record | $0.01 |
| IP security and VPN detection record | $0.015 |
| ASN record | $0.01 |
| Abuse contact record | $0.01 |
| Time zone record | $0.005 |
| Time conversion | $0.005 |
| Astronomy record (one place and date) | $0.005 |
| Parsed user agent | $0.005 |
| Exchange rate (one currency and date) | $0.005 |
| Exchange rate fluctuation (one currency) | $0.005 |
| Currency conversion | $0.005 |
| Supported currency rows | free |

Your ipgeolocation.io and CurrencyFreaks plans are billed separately by the provider. On ipgeolocation.io an IP lookup costs 1 credit, plus 2 with security and 1 with abuse, and the IP security endpoint costs 2; only successful answers use credits. On CurrencyFreaks every call counts against the monthly quota, so a symbols list and the time series mode keep long histories cheap.

### FAQ

#### What is the ipgeolocation.io IP Geolocation API?

The ipgeolocation.io API is a REST API for IP intelligence run by JFreaks Software Solutions. Version 3 returns location, country metadata, currency, ASN, network, company, time zone, security and abuse data for any IPv4 or IPv6 address, and offers separate time zone, astronomy and user agent endpoints.

#### Can I use the free ipgeolocation.io plan?

Yes. The free plan gives 1,000 credits a day and covers IP geolocation with the default fields, time zone, time conversion, astronomy and user agent parsing. IP security, ASN, abuse contact, include modules, domain lookups and other languages need a paid plan; the run ends cleanly and says so if your key lacks them.

#### How does the actor detect VPNs, proxies and Tor?

The IP security mode calls the ipgeolocation.io /v3/security endpoint, which flags VPN, proxy, residential proxy, Tor, relay, bot, spam, known attacker and cloud provider traffic and gives a 0 to 100 threat score with provider names and confidence scores. The same fields come with IP geolocation when you add the security include module.

#### What is CurrencyFreaks?

CurrencyFreaks is an exchange rate API from the same company, covering 1,000+ currencies: fiat, cryptocurrencies and gold, silver, platinum and palladium. Latest rates work on the free plan; historical rates back to 1984-11-28, conversion, time series, fluctuation and IP to currency need paid plans.

#### Why are there two API key fields?

ipgeolocation.io and CurrencyFreaks issue separate accounts and keys. The IP, time zone, astronomy and user agent modes use the ipgeolocation.io key; the exchange rate modes use the CurrencyFreaks key. You only need the key for the modes you run.

#### How accurate is IP geolocation?

ipgeolocation.io states 99%+ accuracy at country level, 90%+ at region level and 85%+ at city level, lower on mobile networks. Paid plans can return an accuracy radius and confidence per result with the geo_accuracy include module.

#### What do I pay?

$0.01 per IP geolocation, ASN or abuse record, $0.015 per IP security record, and $0.005 per time zone, time conversion, astronomy, user agent, exchange rate, fluctuation or conversion row. Supported currency rows, empty answers and refused lookups are free.

### Keyword map

IP geolocation API, IP lookup, IP to location, IP to country, IP address API, VPN detection API, proxy detection, Tor detection, IP threat score, ASN lookup, ISP lookup, abuse contact lookup, IP to time zone, time zone API, time zone converter, sunrise sunset API, moon phase API, user agent parser, exchange rates API, historical exchange rates, currency converter API, IP to currency, ipgeolocation.io, CurrencyFreaks.

### Routes and verification

| Mode | Route | Probe with an invalid key (twice) |
| --- | --- | --- |
| IP geolocation | GET api.ipgeolocation.io/v3/ipgeo | 401 JSON "Provided API key is not valid" |
| IP security | GET /v3/security | 401 JSON, same message |
| ASN | GET /v3/asn | documented, not probed |
| Abuse contact | GET /v3/abuse | documented, not probed |
| Time zone | GET /v3/timezone | 401 JSON, same message |
| Time conversion | GET /v3/timezone/convert | documented, not probed |
| Astronomy | GET /v3/astronomy | documented, not probed |
| User agent | GET /v3/user-agent | 401 JSON, same message |
| Invented control route | GET /v3/geoip-lookup | 404 JSON "No endpoint GET /v3/geoip-lookup." |
| Latest rates | GET api.currencyfreaks.com/v2.0/rates/latest | 401 JSON "Invalid Api Access Exception" |
| Time series | GET /v2.0/timeseries | 401 JSON, same |
| Convert | GET /v2.0/convert/latest | 401 JSON, same |
| Historical, fluctuation, historical convert, IP to currency | GET /v2.0/rates/historical, /fluctuation, /convert/historical, /iptocurrency | documented, not probed |
| Supported currencies | GET /v2.0/supported-currencies | 200 JSON without a key, as documented |
| Invented control route | GET /v2.0/rates/spot | 404 JSON "No Handler Found Exception" |

The user agent mode uses the documented GET form, which parses the User-Agent header of the request, so it works on the free plan.

### Licensing and data use

This actor works only with your own ipgeolocation.io and CurrencyFreaks keys, and your agreements with those providers apply. The ipgeolocation.io Terms of Service grant, by default, an End-User License for your own internal business processes, security filtering and analytics on infrastructure you control; the free plan may be used in production and for commercial purposes under the same terms. That license does not allow exposing raw lookup results externally, public tools, white-labeling or passing raw results to third parties, which need a Commercial, Reseller or Redistribution license from ipgeolocation.io. The CurrencyFreaks Terms of Service license the data for reference by your own application's end users only and say you may not transfer the data outside your own applications, redistribute, resell or publish it. Both providers require you to keep your credentials confidential and not disclose them to any other party. Neither sets a cache or retention limit. Use the results inside your own systems and do not resell or republish the raw data. This actor is not affiliated with or endorsed by ipgeolocation.io or CurrencyFreaks.

# Actor input Schema

## `mode` (type: `string`):

Each mode calls one documented read endpoint. The first eight use the ipgeolocation.io API and your ipgeolocation.io key; the last seven use the CurrencyFreaks API and your CurrencyFreaks key. Plans named below are the providers' own.

## `apiKey` (type: `string`):

Your own API key from app.ipgeolocation.io (a free plan with 1,000 credits a day exists). Used by the IP, time zone, astronomy and user agent modes. Leave empty to use the DATA_API_KEY secret.

## `currencyApiKey` (type: `string`):

Your own API key from currencyfreaks.com (a free plan with 1,000 calls a month exists). Used by the exchange rate modes. Leave empty to use the DATA_API_KEY_CURRENCY or DATA_API_KEY secret. Not needed for the supported currencies mode.

## `ips` (type: `array`):

IP geolocation, IP security, ASN, abuse contact and IP to currency. One IPv4 or IPv6 address per line. IP geolocation also takes domain names on paid plans. Each address is one request.

## `asns` (type: `array`):

ASN lookup. One AS number per line, such as AS15169 or 15169. Looked up directly, without an IP.

## `include` (type: `array`):

IP geolocation. Optional modules added to each answer (the include parameter). ipgeolocation.io paid plans only; a free key is refused.

## `asnInclude` (type: `array`):

ASN lookup. Optional lists added to each ASN record (the include parameter).

## `fields` (type: `string`):

IP geolocation, IP security, ASN and abuse contact. Comma separated fields or objects to return, with dot notation, such as location.city,asn.organization. Leave empty for the full answer. Works on every plan.

## `excludes` (type: `string`):

IP geolocation, IP security, ASN and abuse contact. Comma separated fields or objects to remove, such as currency,location.continent_code.

## `lang` (type: `string`):

IP geolocation, and IP based time zone and astronomy lookups. Languages other than English need an ipgeolocation.io paid plan.

## `lookupBy` (type: `string`):

Time zone and astronomy. How each line of Places is read. Astronomy takes an address, coordinates or an IP address, and reads a time zone name setting as an address.

## `places` (type: `array`):

Time zone and astronomy. One place per line, in the form chosen above: Europe/London, London, UK, 51.5072,-0.1276, 8.8.8.8, LHR, EGLL or DEBER.

## `dates` (type: `array`):

Astronomy and historical exchange rates. One date per line as YYYY-MM-DD. Astronomy reads every place for every date (today when empty); historical rates read each date, from 1984-11-28.

## `elevation` (type: `integer`):

Astronomy. Height above sea level used to refine sunrise and sunset, from 0 to 10,000 meters.

## `eventTimeZone` (type: `string`):

Astronomy. An IANA time zone name, such as Europe/London, to express sunrise, sunset and the other event times in. Leave empty for the place's own time zone.

## `timeConversions` (type: `array`):

Time conversion. One conversion per line: source and target IANA time zone names and an optional time as YYYY-MM-DD HH:mm or YYYY-MM-DD HH:mm:ss. Without a time the current time is converted.

## `userAgents` (type: `array`):

User agent parsing. One full user agent string per line. Each string is one request.

## `base` (type: `string`):

Exchange rate modes, and the currency converted from in IP to currency. A currency code such as USD, EUR or BTC. A base other than USD needs a CurrencyFreaks paid plan.

## `symbols` (type: `array`):

Latest, historical, time series and fluctuation. Limit the answer to these codes (fiat, crypto such as BTC or metals such as XAU). Leave empty for every currency.

## `startDate` (type: `string`):

Historical rates, time series and fluctuation. First day of a range as YYYY-MM-DD. Historical rates read every day of the range (up to 1,000 days, one call each); time series and fluctuation read it in one call.

## `endDate` (type: `string`):

Historical rates, time series and fluctuation. Last day of the range as YYYY-MM-DD, inclusive. Defaults to today for historical rates and to yesterday for time series and fluctuation, as the API does.

## `conversions` (type: `array`):

Currency conversion. One conversion per line as amount, from code and to code, such as 100 USD EUR. Add a date, such as 100 USD EUR 2024-01-31, to convert at that day's rate.

## `amount` (type: `number`):

IP to currency. The amount in the base currency to convert into each IP address's local currency.

## `maxResults` (type: `integer`):

The run stops after this many rows.

## Actor input object example

```json
{
  "mode": "ipLookup",
  "ips": [
    "8.8.8.8",
    "1.1.1.1"
  ],
  "lang": "en",
  "lookupBy": "timeZoneName",
  "places": [
    "Europe/London",
    "America/New_York"
  ],
  "base": "USD",
  "symbols": [
    "EUR",
    "GBP",
    "JPY"
  ],
  "amount": 1,
  "maxResults": 1000
}
```

# Actor output Schema

## `records` (type: `string`):

One row per geolocation, security, ASN, abuse, time zone, conversion, astronomy, user agent, rate, fluctuation or currency record the chosen mode read.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "ips": [
        "8.8.8.8",
        "1.1.1.1"
    ],
    "places": [
        "Europe/London",
        "America/New_York"
    ],
    "symbols": [
        "EUR",
        "GBP",
        "JPY"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("nabeelbaghoor/ip-geolocation-timezone-currency-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "ips": [
        "8.8.8.8",
        "1.1.1.1",
    ],
    "places": [
        "Europe/London",
        "America/New_York",
    ],
    "symbols": [
        "EUR",
        "GBP",
        "JPY",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("nabeelbaghoor/ip-geolocation-timezone-currency-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "ips": [
    "8.8.8.8",
    "1.1.1.1"
  ],
  "places": [
    "Europe/London",
    "America/New_York"
  ],
  "symbols": [
    "EUR",
    "GBP",
    "JPY"
  ]
}' |
apify call nabeelbaghoor/ip-geolocation-timezone-currency-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nabeelbaghoor/ip-geolocation-timezone-currency-api"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/5oD3n14xOHoGrXfPR/builds/s4NUNbbmNLmN5BGUq/openapi.json
