Connection policy of the Streaming API


Hello there,

What is the connection policy of the Streaming API? Can I start and stop regulary my connection of the stream?
I need to change my tracking (POST) values whatever i want. There is a problem (with the limitation policy for exemple)?

Today, the idea is to close the current connexion (if is she exists) and start a new one with the new post values.

If this is not good, what is your advice to do that?
Also can i filter by language with the Streaming API? I use the “public” stream.

Sorry for my English. Thank you for your help.


It is possible to become rate limited if you attempt to connect too many times in a short time window. If you’re staying connected for longer periods and only disconnecting to update your query parameters, you should be fine. Keep in mind that if you see a HTTP 420 or a HTTP 429 message, you’ll need to back off for long enough that you don’t see the message again (1 minute should be sufficient)


Thank you for the reply.
Could you clarify how to use the “language” filter? How get the tweets of specific languages with the Streaming API? I tried “language=fr” and this is not working. Thank you


Could you be more specific about what is not working? I just connected to and every Tweet came back with a “lang”:“fr” attribute.


My mistake. It was a another issue with the OAuth signature.
Have you some tips to track words with and without accent ?

For example, if I need to track “français”. There is a way to avoid track=français,francais and get those two results? Thanks again!


You may try splitting your query terms around such characters. It’s a bit hard to explain, but try using the tool at to get a sense of which keyswords may match which Tweets