The discussion revolves around retrieving all topics of a particular category. Calabrone76 initially attempted to use the search.json endpoint with a category filter, but encountered issues. Arkshine suggested encoding the q parameter, and later, Calabrone76 found a working solution using category:magazzino-partner instead of the category tag.
Arkshine provided a list of core advanced filters and emphasized the importance of encoding parameters. Meanwhile, RGJ suggested using the category topic list JSON, but Calabrone76 noted that this method does not allow for date filtering. RGJ clarified that using after in search gives topics with activity after a certain date, not topics created after a certain date.
Hi everyone,
i need to get all and only topics of a particular category.
So, according to the documentation, it seems the right way is to use the search.json end-point.
The problem is i didn’t understand how to set the category filter.
I did something like this:
GET {{ _.base_url }}/search.json?q=#retail after:2023-12-05 order:latest_topic
but i get a null result
{
"grouped_search_result": null
}
Where do i mistake? If i cut the categoy tag (#retail) it works, but on all categories.
You’re right; it’s a valid alternative and advanced filter! You still should encode the param; that was your issue (and might become another, depending on what you use).
Note that using after in search gives you the topics with activity after a certain date, not topics created after a certain date. This is the same as using the latest topic list and stopping when you get past your cutoff date.