• Installs:
  • Today: 200
  • This Week: 0
  • This Month: 0
  • All Time: 1800
Developer:userthe-basetrip
Readme

The Basetrip API

The Basetrip API

Welcome

Welcome to The Basetrip's API. Here you will find all the info you need to know to get started using our API, including use cases, pricing & actual requests and responses.

The Basetrip API enables you to retrieve travel information for more than 240 countries - including basic information (name, ISO codes, flag, GeoJSON etc.) currency information, electricity (sockets & plugs), tipping, ATMs, credit & debit cards, driving, dial codes, internet & mobile phone, health, emergency numbers, embassy contacts and more.

Use cases

The Basetrip API is already being used within various mobile applications, websites and industries to enrich existing user experiences. The most common ones being tourist agencies, travel agents, travel platforms, accommodation providers and publishers related to tourism/travel.

Tourism agencies

Most common scenario is enriching existing sites for tourism itineraries and routes and providing additional info on checkout page like whether to bring an electrical adapter, what is the tipping etiquette etc.

Travel agents

Agents within larger corporations are using The Basetrip to gather basic info about particular country which they then enrich with custom trip/itinerary information.

Travel platforms & accommodation providers

Travel platforms and accommodation providers are using The Basetrip to provide their users with additional data/snippets of particular city or a country, alongside their main offers like trips or apartment bookings.

Publishers

Publishers are using The Basetrip to accompany travel articles with country data i.e. if travel article is about France, publisher would provide additional snippets alongside the article about France.

Data

We are retrieving data from multiple online and offline sources including PDFs, paper tourist guides and more to combine them together and provide you with the structured data. Some data may be omitted for some countries as not all countries have all the data available. Existing data is continually updated and new data is added on monthly basis.

Contact

If you have any questions or comments, please let us know at [email protected].

Setup

To get access to the API you'll need your API key. You will receive it via email shortly after you pay the monthly subscription. When you receive API key, use it as the {{api-key}} variable. API key must be sent via X-API-Key header on every request.

Base URL

Base URL is https://api.thebasetrip.com/v2. Latest API version is v2. Old version v1 is deprecated, but fully supported until 1st of June, 2017.

Content-Type

Usage of Content-Type: application/json header is optional.

Country details

Get all the details about a specific country.

Path parameters:

  • {{country}} - required, use sanitized country name

Query parameters:

  • from - optional, use sanitized country name if you want to include an embassy of from country in {{country}} country and driving license

Response objects

Response is categorized in the following objects (note that any of the categories can be omitted for some countries due to missing/incomplete data):

  • basic
  • currency
  • electricity
  • tipping
  • atms
  • creditDebitCard
  • driving
  • dialCode
  • internet
  • mobilePhone
  • health
  • alcohol
  • drugs
  • sex
  • religion
  • emergency
  • embasssy

Price

Money/price object is represented as a following object (by default currency will be the same as the country currency)

{
  "amount": 13.25,
  "amountInteger": 1325,
  "currency": "USD",
  "displayAs": "$13.25"
}

Basic

NameTypeDescription
name.sanitizedStringSanitized country name
name.commonStringCommon country name - usually the one displayed on the UI
name.officialStringOfficial country name
name.native.languageStringLanguage code
name.native.typeStringCountry name type (OFFICIAL, COMMON)
name.native.valueStringCountry name in defined language
code.alpha2StringISO 3166-1 alpha-2 two-letter country code
code.alpha3StringISO 3166-1 alpha-3 three-letter country code
code.numericStringISO 3166-1 numeric three-digit country code
languages.codeStringLanguage ISO 639-3 three-letter code, in the other parts of the API it's as a language parameter
languages.typeStringLanguage type (for now only OFFICIAL)
languages.nameStringLanguage name in English
location.regionStringCountry region (Africa, Americas, Asia, Europe or Other)
location.subregionStringCountry subregion
location.geoJsonStringUrl of geoJSON data
capital.nameStringName of the capital city
capital.coordinates.latitudedoubleLatitude in decimal degrees
capital.coordinates.longitudedoubleLongitude in decimal degrees
capital.timeZoneStringTime zone ID (full list)
measurementSystemStringMETRIC or IMPERIAL
ituRegionintThe International Telecommunication Union region (1, 2 or 3)
timeZone.minUtcTimeOffsetintMinimum time offset in minutes in the country (UTC)
timeZone.maxUtcTimeOffsetintMaximum time offset in minutes in the country (UTC)
timeZone.minUtcTimeDstOffsetintMinimum time offset in minutes in the country (UTC) during DST
timeZone.maxUtcTimeDstOffsetintMaximum time offset in minutes in the country (UTC) during DST
flag.pngStringLink to the country flag in PNG format (512px in width)
flag.svgStringLink to the country flag in SVG format
coverImage.urlStringImage used as a country cover (usually the panorama of the capital)
coverImage.attributionStringAttribution link for the image

Currency

NameTypeDescription
name.shortStringShort currency name (i.e. dollar)
name.fullStringFull currency name (i.e. Australian dollar)
codeStringISO 4217 currency code
symbolStringCurrency symbol (notice: use UTF-8 to properly display all the symbols)
subunit.nameStringSingular noun of the currency subunit
subunit.ratiointDefines how many subunits are in the one (base) unit
denominations.typeStringCOIN or BANKNOTE
denominations.valueintValue in subunits
denominations.displayAsStringHow the actual value is presented on the coin/banknote. Notice that sometimes coins would read 1/2 of the base currency instead of 50 subunits, if the subunit.ratio is 100 (ex. Algerian dinar has a values of 1/4 or 1/2 dinars)
denominations.isSubunitbooleanWhether displayAs value is in subunits or not

Electricity

NameTypeDescription
frequenciesint[]Frequencies in use
voltagesint[]Voltages in use
sockets.typeStringType of the socket (A, B, C, D, E, F, G,H, I, J, K, L, M, N)
sockets.image.pngStringLink to the socket image in the PNG format (189×177px)
sockets.image.svgStringLink to the socket image in the SVG format

Tipping

NameTypeDescription
tipping.categoryStringTipping category (OVERALL, HOTEL_PORTER, HOTEL_HOUSEKEEPER, HOTEL_CONCIERGE, TAXI_DRIVER, RESTAURANT, BAR_CAFFE, SPA, TOUR_GUIDE, TOUR_MUSEUM_GUIDE, TOUR_BUS_DRIVER)
tipping.tippingStringType of tipping (NOT_EXPECTED, SHOW_APPRECIATION, DESIRABLE, EXPECTED)
tipping.includedServiceChargeStringWhether service charge is included within the bill (ALWAYS, USUALLY, SOMETIMES, ALMOST_NEVER)
tipping.isIllegalbooleanWhether tipping is illegal
tipping.isOffensivebooleanWhether tipping is offensive/rude
tipping.tip.typeStringType of the tip (GENERAL, SERVICE_BAD, SERVICE_OK, SERVICE_EXCELLENT, SERVICE_OUTSTANDING)
tipping.tip.frequencyStringHow often should you tip (PER_DAY, PER_NIGHT, PER_BAG)
tipping.tip.amountObjectOmitted if there are tipping.tip.from and tipping.tip.to attributes
tipping.tip.from & tipping.tip.toObjectOmitted if there is tipping.tip.amount attribute
tipping.tip.{amount/from/to}.typeStringType of the tip regarding the actual money (NONE, ROUND_UP, PERCENTAGE, CURRENCY). If type is NONE or ROUND_UP there are no other attributes. If type is PERCENTAGE extra attribute amount determines actual percentage. If type is CURRENCY extra attributes from money object are added (amount, amountInteger, currency and displayAs).

ATMs

NameTypeDescription
coverageStringATM coverage index as a category (RARE, COMMON, VERY_COMMON, EVERYWHERE)
localNamesString[]Local name for the "ATM"

Credit/debit cards

NameTypeDescription
acceptanceInternationalCardsStringAcceptance of international credit/debit cards (VERY_LOW, LOW, MEDIUM, HIGH, VERY_HIGH)
cards.brandStringType of the credit/debit card (VISA, MASTERCARD, MAESTRO, AMERICAN_EXPRESS, JCB, DISCOVER, DINERS_CLUB, UNION_PAY, RU_PAY)
cards.acceptanceStringAcceptance of the specific card brand (NONE LOW, MEDIUM, HIGH)
hotlineNumbers.brandStringType of the credit/debit card (VISA, MASTERCARD, MAESTRO, AMERICAN_EXPRESS, JCB, DISCOVER, DINERS_CLUB, UNION_PAY, RU_PAY)
hotlineNumbers.numberStringPhone number in international format
hotlineNumbers.isTollFreebooleanIndicates whether the number is toll free when called from the country (local call)

Driving

Note that license attribute is shown only if from parameter is provided.

NameTypeDescription
sideStringDriving side (LEFT, RIGHT)
transmissionStringUsual transmission (AUTOMATIC, MANUAL)
allowedRightTurnOnRedbooleanIs it allowed to turn right on red
alcoholLimitPercentagedoubleAlcohol percentage limit above which is illegal to drive
license.acceptanceStringWhat type of license is accepted when driving in a country as a foreigner (LOCAL, IDP, ORIGINAL)
license.fromObjectCountry provided within from parameter for which this driving license acceptance is valid
speedLimits.roadTypeStringRoad type (WITHIN_TOWNS, UNDIVIDED_HIGHWAY, MOTORWAY, EXPRESSWAY) where both MOTORWAY and EXPRESSWAY are under a DIVIDED_HIGHWAY group
speedLimits.limitintLimit in km/h
petrol.stations.nameStringName of the petrol station in the country
petrol.fuel.typeStringType of the fuel (PETROL, DIESEL)
petrol.fuel.localNamesString[]Local names for the fuel

Dial code

NameTypeDescription
callingString[]The code you need to dial when calling from other country
exitString[]The code (prefix) you need to dial before a destination calling code, usually it's replaced just with + sign on modern phones
trunkString[]The code used for local calls only when calling from one region to another (Notice: some countries require the use of the trunk codes, even within the same region)

Internet

NameTypeDescription
averageSpeedKbpsintAverage internet speed in kbps - kilobit per second
wifi.coverageStringWiFi coverage index as a category (RARE, COMMON, VERY_COMMON, EVERYWHERE)

Mobile phone

NameTypeDescription
dataPackage.sizeMbintData package size in megabytes
dataPackage.priceObjectUsual price for the package
carriers.nameStringName of the country mobile carrier
carriers.websiteStringWebsite of the country mobile carrier
capabilities.nameStringFull name of the network capability available
capabilities.typeStringMore general type of the network capability (TYPE_2G, TYPE_3G, TYPE_4G)

Health

NameTypeDescription
euInsuranceUrlStringThe URL for the European Union health insurance
vaccination.policyStringVaccination policy while entering the country (NOT_REQUIRED, NOT_REQUIRED_BUT_RECOMMENDED, RECOMMENDED)
vaccination.risks.nameStringRisk name (YELLOW_FEVER, ROUTINE_IMMUNIZATIONS, CHOLERA, HEPATITIS_A, HEPATITIS_B, JAPANESE_ENCEPHALITIS, MENINGOCOCCAL_MENINGITIS, POLIO, RABIES, TICK_BORNE_ENCEPHALITIS, TYPHOID_FEVER)
vaccination.risks.isSelectivebooleantrue if it applies only to select travelers

Alcohol

NameTypeDescription
legalbooleanWhether alcohol consumption is legal at all
minimumPurchaseAgeintMinimum age required to buy an alcoholic drink
allowed.carryInPublicbooleanIs it allowed to carry alcohol openly in public (without a container)
allowed.drinkInPublicbooleanIs it allowed to drink alcohol in public
allowed.drunkInPublicbooleanIs it allowed to be drunk in public
consumption.averageLitersPerCapitadoubleAverage amount of alcohol that's consumed during one year per person

Drugs

NameTypeDescription
typeStringType of drug (ALL, CANNABIS)
purposeStringWhether this relates to ALL, POSSESSION, SALE, TRANSPORT or CULTIVATION
useTypeStringWhether this relates to ANY, PERSONAL or MEDICAL use
legalbooleanWhether the drug is legal
decriminalizedbooleanWhether the drug is decriminalized for personal/recreational use. Decriminalization means that you won't go to jail and it won't be written in your criminal record, but you could still pay a fine, get sent to rehab etc.
limit.amountintWhether this related only up to a specific amount of drug
limit.unitStringGRAM, TABLET, PLANT, JOINT

Sex

NameTypeDescription
ageOfConsentintThis is the age that criminal law recognizes the legal capacity of a young person to consent to sexual activity. Generally, it is legal to have sexual contact with someone who is ageOfConsent years old or older if they agree to have sex with you.
prostitution.legal.payForSexbooleanIs it legal to pay for sex (as a client)
prostitution.legal.offerServicesbooleanIs it legal to offer services (as a prostitute)
prostitution.legal.brothelsbooleanAre brothels legal (a place where people may come to engage in sexual activity with a prostitute)
prostitution.legal.pimpingbooleanIs pimping legal (facilitation or provision of a prostitute or sex worker in the arrangement of a sex act with a customer)

Religion

NameTypeDescription
distribution.typeStringReligion (CHRISTIANITY, ISLAM, UNAFFILIATED, HINDUISM, BUDDHISM, FOLK, OTHER, JUDAISM) where FOLK are so-called "popular beliefs" and UNAFFILIATED who have absence, indifference, rejection of, or hostility towards religion (sometimes called Irreligion)
distribution.percentagedoublePercentage of population who practice religion type

Emergency

NameTypeDescription
numbers.typeStringEmergency service (POLICE, AMBULANCE, FIRE_DEPARTMENT, DEAF_FAX_SMS, MISSING_CHILDREN, MARITIME_RESCUE, OTHER)
numbers.numbersString[]Local telephone numebers for the service

Embassy

Shown only if from parameter is specified.

NameTypeDescription
nameStringEmbassy name
addressStringFull address (including street, city, region & country)
phoneStringPhone in international format
faxStringFax in international format
websiteStringWebsite
emailStringEmail

Overview

Welcome to The Basetrip's API overview. Here you will find the basic info you need to know to get started using our API. For full documentation please visit The Basetrip API Documentation website.

Getting the API key

To get the API key you need to register on Mashape as our API is powered by Mashape which brings you client libraries, billing & invoicing support and more. After registration - subscribe to one of our plans after which you will receive a Mashape API key to use in your requests.

MASHAPE

All of the Mashape's features are available at the Mashape - Features page. If you have any additional questions regarding Mashape please take a look at their Developer resources or send us a message via chat.

Making requests

There are two main endpoints - one for country list and one for country details. For each endpoint we provided a sample request and response as well as explained all the response attributes on our Documentation pages.

BASE URL

Base URL is https://thebasetrip.p.mashape.com/v2

AUTHENTICATION

When you receive your Mashape API key, use it as X-Mashape-Key header on every request.

CONTENT TYPE

The only supported type is application/json content type.

Support

If you need help feel free to send us a message via email/chat on The Basetrip API page or API Support via Mashape.

Abe

sdasdasd

x
circle
The Basetrip
$ / m
We will charge your card every month for the plan amount, as well as any overages incurred in the previous month.
?

Oops, we are missing some details

Looks like there are a few missing details that you haven't filled in yet.
These details are important and will help us protect you and let you know about anything new.

x

Connect your app to APIs via RapidAPI

Consume and monitor multiple APIs through the RapidAPI SDK.
Click start to set up your app and connect to your first API.

START

Give your app a name

This app will be used in RapidAPI to collect and connect all the APIs you need.

NEXT

Connect your project

Choose your backend language and then install & require the RapidAPI SDK.

  • node
    NodeJS
  • php
    PHP
  • python
    Python
  • objc
    Obj-C
  • android
    Android
  • go
    GO
  • ruby
    Ruby
  • csharp
    C#

Install SDK

Run the following command to install the SDK:

npm install rapidapi-connect --save

Require SDK

In your code, add the following code to require the RapidAPI SDK:

NEXT

Hooray! You are connected

Use the following code to try it out by getting all the APIs that are on RapidAPI.

rapid.call('RapidAPI', 'getAll', {'{}'});
FINISH
esccloses this view
x

Login to RapidAPI

Create endpoints based on popular APIs and share with others.
Follow popular APIs and get updated. Stand out in the community of developers.

Login with Github
Login with Facebook
Login with Google
Or
Remember Me

  • We're not going to post anything on your wall.
  • We're not planning to spam you.
  • esccloses this view
    x

    Why sign up to RapidAPI?

    • integrate
      Integrate APIs into your app
      Ruby, Java, Elixir, Node.js, Phyton, Objective C, Swift, PHP and MORE
    • keys
      Save all API keys in one place
    • notifications
      Get notifications about API changes
    • stats
      Get stats and monitor API connections
    Sign up with Github
    Sign up with Facebook
    Sign up with Google
  • We're not going to post anything on your wall.
  • We're not planning to spam you.
  • esccloses this view
    x

    Authentication

    Authenticate
    esccloses this view