kms
kms

Reputation: 2024

Historical data using Reddit API

I am trying to access historical data of mentions of a few keywords for a data analysis project using Reddit API. Utilizing python's wonderful easy-to-use PRAW package to fetch the data. Does anyone know if Reddit api has any functionality that allows historical access to data from a subreddit?

Upvotes: 2

Views: 1830

Answers (1)

justcool393
justcool393

Reputation: 247

You can only get the last 1000 items for a specific view. Use the Subreddit's submissions property.

You can get the different views. I describe some of the other views in a reddit comment I made:

yes. generally speaking you can get the last 1000 items in a listing (/r/all and /r/popular listings are higher), regardless of how long ago it is.

to get more than 1000 items:

  • check all of the views (/r/subreddit/top, etc) and over all of the time scales

check all of the moderation queues (with parameter only=links):

  • unmoderated (/about/unmoderated)
  • moderation queue (/about/modqueue)
  • spam (/about/spam)
  • edited (/about/edited)
  • reports (/about/reports)

if this is a public subreddit, consider also using pushshift.io

Upvotes: 1

Related Questions