-
Notifications
You must be signed in to change notification settings - Fork 0
/
query_config.yaml
60 lines (40 loc) · 2.17 KB
/
query_config.yaml
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#===========================================================
# Part 1:
# What are you looking for?
#===========================================================
# Start and end date of our Query:
start_time : '2021-01-01T00:00:00Z'
# end_time : '2020-12-19T05:00:00Z'
# Actual query. See Twitter API Docs for how to build this.
query: 'from:nws OR to:nws'
#===========================================================
# Part 2:
# What format do you want the data to come back in?
#===========================================================
tweet.fields: 'author_id,created_at,geo,conversation_id,referenced_tweets,public_metrics,in_reply_to_user_id,attachments,entities,source'
# tweet.fields: 'author_id,created_at,conversation_id,referenced_tweets,public_metrics,in_reply_to_user_id'
# Add user information
expansions: 'author_id,in_reply_to_user_id,geo.place_id,attachments.media_keys'
# expansions: 'author_id,in_reply_to_user_id'
media.fields: 'type,duration_ms,public_metrics,preview_image_url'
user.fields: 'username,description,created_at,location,public_metrics'
place.fields: 'name'
#===========================================================
# Part 3:
# How do you want your results?
# Important: Do not add additional fields that are not in https://developer.twitter.com/en/docs/twitter-api/tweets/full-archive-search/api-reference/get-tweets-search-all; otherwise will return a 400 Error.
#===========================================================
# Put a limit on the number of requests when pagination is required; The next_token object will be written to disk if limit is reached.
limit: False
# Print the tweets to stdout? You can write tweets to a file easily this way
print: False
# If you put a filename here, tweets will be written to it in line-delimited JSON.
output: 'nws_test.jsonseq'
#===========================================================
# Part 4: (OPTIONAL)
# API Call Configuration
#===========================================================
#Tweets per request. Always set to 500 if expecting more than 500 tweets.
max_results : 500
#If you'd like to load the bearer token from here. A token given with --token= will overwrite it.
# bearer_token: AAAA...