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

Facets not working in articlesearch #34

Closed blaschke closed 5 years ago

blaschke commented 7 years ago

Calls to the API including facet_field and facet_filter doenot return facets in the JSON response:

https://api.nytimes.com/svc/search/v2/articlesearch.json?q=Apple&begin_date=20170801&end_date=20170830&facet_field=source&facet_filter=true&api-key=<SOME_KEY>

The same is true for the online console:

http://developer.nytimes.com/article_search_v2.json#/Console

sckott commented 6 years ago

Same here

JoshuaDull commented 6 years ago

I am also having this problem. Even the example URL below from the documentation does not return facets!! (http://api.nytimes.com/svc/search/v2/articlesearch.json?fq=romney&facet_field=day_of_week&begin_date=20120101&end_date=20120101&api-key=#### )

nyt-hughmandeville commented 6 years ago

Set facet=1 and facet_fields.

http://api.nytimes.com/svc/search/v2/articlesearch.json?fq=romney&facet_fields=day_of_week&begin_date=20120101&end_date=20120101&facet=1&api-key=####

sckott commented 6 years ago

thx @nyt-hughmandeville - can that be documented as well?

nyt-hughmandeville commented 5 years ago

Docs have info about facets now. https://developer.nytimes.com/docs/articlesearch-product/1/overview