Search code examples
postcountredditsubmission

Pushshift.io seems to return the wrong submission count?


I am using https://pushshift.io/ API endpoint, to get the count of submissions of my user's subreddit page (e.g 'u_username').

From what I understand it should something has to do with the API, because i get the JSON response correct, but when I count the objects they are more than the expected.

I tried several methods to count the JSON array with PHP count() and sizeof(), but these are not seem to be the problem. The problem may be in the API. In PHP:

file_get_html('https://api.pushshift.io/reddit/search/submission/?subreddit=u_USERNAME&filter=id&sort=desc&size=500');

For posts more that 500, you should change the 'size' paramater. I have 232 post and i get back 240... How is this possible?

Is there any other way to count my subreddit user page posts/submissions?

Thank you.


Solution

  • If a post has been deleted or removed, it is still recorded by Pushshift (they aren't removed from Pushshift when they are deleted or removed). This is the principle behind removeddit and ceddit.