...

/

Search by Name

Search by Name

Learn how to search for a country by name using the REST Countries API.

When searching any country, searching by name is the best way to go about it. The REST Countries API offers the feature to do this. In return, we get all the available information about that country. We have the option to include the entire name or only a portion of it in our query.

Search by partial name

The Name endpoint is used to search through all available countries. This endpoint gives us access to the complete database of the REST Countries API. The URL for this endpoint is https://restcountries.com/v3.1/name/{name}.

Request parameters

While calling the Name endpoint, we simply need to replace {name} in the endpoint URL with the name of the country we want to look up.

Change the name in our query below ...

Access this course and 1400+ top-rated courses and projects.