Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twitter query: what's the query length size limit ? #136

Closed
aborruso opened this issue Sep 9, 2019 · 3 comments
Closed

Twitter query: what's the query length size limit ? #136

aborruso opened this issue Sep 9, 2019 · 3 comments

Comments

@adamhooper
Copy link
Contributor

https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets.html suggests the limit should be 500 characters. Your query is certainly shorter than that. We'll look into it.

@adamhooper
Copy link
Contributor

I finally looked into this.

The query size limit is 500 URL-encoded characters. Your big query is 497. so it's valid. Twitter runs it and returns no results.

Why no results? Because there is no tweet matching that query within the past 7 days. (The most recent tweet is Aug. 9.) According to the Twitter API docs:

Keep in mind that the search index has a 7-day limit. In other words, no tweets will be found for a date older than one week.

If this surprises you, it's probably because your search seems to have a typo: it's missing an OR next to "dadosabertos". This works for me:

(min_retweets:10) OR (min_faves:10) opendata OR ("open data") OR ("dati aperti") OR ("dati pubblici") OR ("dato aperto") OR ("dato pubblico") OR ("données publiques") OR ("Verwaltungsdaten festgelegt") OR ("offene Verwaltungsdaten") OR ("DATOS ABIERTOS") OR ("avoin data") OR "avoindata" OR "datosabiertos" OR DadesObertes OR ("DadesObertes") OR dadosabertos OR ("dados abertos")

@aborruso
Copy link
Author

Hi @adamhooper the error was in syntax. I had to add an OR.

From

(min_retweets:10) 
OR (min_faves:10) opendata 
OR ("open data") 
OR ("dati aperti") 
OR ("dati pubblici") 
OR ("dato aperto") 
OR ("dato pubblico") 
OR ("données publiques") 
OR ("Verwaltungsdaten festgelegt") 
OR ("offene Verwaltungsdaten") 
OR ("DATOS ABIERTOS") 
OR ("avoin data") 
OR "avoindata" 
OR "datosabiertos" 
OR DadesObertes 
OR ("DadesObertes") dadosabertos 
OR ("dados abertos")

to

(min_retweets:10) 
OR (min_faves:10) opendata 
OR ("open data") 
OR ("dati aperti") 
OR ("dati pubblici") 
OR ("dato aperto") 
OR ("dato pubblico") 
OR ("données publiques") 
OR ("Verwaltungsdaten festgelegt") 
OR ("offene Verwaltungsdaten") 
OR ("DATOS ABIERTOS") 
OR ("avoin data") 
OR "avoindata" 
OR "datosabiertos" 
OR DadesObertes 

OR ("DadesObertes") OR dadosabertos 

OR ("dados abertos")

Thank you for your time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants