| Title: | 'Pushshift' API Wrapper for 'Reddit' Submission and Comment Search |
|---|---|
| Description: | Connects to the API of <https://pushshift.io/> to search for 'Reddit' comments and submissions. |
| Authors: | David Schoch [aut, cre] (ORCID: <https://orcid.org/0000-0003-2952-4812>) |
| Maintainer: | David Schoch <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-05-31 08:52:23 UTC |
| Source: | https://github.com/schochastics/PSAWR |
Pushshift.io parameters for all endpoints
ps_paramsps_params
tibble of Endpoint Paramters
https://pushshift.io/api-parameters/
Search Pushshift.io for Reddit comments
search_comments( q = "", subreddit = NULL, size = 25, after = NULL, before = NULL, parse_date = TRUE, verbose = TRUE, ... )search_comments( q = "", subreddit = NULL, size = 25, after = NULL, before = NULL, parse_date = TRUE, verbose = TRUE, ... )
q |
character, Query term |
subreddit |
Restrict results to subreddit (use "!" to negate, comma delimited for multiples) |
size |
integer, Number of results to return |
after |
integer, Restrict results to those made after this epoch time |
before |
integer, Restrict results to those made before this epoch time |
parse_date |
logical, should epoch time be converted to date? defaults to TRUE |
verbose |
logical, Whether to display messages |
... |
Further arguments passed as query parameters. See [ps_params] for all possible parameters. |
Use [to_epoch] to convert a date to epoch time
tibble of comments
## Not run: # get the last 100 comments with the word 'cats' search_comments(q = "cats", size = 100) ## End(Not run)## Not run: # get the last 100 comments with the word 'cats' search_comments(q = "cats", size = 100) ## End(Not run)
Search Pushshift.io for Reddit submissions
search_submissions( q = "", subreddit = NULL, size = 25, after = NULL, before = NULL, parse_date = TRUE, verbose = TRUE, ... )search_submissions( q = "", subreddit = NULL, size = 25, after = NULL, before = NULL, parse_date = TRUE, verbose = TRUE, ... )
q |
character, Query term |
subreddit |
Restrict results to subreddit (use "!" to negate, comma delimited for multiples) |
size |
integer, Number of results to return |
after |
integer, Restrict results to those made after this epoch time |
before |
integer, Restrict results to those made before this epoch time |
parse_date |
logical, should epoch time be converted to date? defaults to TRUE |
verbose |
logical, Whether to display messages |
... |
Further arguments passed as query parameters. See [ps_params] for all possible parameters. |
Use [to_epoch] to convert a date to epoch time
tibble of submissions
## Not run: # get the last 100 submissions with the word 'dogs' in the subreddit 'r/animals' search_submissions(q = "dogs", subreddit = "animals", size = 100) ## End(Not run)## Not run: # get the last 100 submissions with the word 'dogs' in the subreddit 'r/animals' search_submissions(q = "dogs", subreddit = "animals", size = 100) ## End(Not run)
convert date to epoch time
to_epoch(date)to_epoch(date)
date |
date to be converted |
epoch time as integer
to_epoch("2022-12-01")to_epoch("2022-12-01")