GET
/
2
/
tweets
/
search
/
stream
/
rules
curl --request GET \
  --url https://api.x.com/2/tweets/search/stream/rules \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "120897978112909812",
      "tag": "Non-retweeted coffee Posts",
      "value": "coffee -is:retweet"
    }
  ],
  "meta": {
    "next_token": "<string>",
    "result_count": 123,
    "sent": "<string>",
    "summary": {
      "created": 1,
      "invalid": 1,
      "not_created": 1,
      "valid": 1
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

ids
string[]

A comma-separated list of Rule IDs.

max_results
integer
default:
1000

The maximum number of results.

Required range: 1 < x < 1000
pagination_token
string

This value is populated by passing the 'next_token' returned in a request to paginate through results.

Required string length: 16

Response

200
application/json
The request has succeeded.
meta
object
required
data
object[]