I am interested in obtaining data from different reddit subreddits. Does anyone know if there is a reddit/other api similar like twitter does to crawl all the pages?
To request a copy of your Reddit data and information, fill out a data request form by following these steps: Visit https://www.reddit.com/settings/data-request on your computer's web browser. Log in to the Reddit account you'd like to request data from. Follow the instructions and click Submit.
Scrape data from Reddit using PRAW, the Python wrapper for the Reddit API. As its name suggests, PRAW is a Python wrapper for the Reddit API, which enables you to scrape data from subreddits, create a bot, and much more.
Reddit collects your device information, usage data, and location. Activity from your browser is collected in the form of cookies and used to “improve your experience.” If you have linked accounts, your account information is shared with Reddit.
Yes, reddit has an API that can be used for a variety of purposes such as data collection, automatic commenting bots, or even to assist in subreddit moderation.
There are a few places to discover information on reddit's API:
If there is a particular programming language you are already familiar with, you should check out the existing set of API wrappers for various languages. Despite my bias (I am the package maintainer) I am quite certain PRAW, for python, has support for the largest number of reddit API features.
Note that if you are only reading data, and not interested into posting back to reddit, you can get quite a bit of data from the json feeds associated with each subreddit. With this method, you don't need to worry about an API at all -- you simply request the relevant json file and parse it in your language of choice.
Here's an example URL that will return a json object containing the hot posts from the Justrolledintotheshop subreddit: https://www.reddit.com/r/Justrolledintotheshop/top.json
In place of top, you can use hot
, new
, or controversial
. When using top, you can add ?t=day
to the end of the url to specify the top post for the day. Other valid values are hour
, day
, week
, month
, year
, or all
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With