Skip to content

Latest commit

 

History

History
94 lines (63 loc) · 4.42 KB

README.en.md

File metadata and controls

94 lines (63 loc) · 4.42 KB

RetrieveCountriesAPI

Sponsor rgdevment Build Status Coverage Quality Gate Status License: MIT

RetrieveCountriesAPI is an open-source REST API licensed under MIT that allows you to query data about countries, cities, and other relevant information worldwide. This API is continuously developing and growing.

Available in other languages:

⚠️ Aviso Importante / Important Notice

We have moved. This repository will no longer be supported, and the API along with its documentation can now be found at: https://github.com/rgdevment/retrieve-countries

  • The API will remain consumable, and the contracts stay the same.
  • We have migrated the codebase from Java to JavaScript to optimize resources and reduce costs.

It's not that I don't like Java; it's a great language and what I use most in my daily work. However, for a public open-source API, resources and costs are higher, and we need to optimize them to sustain over time.

  • Technology shift: From Spring Boot and Java 21 to NestJS and Node 20.
  • We are continuing development and improving daily.

Thank you for your support and understanding.

Check the documentation at: https://countries.apirest.cl/v1/docs

Documentation

Example Usage

You can get information about a country and its cities with this simple call:

curl -X GET "https://countries.apirest.cl/v1/chile"

Or, if you prefer, you can get all the countries in a specific region with:

curl -X GET "https://countries.apirest.cl/v1/region/americas"

You could even get all the countries in the world with a single request:

curl -X GET "https://countries.apirest.cl/v1/all"

You can also show or hide additional information with the following optional parameters:

  • excludeCities (optional): boolean
  • excludeStates (optional): boolean

For more information and other endpoints, please refer to the Postman API Documentation or Swagger Documentation.

Running the Project Locally

Requirements

  • Java: 21
  • Spring Boot: 3.x
  • Gradle: Use the included gradlew wrapper.

Installation

  1. Clone the repository:

  2. Run the application:

    • For development mode: ./gradlew bootRun
    • For production build: ./gradlew build
  3. Access the API locally at:

Donations

This project is maintained as a free service for everyone. If you find this API useful and would like to support its maintenance, you can make a voluntary donation.

Donations will be used exclusively to cover infrastructure costs, including:

  • Google Cloud Run: This service hosts and runs the API, with costs for CPU, memory, and runtime.
  • Domain: The costs of registering and maintaining domains like apirest.cl and restapi.cl.
  • Storage: If necessary, funds will cover the costs of external databases or storage services.
  • Network Traffic: Additional costs related to network usage and data transfer.
  • SSL Certificates: Part of the donations will go to the purchase or renewal of SSL certificates for secure connections, if needed.

Any contribution is greatly appreciated and will help keep the service running and available for everyone!

Consider becoming a sponsor. Thank you for your support!

License

This project is licensed under the MIT License. See the LICENSE file for more details.