Retrieve the latitude and longitude of a location name. Given this information you can fill the location-filter parameter in the news search endpoint.
{
"latitude": 35.652832,
"longitude": 139.839478,
"city": "Tokyo"
} {{ codeCopyText }}
{{ codeCopyText }}
{{ codeCopyText }}
{{ codeCopyText }}
{{ codeCopyText }}
{{ codeCopyText }}
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.
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.
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.