View source: R/search_full_archive.R
full_archive_search | R Documentation |
This function allows you to collect tweets with the academic track with a query using the rules put in place by twitter (see: https://developer.twitter.com/en/docs/twitter-api/v1/rules-and-filtering/search-operators)
full_archive_search(
token = NA,
search_query = NA,
tweet_fields = "ALL",
user_fields = "ALL",
since_id = NA,
until_id = NA,
start_time = NA,
end_time = NA,
api_wait = 12,
expansions = "ALL",
place_fields = "ALL",
media_fields = "ALL",
poll_fields = "NONE",
n = NA,
JSON = FALSE,
storage_path = "archive_searched_tweets.json",
n_try = 10
)
token |
string of the bearer token from your personal twitter API access |
search_query |
string representing the query to search tweets with |
tweet_fields |
string which defaults to ALL (no other argument accepted at the moment) |
user_fields |
string which defaults to ALL (no other argument accepted at the moment) |
since_id |
character containing the lower bound status id to start looking for tweets (default is NA) |
until_id |
character containing the upper bound status id to start looking for tweets (default is NA) |
start_time |
character containing the start time for the search (defaults to NA; style is "yyyy-mm-ddThh:mm:ssZ") |
end_time |
character containing the end time for the search (defaults to NA; style is "yyyy-mm-ddThh:mm:ssZ") |
api_wait |
integer specifying how long the function should wait for the API to answer (defaults to 12 seconds) |
expansions |
string which defaults to ALL (no other argument accepted at the moment) |
place_fields |
string which defaults to ALL (no other argument accepted at the moment) |
media_fields |
string which defaults to ALL (no other argument accepted at the moment) |
poll_fields |
string which defaults to NONE (no other argument accepted at the moment) |
n |
integer specifying the maximum number of tweets the function should return (defaults to NA) |
JSON |
boolean which defaults to FALSE |
storage_path |
character string specifying the path and file name to write the json file to |
n_try |
integer specifying number of retries in case of 503 error |
a data frame
## Not run:
users <- full_archive_search(token=bearer_token, query = "Twitter OR #TwitterAPI",
start_time = "2020-01-01T00:00:01Z",
end_time = "2020-01-02T00:00:01Z",
n = 1000)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.