GET /2/tweets/search/stream/rules

Return a list of rules currently active on the streaming endpoint, either as a list or individually.



Endpoint URL

https://api.twitter.com/2/tweets/search/stream/rules

Authentication and rate limits

Authentication methods
supported by this endpoint

OAuth 2.0 Bearer token

Rate limit

450 requests per 15-minute window (app auth)

Learn more about rate limits.



Query parameters

NameTypeDescription
ids
 Optional 
stringComma-separated list of rule IDs. If omitted, all rules are returned.


Example requests

  • cURL
curl -v https://api.twitter.com/2/tweets/search/stream/rules -H "Authorization: Bearer $BEARER_TOKEN"

Example responses

  • Response
{
  "data": [
    {
      "id": "1165037377523306497",
      "value": "dog has:images",
      "tag": "dog pictures"
    },
    {
      "id": "1165037377523306498",
      "value": "cat has:images -grumpy"
    }
  ],
  "meta": {
    "sent": "2019-08-29T01:12:10.729Z"
  }
}

Response fields

NameTypeDescription
idstringUnique identifier of this rule. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.
valuestringThe rule text as submitted when creating the rule.
tagstringThe tag label as defined when creating the rule.
meta.sentnumberThe time when the request body was returned.
errorsobjectContains details about errors that affected any of the requested Tweets. See Status codes and error messages for more details.

Was this document helpful?

Thank you for the feedback. We’re really glad we could help!

Thank you for the feedback. How could we improve this document?

Thank you for the feedback. Your comments will help us improve our documents in the future.