Getting started
Get your API Key
To access the Aara API, you'll need an API key. Since we operate on a subscription basis, please contact our support team to obtain your key after subscribing. Keep your API key secure, as it's required for all API requests.
Contact our team to get your API key.
Determine a unique user ID
The Unique User ID is a critical identifier that allows the API to recognize and track individual users of your application. It is imperative that this ID is unique for each user to ensure accurate data handling. Typically, this ID will correspond to an existing identifier within your system, such as an email address or an alphanumeric user ID.
Ensuring the uniqueness of this identifier is your responsibility, and it plays a key role in the seamless operation of the API.
Make your first API call (get cities)
The first step in interacting with the Aara API is to retrieve the list of available cities. This guide will show you how to make the API call and how to use the returned data.
To retrieve the list of cities, you need to make a GET request to the /cities endpoint of the Aara API.
Using curl
curl -X GET "https://api.aara.app/v1/cities" \ -H "aara_api_key: YOUR_API_KEY" \ -H "unique_user_id: UNIQUE_USER_ID"
Using Postman
- Create a new GET request with the URL:
https://api.aara.app/v1/cities - Add the following headers:
aara_api_key: YOUR_API_KEYunique_user_id: UNIQUE_USER_ID
- Click Send to retrieve the list of cities.
Using JavaScript (Fetch API)
fetch("https://api.aara.app/v1/cities", {
method: "GET",
headers: {
aara_api_key: "YOUR_API_KEY",
unique_user_id: "UNIQUE_USER_ID",
},
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error("Error:", error));
Understanding the Response
The API will return a JSON array where each object represents a city. Here's an example response:
[
{
id: "abcdefghijklmn1234567890",
name: "London",
fullAddress: "London, UK",
lat: 51.5072178,
lng: -0.1275862,
weather: "10d19°C (min 15°C max 19°C)",
smallIconUrl: "https://example.com/image2.jpg",
currencySymbol: "£",
videoUrl: "https://example.com/image2.jpg",
},
{
id: "abcdefghijklmn1234567890",
name: "Bangkok",
fullAddress: "Bangkok, Thailand",
lat: 13.7563309,
lng: 100.5017651,
weather: "04n30°C (min 28°C max 34°C)",
smallIconUrl: "https://example.com/image2.jpg",
currencySymbol: "฿",
videoUrl: "https://example.com/image2.jpg",
},
// More cities
];
Using the City Data
Each city object contains the following properties:
id: Unique identifier for the city.name: The name of the city.fullAddress: The full address of the city, including the country.lat: The latitude coordinate of the city.lng: The longitude coordinate of the city.weather: A string describing the current weather in the city, including temperature and conditions.smallIconUrl: A URL to a small weather icon that represents the current weather condition.currencySymbol: The currency symbol used in the city.videoUrl: A URL to a video showcasing the city.
You’ve successfully retrieved and understood the city data from the Aara API. With this data, you can enhance your application by displaying detailed information about each city, integrating map views, and providing users with up-to-date weather conditions.