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

# Download Telegram Media

> Download media files from a Telegram message

Download media (images, videos) from a Telegram message. The response is the raw binary file with the correct MIME type in the `Content-Type` header. Responses are cached for 24 hours.

<Note>
  This endpoint does **not** require an API key but is heavily rate-limited to
  **2 requests per 60 seconds**.
</Note>

## Path Parameters

<ParamField path="channelId" type="string" required>
  The Telegram channel ID.
</ParamField>

<ParamField path="messageId" type="string" required>
  The message ID containing the media.
</ParamField>

## Response

Returns the binary media file with the appropriate `Content-Type` header (e.g., `image/jpeg`, `video/mp4`).

### Error Response

<ResponseField name="error" type="string">
  Error message when the media is not found. Returns status `404`.
</ResponseField>

<RequestExample>
  ```bash theme={null}
  curl -X GET "https://scrape.st/telegram/media/1001234567/42" \
    --output media.jpg
  ```
</RequestExample>

<ResponseExample>
  ```json 404 Not Found theme={null}
  {
    "error": "Media not found"
  }
  ```
</ResponseExample>
