search_submissions: Search Pushshift.io for Reddit submissions

View source: R/search.R

search_submissionsR Documentation

Search Pushshift.io for Reddit submissions

Description

Search Pushshift.io for Reddit submissions

Usage

search_submissions(
  q = "",
  subreddit = NULL,
  size = 25,
  after = NULL,
  before = NULL,
  parse_date = TRUE,
  verbose = TRUE,
  ...
)

Arguments

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.

Details

Use [to_epoch] to convert a date to epoch time

Value

tibble of submissions

Examples

## 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)

PSAWR documentation built on March 7, 2023, 6:59 p.m.