Frequency to change keywords


#1

I am making an application that periodically may require changing the keywords in the POST statuses/filter request and this involves making a reconnection

The frequency of change is variable. Usually a weekly, but in some case this can be daily or, in extreme cases, one time every few hours.

The API penalizes reconnections and I want to make requests in accordance with the policy of use of the API.

The documentation says:

Clients which break a connection and then reconnect frequently (to change query parameters, for example) run the risk of being rate limited.

Is my frequency of reconnection within a reasonable time?
Is there any good practice that I should fulfill? (eg: omit the header “Connection: keep-alive” in the last request)

Thanks!


#2

Yes I think it is. Unfortunately there is no indication what is the actual rate limit. Maybe @andypiper can provide us with more information? The Docs only mention that there is a rate limit in place but no mention how much requests in a rate limit timeframe are allowed.


#3

The problem with publishing limits like this specifically is that bad actors can “game the system” - this is why we don’t currently explicitly post broken down limits for create/update operations. So I’d say a reconnection every few days should not be an issue, but many times an hour would be less desirable. Apologies for not being able to be more directly specific.


#4

Thanks to let us know!
I understand this for the create/update but something like the streaming API I can’t really understand why this is done.
This creates for the App Developers and Users a case, that an error can occur which the App can’t handle, and not really do anything about it (as prevent the user from making new requests or wait for x amount of time), not even provide info to the User, such as “Rate Limited, please wait for X amount of time”.
The user will get disappointed and most likely blames the App Developer for something being “broken”.


#5

Thanks!
I understand publish the exact limits can be dangerous. Your answer gives some light.