Data
Look up places of IP addresses, exchange rates, VAT numbers and the weather.
On this page
Every service is a POST request with your token. See Call Total API from Total.js and Call Total API over HTTP.
API
rest
POST https://api.totaljs.com/geoip/
Finds the place of an IP address.
POST https://api.totaljs.com/geoip/| Parameter | Type | Description |
|---|---|---|
value |
String |
The IP address. |
Returns Object The country, region, city, coordinates, provider and time zone of the address.
var place = await API('TAPI', 'geoip', '78.98.116.204').promise();
curl -X POST https://api.totaljs.com/geoip/ \
-H "Content-Type: application/json" \
-H "X-Token: YOUR_TOKEN" \
-d '{ "value": "78.98.116.204" }'
{
"ip": "78.98.116.204",
"isp": "Slovak Telekom, a.s.",
"country": "Slovakia",
"country_code": "SK",
"region": "Banska Bystrica",
"region_code": "BC",
"city": "Banská Bystrica",
"zip": "974 01",
"continent": "Europe",
"continent_code": "EU",
"lat": 48.804,
"lng": 19.1363,
"timezone": "Europe/Bratislava"
}
rest
POST https://api.totaljs.com/exchangerates/
Reads the exchange rates of a currency on a day.
POST https://api.totaljs.com/exchangerates/| Parameter | Type | Description |
|---|---|---|
currency? |
String |
The base currency. Default: EUR |
date? |
String |
The day, for example 2026-11-19. Default: today |
Returns Object An object with one rate for each currency.
The answer has more currencies than this example shows.
var rates = await API('TAPI', 'exchangerates', { currency: 'EUR', date: '2026-11-19' }).promise();
console.log(rates.USD);
curl -X POST https://api.totaljs.com/exchangerates/ \
-H "Content-Type: application/json" \
-H "X-Token: YOUR_TOKEN" \
-d '{ "currency": "EUR", "date": "2026-11-19" }'
{
"USD": 1.2109,
"GBP": 0.9,
"CHF": 1.0764,
"CZK": 26.239,
"PLN": 4.4246,
"JPY": 126.05
}
rest
POST https://api.totaljs.com/checkvat/
Checks whether a company is a VAT payer in the European Union.
POST https://api.totaljs.com/checkvat/| Parameter | Type | Description |
|---|---|---|
value |
String |
The VAT ID, for example SK2120417167. |
Returns Object Whether the company pays VAT, the VAT rate of its country, its name and its address.
It works only with VAT IDs of the European Union. is says whether the company is a VAT payer, and vat is the VAT rate of its country.
var company = await API('TAPI', 'checkvat', 'SK2120417167').promise();
curl -X POST https://api.totaljs.com/checkvat/ \
-H "Content-Type: application/json" \
-H "X-Token: YOUR_TOKEN" \
-d '{ "value": "SK2120417167" }'
{
"is": true,
"vat": 20,
"name": "Total Avengers s. r. o.",
"address": "Viestova 6784/28\n97401 Banská Bystrica\nSlovensko"
}
rest
POST https://api.totaljs.com/weather/
Reads the current weather of a place.
POST https://api.totaljs.com/weather/| Parameter | Type | Description |
|---|---|---|
value |
String |
The place, for example Bratislava. |
Returns Object The temperature, wind, humidity, pressure, clouds, UV index and sky.
var weather = await API('TAPI', 'weather', 'Bratislava').promise();
curl -X POST https://api.totaljs.com/weather/ \
-H "Content-Type: application/json" \
-H "X-Token: YOUR_TOKEN" \
-d '{ "value": "Bratislava" }'
{
"name": "Bratislava",
"temperature": 22,
"wind": 20.2,
"humidity": 65,
"pressure": 1018,
"cloud": 25,
"uv": 6,
"sky": "Partly cloudy"
}