posts_search: R Interface for

Description Usage Arguments Examples

View source: R/posts_search.R

Description

Pulls posts

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
posts_search(
  token,
  accountTypes = NULL,
  and = NULL,
  brandedContent = "no_filter",
  count = 10,
  endDate = ct_now(),
  includeHistory = NULL,
  inAccountIds = NULL,
  inListIds = NULL,
  language = NULL,
  minInteractions = 0,
  minSubscriberCount = 0,
  not = NULL,
  notInAccountIds = NULL,
  notInLstIds = NULL,
  notInTitle = NULL,
  offset = 0,
  pageAdminTopCountry = NULL,
  platforms = NULL,
  searchField = "text_fields_and_image_text",
  searchTerm = "",
  startDate = NULL,
  sortBy = "date",
  timeframe = NULL,
  types = NULL,
  verified = "no_filter",
  verifiedOnly = "false",
  search10k = FALSE,
  boolean_allowed = FALSE,
  output_raw = TRUE,
  error_wrapper = T
)

Arguments

token

A valid CT API Token

accountTypes

...

and

...

brandedContent

...

count

...

endDate

...

includeHistory

...

inAccountIds

...

inListIds

...

language

...

minInteractions

...

minSubscriberCount

...

not

...

notInAccountIds

...

notInLstIds

...

notInTitle

...

offset

...

pageAdminTopCountry

...

platforms

...

searchField

...

searchTerm

...

startDate

...

sortBy

...

timeframe

...

types

...

verified

...

verifiedOnly

...

search10k

A boolean signifying whether you have elavated access for higher count numbers.

boolean_allowed

A boolean signifying whether you have boolean term search enabled.

output_raw

A boolean signifying whether to output raw CT output or parse into df. Defaulting to TRUE.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Pull all posts from November 2020 by CNN containing the term "Trump"
postlist <- posts_search(token = crowdtangle_token(),
                    inAccountIds = "8323", #CNN example
                    searchTerm = "Trump",
                    startDate = "2020-11-01T00:00:00",
                    endDate = "2020-11-30T23:59:59",
                    count = 10000,
                    sortBy = 'date',
                    platforms = 'facebook',
                    search10k = T,
                    boolean_allowed = T,
                    output_raw = TRUE)

schliebs/rtangle documentation built on Dec. 22, 2021, 10:22 p.m.