CloudObjects / Directory / The New York Times / Geographic API
Sign in

Geographic API

a wa:WebAPI in The New York Times

The Geographic API extends the Semantic API, using a linked data approach to enhance location concepts used in The New York Times' controlled vocabulary and data resources which combine them with the GeoNames database, an authoritative and free to use database of global geographical places, names and features.

Base URL

The API endpoint is located at the following URL:
https://api.nytimes.com/svc/semantic/v2/geocodes

Authentication
API Methods

These are the methods supported by the API:

  • GET /query.json Geographic API

    Geographic API

    Optional parameters:
    name A displayable name for the specified place.
    latitude The latitude of the specified place.
    longitude The longitude of the specified place.
    elevation The elevation of the specified place, in meters.
    sw Along with ne, forms a bounded box using the longitude and latitude coordinates specified as the southwest corner. The search results are limited to the resulting box. Two float values, separated by a comma `latitude,longitude` <br/> The ne parameter is required to use this parameter.
    query Search keywords to perform a text search on the fields: web_description, event_name and venue_name. 'AND' searches can be performed by wrapping query terms in quotes. If you do not specify a query, all results will be returned.
    filter Filters search results based on the facets provided. For more information on the values you can filter on, see Facets.
    date_range Start date to end date in the following format- YYYY-MM-DD:YYYY-MM-DD
    facets When facets is set to 1, a count of all facets will be included in the response.
    sort Sorts your results on the fields specified. <br/> `sort_value1+[asc | desc],sort_value2+[asc|desc],[...]`<br/> Appending +asc to a facet or response will sort results on that value in ascending order. Appending +desc to a facet or response will sort results in descending order. You can sort on multiple fields. You can sort on any facet. For the list of responses you can sort on, see the Sortable Field column in the Response table. <br/><br/>If you are doing a spatial search with the ll parameter, you can also sort by the distance from the center of the search: dist+[asc | desc] <br/> **Note:** either +asc or +desc is required when using the sort parameter.
    limit Limits the number of results returned
    offset Sets the starting point of the result set
    Success response:

    An array of events

    Status Code 200
    
    
Meta
URI / COID
coid://nytimes.cloudobjects.io/GeoAPI/V2
Revision
1-3774144ad31c35176e527fc706153c90
Created at
2017-05-28 15:47 (UTC)
Usage permission
co:Public