Get Geographic Coordinates

Retrieve the latitude and longitude of a location name. Given this information you can fill the location-filter parameter in the news search endpoint.

GET
https://api.worldnewsapi.com/geo-coordinates
Example Request and Response
GET
https://api.worldnewsapi.com/{{ examples.getGeoCoordinates }}
{
  "latitude": 35.652832,
  "longitude": 139.839478,
  "city": "Tokyo"
}
cURL
Java
Javascript
Python
Go
C#
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}

Frequently Asked Questions

What does the Geo Coordinates endpoint return?

The Geo Coordinates endpoint returns latitude and longitude coordinates for a given location name. This is useful for converting place names into coordinates that can be used with the geo-search feature in the Search News endpoint.

How do I use coordinates to search for local news?

First, use the Geo Coordinates endpoint to get the latitude and longitude for your location. Then, pass those coordinates to the Search News endpoint using the location-filter parameter to find news published near that location.

What location formats are accepted?

You can provide location names in various formats such as city names (e.g., London), city and country combinations (e.g., Paris, France), or full addresses. The endpoint will attempt to geocode the location and return the best matching coordinates.


Questions? Need Help? Ask Away