Filtered stream

GET /2/tweets/search/stream

Streams Tweets matching the stream's active rule set.

Query parameters

  • expansions array[string]

    A comma separated list of fields to expand.

  • tweet.fields array[string]

    A comma separated list of Tweet fields to display.

  • user.fields array[string]

    A comma separated list of User fields to display.

  • media.fields array[string]

    A comma separated list of Media fields to display.

  • place.fields array[string]

    A comma separated list of Place fields to display.

  • poll.fields array[string]

    A comma separated list of Poll fields to display.

  • backfill_minutes integer(int32)

    The number of minutes of backfill requested

    Minimum value is 0, maximum value is 5.

Responses

  • 200

    The request was successful. Successful responses will return a stream of individual JSON Tweet payloads.

    One of:
  • default

    The request has failed.

    Hide response attributes Show response attributes object
    • code integer(int32) Required
    • message string Required
GET /2/tweets/search/stream
curl \
 -X GET https://api.twitter.com/2/tweets/search/stream \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "data": {
    "id": "1346889436626259968",
    "created_at": "Wed Jan 06 18:40:40 +0000 2021",
    "text": "Learn how to use the user Tweet timeline and user mention timeline endpoints in the Twitter API v2 to explore Tweet\\u2026 https:\\/\\/t.co\\/56a0vZUx7i",
    "author_id": "2244994945"
  },
  "matching_rules": [
    {
      "id": "120897978112909812",
      "tag": "string"
    }
  ],
  "includes": {
    "users": [
      {
        "id": "2244994945",
        "created_at": "2013-12-14T04:35:55Z",
        "name": "Twitter Dev",
        "username": "TwitterDev",
        "protected": false
      }
    ],
    "tweets": [
      {
        "id": "1346889436626259968",
        "created_at": "Wed Jan 06 18:40:40 +0000 2021",
        "text": "Learn how to use the user Tweet timeline and user mention timeline endpoints in the Twitter API v2 to explore Tweet\\u2026 https:\\/\\/t.co\\/56a0vZUx7i",
        "author_id": "2244994945"
      }
    ],
    "places": [
      {
        "id": "f7eb2fa2fea288b1",
        "name": "Lakewood",
        "country_code": "US",
        "place_type": "city",
        "full_name": "Lakewood, CO",
        "country": "United States",
        "contained_within": [
          "f7eb2fa2fea288b1"
        ],
        "geo": {
          "type": "Feature",
          "bbox": [
            -105.193475,
            39.60973,
            -105.053164,
            39.761974
          ],
          "geometry": {
            "type": "Point",
            "coordinates": [
              "-105.18816086351444",
              "40.247749999999996"
            ]
          },
          "properties": {}
        }
      }
    ],
    "media": [
      {
        "type": "string",
        "media_key": "string",
        "height": 42,
        "width": 42
      }
    ],
    "polls": [
      {
        "id": "1365059861688410112",
        "options": [
          {
            "position": 42,
            "label": "string",
            "votes": 42
          }
        ],
        "voting_status": "open",
        "end_datetime": "2023-05-04T09:42:00+00:00",
        "duration_minutes": 42
      }
    ]
  }
}
{
  "errors": [
    {
      "type": "string",
      "title": "string",
      "detail": "string",
      "status": 42
    }
  ]
}
Response examples (200)
{
  "data": {
    "id": "1346889436626259968",
    "text": "Learn how to use the user Tweet timeline and user mention timeline endpoints in the Twitter API v2 to explore Tweet\\u2026 https:\\/\\/t.co\\/56a0vZUx7i",
    "author_id": "2244994945",
    "created_at": "Wed Jan 06 18:40:40 +0000 2021"
  },
  "matching_rules": [
    {
      "id": "120897978112909812",
      "tag": "string"
    }
  ],
  "includes": {
    "users": [
      {
        "id": "2244994945",
        "name": "Twitter Dev",
        "username": "TwitterDev",
        "protected": false,
        "created_at": "2013-12-14T04:35:55Z"
      }
    ],
    "tweets": [
      {
        "id": "1346889436626259968",
        "text": "Learn how to use the user Tweet timeline and user mention timeline endpoints in the Twitter API v2 to explore Tweet\\u2026 https:\\/\\/t.co\\/56a0vZUx7i",
        "author_id": "2244994945",
        "created_at": "Wed Jan 06 18:40:40 +0000 2021"
      }
    ],
    "places": [
      {
        "id": "f7eb2fa2fea288b1",
        "name": "Lakewood",
        "country_code": "US",
        "place_type": "city",
        "full_name": "Lakewood, CO",
        "country": "United States",
        "contained_within": [
          "f7eb2fa2fea288b1"
        ],
        "geo": {
          "type": "Feature",
          "bbox": [
            -105.193475,
            39.60973,
            -105.053164,
            39.761974
          ],
          "geometry": {
            "type": "Point",
            "coordinates": [
              "-105.18816086351444",
              "40.247749999999996"
            ]
          },
          "properties": {}
        }
      }
    ],
    "media": [
      {
        "type": "string",
        "media_key": "string",
        "height": 42,
        "width": 42
      }
    ],
    "polls": [
      {
        "id": "1365059861688410112",
        "options": [
          {
            "position": 42,
            "label": "string",
            "votes": 42
          }
        ],
        "voting_status": "open",
        "end_datetime": "2025-05-04T09:42:00Z",
        "duration_minutes": 42
      }
    ]
  }
}
{
  "errors": [
    {
      "type": "string",
      "title": "string",
      "detail": "string",
      "status": 42
    }
  ]
}
Response examples (default)
{
  "code": 42,
  "message": "string"
}
Response examples (default)
{
  "code": 42,
  "message": "string"
}