> ## Documentation Index
> Fetch the complete documentation index at: https://upstash.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# XREAD

> Reads data from one or multiple streams, starting from the specified IDs.

## Arguments

<ParamField body="streams" type="Dict[str, str]" required>
  A dictionary mapping stream keys to their starting IDs.
  Use `$` to read only new messages added after the command is issued.
</ParamField>

<ParamField body="count" type="int">
  The maximum number of messages to return per stream.
</ParamField>

## Response

<ResponseField type="List[List[Any]]">
  Returns a list where each element represents a stream and contains:

  * The stream key
  * A list of messages (ID and field-value pairs)

  Returns empty list if no data is available.
</ResponseField>

<RequestExample>
  ```py Single stream theme={"system"}
  result = redis.xread({"mystream": "0-0"})
  ```

  ```py Multiple streams theme={"system"}
  result = redis.xread({"stream1": "0-0", "stream2": "0-0"})
  ```

  ```py With count limit theme={"system"}
  result = redis.xread({"mystream": "0-0"}, count=1)
  ```

  ```py Only new messages theme={"system"}
  result = redis.xread({"mystream": `$`})
  ```
</RequestExample>

<ResponseExample>
  ```py theme={"system"}
  [
    ["mystream", [
      ["1638360173533-0", ["field1", "value1", "field2", "value2"]],
      ["1638360173533-1", ["field1", "value3", "field2", "value4"]]
    ]]
  ]
  ```
</ResponseExample>
