Reddit Tasks
To authenticate with Reddit, run
massmine --task=reddit-auth
Check out the general usage examples to learn how to use MassMine. Below is a description of the tasks available for Reddit.
Task parameters marked * are required. For parameters marked with a + choose only one.
➾ reddit-auth
Sets up MassMine to make data requests under your Reddit account privileges. This task must be ran before using any other Reddit tasks, or an error will be returned.
Parameters
- auth: (Optional) Path to credentials file
Example
massmine --task=reddit-auth
➾ reddit-best
Returns posts from Reddit’s Best listing, drawn from across all subreddits.
Parameters
- count*: Maximum number of posts to retrieve
Example
massmine --task=reddit-best --count=100
➾ reddit-hot
Returns posts from Reddit’s front page for a specified subreddit, sorted by hot.
Parameters
- query*: Name of valid subreddit
- count*: Maximum number of posts to retrieve
- geo*: Location. One of the following must be specified: GLOBAL, US, AR, AU, BG, CA, CL, CO, HR, CZ, FI, FR, DE, GR, HU, IS, IN, IE, IT, JP, MY, MX, NZ, PH, PL, PT, PR, RO, RS, SG, ES, SE, TW, TH, TR, GB, US_WA, US_DE, US_DC, US_WI, US_WV, US_HI, US_FL, US_WY, US_NH, US_NJ, US_NM, US_TX, US_LA, US_NC, US_ND, US_NE, US_TN, US_NY, US_PA, US_CA, US_NV, US_VA, US_CO, US_AK, US_AL, US_AR, US_VT, US_IL, US_GA, US_IN, US_IA, US_OK, US_AZ, US_ID, US_CT, US_ME, US_MD, US_MA, US_OH, US_UT, US_MO, US_MN, US_MI, US_RI, US_KS, US_MT, US_MS, US_SC, US_KY, US_OR, US_SD
Example
massmine --task=reddit-hot --query=politics --count=100 --geo=US
➾ reddit-search-comments
Returns comments matching a given search phrase within a specified subreddit.
Parameters
- query*: Subreddit + search query string, following the format “subreddit:query string”
- count*: Maximum number of results to return.
- date*: One of the following must be specified: hour, day, week, month, year, all
Example
# Looking for love in /r/news
massmine --task=reddit-search-comments --query='news:love' --count=100 --date=week
➾ reddit-search-hot
Returns posts matching a given search phrase within a specified subreddit, sorted by hot.
Parameters
- query*: Subreddit + search query string, following the format “subreddit:query string”
- count*: Maximum number of results to return.
- date*: One of the following must be specified: hour, day, week, month, year, all
Example
# Looking for love in /r/news
massmine --task=reddit-search-hot --query='news:love' --count=100 --date=week
➾ reddit-search-new
Returns posts matching a given search phrase within a specified subreddit, sorted by new.
Parameters
- query*: Subreddit + search query string, following the format “subreddit:query string”
- count*: Maximum number of results to return.
- date*: One of the following must be specified: hour, day, week, month, year, all
Example
# Looking for love in /r/news
massmine --task=reddit-search-new --query='news:love' --count=100 --date=week
➾ reddit-search-top
Returns posts matching a given search phrase within a specified subreddit, sorted by top.
Parameters
- query*: Subreddit + search query string, following the format “subreddit:query string”
- count*: Maximum number of results to return.
- date*: One of the following must be specified: hour, day, week, month, year, all
Example
# Looking for love in /r/news
massmine --task=reddit-search-top --query='news:love' --count=100 --date=week
➾ reddit-search-relevance
Returns posts matching a given search phrase within a specified subreddit, sorted by relevance.
Parameters
- query*: Subreddit + search query string, following the format “subreddit:query string”
- count*: Maximum number of results to return.
- date*: One of the following must be specified: hour, day, week, month, year, all
Example
# Looking for love in /r/news
massmine --task=reddit-search-relevance --query='news:love' --count=100 --date=week