nytimes / public_api_specs

The API Specs (in OpenAPI/Swagger) for the APIs available from developer.nytimes.com
http://developer.nytimes.com
Apache License 2.0
136 stars 40 forks source link

Getting articles by i.d #51

Closed iamdreo closed 5 years ago

iamdreo commented 5 years ago

Hi guys, please is there a way to get article by id, i am not seeing it in the documentation

nyt-hughmandeville commented 5 years ago

With Article Search API you can look up an article using its URI or _id.

uri:"nyt://article/169f298c-3dcf-57d9-abca-9d25334167d1"
_id:"nyt://article/169f298c-3dcf-57d9-abca-9d25334167d1"

articlesearch.json?fq=_id%3A"nyt%3A%2F%2Farticle%2F169f298c-3dcf-57d9-abca-9d25334167d1"

Or you can use URL.

web_url:"https://www.nytimes.com/2019/07/12/arts/bob-ross-paintings-mystery.html"

articlesearch.json?fq=web_url%3A"https%3A%2F%2Fwww.nytimes.com%2F2019%2F07%2F12%2Farts%2Fbob-ross-paintings-mystery.html"