A modern, fast, and free-to-use REST API that provides extensive data on countries and cities in the Arab world. Perfect for developers, researchers, and creators.
Visit the Live Demo & API Documentation
- Completely Free & Open Source: No API keys, no rate limits, no hidden costs.
- Bilingual Support: Get responses in both Arabic (
ar
) and English (en
) using thelang
query parameter. - Blazing Fast: Built on the edge with Next.js for millisecond response times.
- Comprehensive Endpoints: Access data for all countries, specific cities, or perform powerful searches.
- Utility Focused: Includes helpful endpoints like random country/city selectors.
All API endpoints are available under the base URL of the deployed application.
Base URL: https://arabia-api.vercel.app/api
For example, to get a list of all countries in English:
curl "https://arabia-api.vercel.app/api/countries"
For full, interactive documentation, please visit the API Docs page.
Method | Endpoint | Description |
---|---|---|
GET |
/countries |
Get a list of all supported countries. |
GET |
/countries/:code |
Get a specific country by its ISO code. |
GET |
/countries/code/:name |
Get a country's code by its name. |
GET |
/countries/random |
Get a single random country. |
GET |
/cities |
Get a list of all cities. |
GET |
/cities?country=:code |
Get all cities for a specific country. |
GET |
/cities/random |
Get a single random city. |
GET |
/search?q=:query |
Search for countries and cities. |
- Framework: Next.js
- Styling: Tailwind CSS
- UI Components: ShadCN/UI
To get a local copy up and running, follow these simple steps.
- Clone the repo
git clone https://github.com/iVortexx/arabia-api.git
- Navigate to the project directory
cd arabia-api
- Install NPM packages
npm install
- Run the development server
Open http://localhost:3000 to view it in the browser.
npm run dev
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project was built by Mohamed Hany (iVortexx), a passionate AI and backend developer.
- GitHub: @iVortexx
Distributed under the MIT License.