I'm building Twitter Search API query based on their instructions here and here.
The query is working fine if I use the exact examples of the instructions above, like if I send the query like this: q=%23superbowl&result_type=recent
, it would give me as many answers I'd like to get
BUT
if I would try to search for hashtag jäniksenvuosi (which I know to be tweeted many times), I would only get one answer and that answer is my own latest tweet. Nothing else.
I tried it with other Finnish words with umlauts too, but those work properly, so it is not about umlauts either.
Question in short
What's the difference between these two and how do I fix this?
q=%23superbowl&result_type=recent
q=%23j%C3%A4niksenvuosi&result_type=recent
Search metadata
superbowl:
[search_metadata] => Array
(
[completed_in] => 0.075
[max_id] => 688984569614327808
[max_id_str] => 688984569614327808
[next_results] => ?max_id=688976241051873280&q=%23superbowl&count=30&include_entities=1&result_type=recent
[query] => %23superbowl
[refresh_url] => ?since_id=688984569614327808&q=%23superbowl&result_type=recent&include_entities=1
[count] => 30
[since_id] => 0
[since_id_str] => 0
)
jäniksenvuosi
[search_metadata] => Array
(
[completed_in] => 0.052
[max_id] => 688984569614327808
[max_id_str] => 688984569614327808
[query] => %23j%C3%A4niksenvuosi
[refresh_url] => ?since_id=688984569614327808&q=%23j%C3%A4niksenvuosi&result_type=recent&include_entities=1
[count] => 30
[since_id] => 0
[since_id_str] => 0
)
Just tried this using twurl, and I currently get three results for that hashtag (#jäniksenvuosi).
This is consistent with what I'd expect. On the Twitter website, there are three Tweets returned that contained that hashtag during January. The previous occurrence was in December.
Twitter's Search API has access to an index of Tweets covering approximately 7 days, and it is optimised for recency rather than completeness (see this page in the developer documentation)