Free Travel API with JSON Examples (Flights, Hotels, Places & More)

✍️ By Rayds Editorial Team | 📅 Updated October 2026 | ⏱️ 10 min read

If you are building a trip planner, a student project, or a prototype of a travel booking site, you do not need to pay for data on day one. Several travel APIs offer a free tier, a free sandbox, or open data that returns clean JSON.

The catch: "free" means different things. Some APIs are free forever but limited to places, maps or weather. Others give you a free test environment for flights and hotels, but real bookable inventory needs a paid or approved production account.

This guide lists the most useful free travel APIs, shows real request and response JSON for each, and is honest about the limits so you can pick the right one before writing code.

Before you rely on any of these: free tiers, quotas and terms change often. The JSON samples below are trimmed and simplified for readability. Always confirm current limits and licence terms in each provider's official documentation.

Quick Comparison of Free Travel APIs

API Covers API key? What "free" means
Amadeus Self-Service Flights, airports, hotels, destinations Yes (OAuth2) Free test environment with limited sample data; production access has its own quota and pricing
Travelpayouts Cached flight and hotel price data Yes (token) Free for affiliate partners; data is cached, not live booking
Duffel Flight search and booking Yes Free test mode; live usage is commercial
OpenTripMap Attractions, points of interest Yes (free key) Free key with rate limits
Nominatim (OSM) Geocoding, place search No Free under a strict fair-use policy (about 1 request per second)
Open-Meteo Weather forecast No Free for non-commercial use; commercial plans exist
REST Countries Country, currency, language data No Free, open data

Free Flight APIs with JSON Examples

1. Amadeus Self-Service API (test environment)

  • Best for: learning how real flight search APIs work, prototypes, hackathons
  • Auth: OAuth2 client credentials (API key + secret from Amadeus for Developers)
  • Watch out: the test environment returns limited, cached-style data and is not meant for real customers

Step 1: get an access token

cURL
curl "https://test.api.amadeus.com/v1/security/oauth2/token" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials&client_id=YOUR_API_KEY&client_secret=YOUR_API_SECRET"
Response (JSON)
{
  "type": "amadeusOAuth2Token",
  "access_token": "YOUR_ACCESS_TOKEN",
  "expires_in": 1799,
  "state": "approved",
  "token_type": "Bearer"
}

Step 2: search flight offers (Mumbai to Dubai)

cURL
curl "https://test.api.amadeus.com/v2/shopping/flight-offers?originLocationCode=BOM&destinationLocationCode=DXB&departureDate=2026-12-10&adults=1&max=2" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response (trimmed, illustrative)
{
  "meta": { "count": 2 },
  "data": [
    {
      "type": "flight-offer",
      "id": "1",
      "itineraries": [
        {
          "duration": "PT3H15M",
          "segments": [
            {
              "departure": { "iataCode": "BOM", "at": "2026-12-10T08:05:00" },
              "arrival":   { "iataCode": "DXB", "at": "2026-12-10T09:50:00" },
              "carrierCode": "EK",
              "number": "501"
            }
          ]
        }
      ],
      "price": { "currency": "EUR", "grandTotal": "212.40" }
    }
  ]
}

Python example

Python
import requests

BASE = "https://test.api.amadeus.com"

token = requests.post(
    f"{BASE}/v1/security/oauth2/token",
    data={
        "grant_type": "client_credentials",
        "client_id": "YOUR_API_KEY",
        "client_secret": "YOUR_API_SECRET",
    },
).json()["access_token"]

resp = requests.get(
    f"{BASE}/v2/shopping/flight-offers",
    headers={"Authorization": f"Bearer {token}"},
    params={
        "originLocationCode": "BOM",
        "destinationLocationCode": "DXB",
        "departureDate": "2026-12-10",
        "adults": 1,
        "max": 2,
    },
)

for offer in resp.json().get("data", []):
    price = offer["price"]
    print(price["currency"], price["grandTotal"])

2. Travelpayouts Data API (cached prices, free for affiliates)

  • Best for: "cheapest flights" widgets, fare calendars, deal pages that link out to booking
  • Auth: token from your Travelpayouts account
  • Watch out: prices are cached from user searches, so they can be stale. You send users to a partner to book, you don't book inside your app.
cURL
curl "https://api.travelpayouts.com/aviasales/v3/prices_for_dates?origin=BOM&destination=DXB&departure_at=2026-12&currency=inr&limit=2&token=YOUR_TOKEN"
Response (trimmed, illustrative)
{
  "success": true,
  "currency": "inr",
  "data": [
    {
      "origin": "BOM",
      "destination": "DXB",
      "price": 18450,
      "airline": "EK",
      "departure_at": "2026-12-10T08:05:00+05:30",
      "transfers": 0,
      "duration": 200,
      "link": "/search/..."
    }
  ]
}

3. Duffel (free test mode)

  • Best for: developers who want a modern flight search and booking API to prototype with
  • Auth: bearer token; test tokens are free and return simulated airline data
  • Watch out: live mode is a commercial product with per-order fees, so check their pricing page
cURL
curl -X POST "https://api.duffel.com/air/offer_requests?return_offers=true" \
  -H "Authorization: Bearer YOUR_TEST_TOKEN" \
  -H "Duffel-Version: v2" \
  -H "Content-Type: application/json" \
  -d '{
    "data": {
      "slices": [
        { "origin": "BOM", "destination": "DXB", "departure_date": "2026-12-10" }
      ],
      "passengers": [ { "type": "adult" } ],
      "cabin_class": "economy"
    }
  }'

Hotel APIs: What's Actually Free?

This is where most "free travel API" lists mislead. Bookable hotel inventory is rarely free. Suppliers such as Hotelbeds typically give developers a free test or evaluation environment so you can build and certify your integration, but going live requires an approved commercial account.

If you only need hotel discovery (not booking), you can build it from free building blocks:

  • Geocoding with Nominatim to turn "Manali" into coordinates
  • Places data from OpenTripMap or OpenStreetMap to show nearby attractions
  • Affiliate hotel data (for example via Travelpayouts) that links out to a booking partner

Places and Attractions API (OpenTripMap)

OpenTripMap returns points of interest around a coordinate. It is useful for "things to do" sections and itinerary builders. You need a free API key.

cURL
curl "https://api.opentripmap.com/0.1/en/places/radius?radius=2000&lon=55.2744&lat=25.1972&kinds=interesting_places&limit=2&apikey=YOUR_KEY"
Response (trimmed, illustrative)
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": { "type": "Point", "coordinates": [55.2744, 25.1972] },
      "properties": {
        "xid": "PLACE_ID",
        "name": "Burj Khalifa",
        "dist": 120.5,
        "rate": 7,
        "kinds": "interesting_places,architecture"
      }
    }
  ]
}

Geocoding API (Nominatim / OpenStreetMap)

Nominatim converts place names to latitude and longitude with no key. Follow the usage policy: no more than about one request per second, send a descriptive User-Agent, and cache results. For heavy traffic, host your own instance or use a commercial geocoder.

cURL
curl "https://nominatim.openstreetmap.org/search?q=Dubai&format=json&limit=1" \
  -H "User-Agent: my-travel-app/1.0 ([email protected])"
Response (trimmed)
[
  {
    "lat": "25.2048",
    "lon": "55.2708",
    "display_name": "Dubai, United Arab Emirates",
    "type": "administrative"
  }
]

Weather API (Open-Meteo)

Weather is a great free add-on for destination pages. Open-Meteo needs no key and is free for non-commercial use; check their terms if your site is commercial.

JavaScript
const url = "https://api.open-meteo.com/v1/forecast" +
  "?latitude=25.2048&longitude=55.2708" +
  "&current=temperature_2m,weather_code";

const res = await fetch(url);
const data = await res.json();
console.log(data.current.temperature_2m);
Response (trimmed, illustrative)
{
  "latitude": 25.2,
  "longitude": 55.27,
  "timezone": "GMT",
  "current_units": { "temperature_2m": "°C" },
  "current": {
    "time": "2026-12-10T12:00",
    "temperature_2m": 28.4,
    "weather_code": 1
  }
}

Country, Currency and Language Data (REST Countries)

Useful for destination pages: currency, capital, languages. No key required.

cURL
curl "https://restcountries.com/v3.1/name/united%20arab%20emirates?fields=name,capital,currencies,languages"
Response (trimmed, illustrative)
[
  {
    "name": { "common": "United Arab Emirates" },
    "capital": ["Abu Dhabi"],
    "currencies": { "AED": { "name": "United Arab Emirates dirham" } },
    "languages": { "ara": "Arabic" }
  }
]

Combining Free APIs into a Mini Trip Planner

A practical free stack for a destination page looks like this:

  1. Geocode the city name with Nominatim.
  2. Fetch attractions near those coordinates with OpenTripMap.
  3. Fetch weather for the same coordinates with Open-Meteo.
  4. Show currency and language from REST Countries.
  5. Show fare ideas from Travelpayouts or test flights from Amadeus.
JavaScript
async function destinationSnapshot(city) {
  // 1. Geocode
  const geo = await fetch(
    `https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(city)}&format=json&limit=1`
  ).then(r => r.json());
  const { lat, lon } = geo[0];

  // 2. Weather
  const weather = await fetch(
    `https://api.open-meteo.com/v1/forecast?latitude=${lat}&longitude=${lon}&current=temperature_2m`
  ).then(r => r.json());

  return {
    city,
    lat: Number(lat),
    lon: Number(lon),
    temperatureC: weather.current.temperature_2m
  };
}

destinationSnapshot("Dubai").then(console.log);
Output
{
  "city": "Dubai",
  "lat": 25.2048,
  "lon": 55.2708,
  "temperatureC": 28.4
}
💡 Key Takeaway: Free APIs are excellent for learning, prototypes and content features like weather, places and country data. They are rarely enough for live, bookable flights and hotels with real customers paying you.

Limits of Free APIs for a Real Travel Business

If you plan to take real bookings, here is where free options usually stop:

  • Test data, not live inventory: sandbox fares and seats can't be sold to real customers
  • Rate limits and quotas: fine for a demo, a problem at launch traffic
  • No ticketing or payments: you still need payment gateway integration, refunds and cancellations
  • Commercial agreements: live GDS and hotel supply requires approval, volumes or fees
  • Terms of use: many free tiers forbid commercial use or require attribution
  • No support or SLA: when the API changes or goes down, you debug alone

Building the rest yourself (markup engine, wallet, B2B agent panel, vouchers, admin panel, multi-supplier search) is what makes custom travel portals slow and expensive. If you want to skip that and launch with flights, hotels and buses already integrated, see our white label travel portal and the cost breakdown. If you are weighing your options, read why most travel portals fail first.

How to Choose the Right Free Travel API

  • Decide what you need: booking, price discovery, or content (places, weather)
  • Check whether the free tier is sandbox-only or production-usable
  • Read the rate limits and the commercial-use clause
  • Confirm the response format is JSON and the docs include examples
  • Look for attribution requirements (for example OpenStreetMap credit)
  • Cache responses to stay inside quotas and speed up your pages
  • Keep API keys on the server, never in front-end JavaScript

Frequently Asked Questions

Most flight APIs are free only in test mode or with a limited quota. Amadeus Self-Service and Duffel have free test environments, and Travelpayouts provides free cached fare data for affiliate partners. Live, bookable inventory at scale is generally paid or needs a commercial agreement.

Sometimes, but check the terms. Sandboxes return sample data and aren't meant for real customers. Free tiers usually have rate limits and attribution rules. For real bookings you need a production key or a commercial supplier agreement.

REST Countries, Open-Meteo and Nominatim can be called without a key for light usage. Each has fair-use rules, so read their policies before using them in an app.

Hotel suppliers like Hotelbeds usually offer a free test or evaluation environment, but live booking requires an approved commercial account. For discovery without booking, combine free places and geocoding APIs.

Most modern travel APIs return JSON over REST. Some older GDS integrations still use XML or SOAP.

If you need live bookable flights, hotels and buses with payments and a B2B agent panel, a white label travel portal with pre-integrated supplier APIs is usually faster than integrating each supplier yourself.
👉 Ready to move beyond free APIs and launch with live inventory? Request a free demo from Rayds and see a working portal first.

Related Articles

Need Live Flights, Hotels & Buses?

Skip the API integration work. Launch a travel portal with supplier APIs, payments and a B2B agent panel already set up.

Request Free Demo View Pricing
⚡ Quick Picks
Learn flight APIs
Amadeus test environment
Cheap fare widgets
Travelpayouts
Attractions
OpenTripMap
No key needed
Open-Meteo, REST Countries