0% found this document useful (0 votes)
6 views3 pages

APISuggestion

Uploaded by

sumitnikam03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

APISuggestion

Uploaded by

sumitnikam03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

APISuggestion.

md 2024-07-07

Certainly! Here are some suggestions for free APIs you can use for travel data, payment processing, and
mapping services:

Travel APIs

1. Amadeus for Developers

Features: Flight offers search, hotel search, destination content, etc.


Free Tier: Provides a limited number of free API calls per month.
Website: Amadeus for Developers

2. Skyscanner API

Features: Flight search, hotel search, car rental search, etc.


Free Tier: Limited free access to the API.
Website: Skyscanner API

3. OpenTripMap API

Features: Points of interest, attractions, restaurants, and more.


Free Tier: Limited free API calls per day.
Website: OpenTripMap API

Payment Gateways

1. Stripe

Features: Payment processing, subscription billing, and more.


Free Tier: No monthly fees, pay-as-you-go with a transaction fee.
Website: Stripe

2. PayPal

Features: Payment processing, invoicing, and more.


Free Tier: No monthly fees, pay-as-you-go with a transaction fee.
Website: PayPal Developer

3. Square

Features: Payment processing, POS systems, and more.


Free Tier: No monthly fees, pay-as-you-go with a transaction fee.
Website: Square

Mapping Services

1. Google Maps API

Features: Maps, geocoding, places, directions, and more.


Free Tier: $200 free usage every month (covers a lot of free usage).
Website: Google Maps Platform

2. Mapbox
1/3
APISuggestion.md 2024-07-07

Features: Customizable maps, geocoding, directions, and more.


Free Tier: Free tier with limited usage, up to 50,000 map views per month.
Website: Mapbox

3. OpenStreetMap (OSM)

Features: Free and open-source map data.


Free Tier: Completely free to use but needs hosting or a third-party provider for APIs.
Website: OpenStreetMap

Example Implementation

Example of integrating Amadeus API for flight search:

1. Sign up for an Amadeus API key:

Create an account at Amadeus for Developers.

2. Make a flight search request:

using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

public class AmadeusService


{
private readonly HttpClient _httpClient;

public AmadeusService(HttpClient httpClient)


{
_httpClient = httpClient;
_httpClient.BaseAddress = new Uri("https://test.api.amadeus.com/");
_httpClient.DefaultRequestHeaders.Accept.Add(new
MediaTypeWithQualityHeaderValue("application/json"));
}

public async Task<string> GetFlightsAsync(string origin, string


destination, string departureDate)
{
var token = "YOUR_ACCESS_TOKEN";
_httpClient.DefaultRequestHeaders.Authorization = new
AuthenticationHeaderValue("Bearer", token);

var response = await _httpClient.GetAsync($"v2/shopping/flight-


offers?originLocationCode={origin}&destinationLocationCode=
{destination}&departureDate={departureDate}&adults=1");

response.EnsureSuccessStatusCode();
return await response.Content.ReadAsStringAsync();
}
}

2/3
APISuggestion.md 2024-07-07

3. Call the service from your controller:

public class FlightsController : Controller


{
private readonly AmadeusService _amadeusService;

public FlightsController(AmadeusService amadeusService)


{
_amadeusService = amadeusService;
}

public async Task<IActionResult> Search(string origin, string


destination, string departureDate)
{
var flights = await _amadeusService.GetFlightsAsync(origin,
destination, departureDate);
return View(flights); // Parse and pass the flight data to your view
}
}

These APIs should provide a good starting point for your "Travel Genie" project. Be sure to review the
documentation and terms of use for each service to ensure they meet your project requirements.

3/3

You might also like