Topics extracted from API do not appear in discourse forums or vice versa

Hi everyone!
For the company I work in, we are extracting the topics created throughout all the Discourse’s forum of the company by doing requests to the url of each category (for example like:https://{organization_url}/c/{c}/{category_slug}/{subcategory_slug}/206.json) . We need to count the number of topics created per category per each date but when we compare the results per date obtained through the API vs searching the topics in discourse, we find that for some categories/subcategories they do not completely match.
For example, for a particular date (such as 2022-07-01) the API returns 3 topics, while by searching in
discourse for the same date we get 4 topics and what is weird is that one of the topics is actually from one day before (2022-06-30). Apart from that, that topic from 2022-06-30 is not returned by the API (shows no topics created that date) and if I search in discourse for topics created on 2022-06-30, there are no matches.

I’m doing the search using the filters: in:first after:2022-07-01 before:2022-07-02 in the search bar. What can be done in that case? or is that any kind of bug in the API/search bar feature?
(sorry, I cannot upload any images to show any result due to confidentiality issues. Hope that at least the explanation was clear).

1 Like

My guess is that it has to do with time zones.

Hi Jay, thanks for your answer. I’m not sure if that’s about the time zones (it will only explain why the topic created on 2022-06-30 appears in the web UI under the same date of the topics created on 2022-07-01) because the API doesn’t show the topic published on 2022-06-30.
I was able to get this image and you can see that in the search bar we were searching for posts between 2022-07-01 and 2022-07-02, three of them were actually created between that time range but the last one has date of 2022-06-30. That last post (the one from 2022-06-30) is the one that is not retrieved through the API.

On the other hand, for other dates, there are some posts that appear in the API but not in the web UI.

Thank you!

1 Like

Hmm. I’m confused enough by my own time zones. :slight_smile:

There was some work on this interface recently, I think. I can’t imagine, though, how how the front end and the API would give different results since they’re using the same API. :person_shrugging: Maybe your image will be enough for someone who understands that code to figure something out.

1 Like

Jay, is it there any way that we can tag a developer so that person can take a look to this issue or what can we done in our side?

Thank you!

Unless you’re a paying customer you can’t really tag anyone for attention. If you were a paying customer you would have other avenues for support.

The team is very active here though, if someone has an answer they will respond without prompting.

3 Likes