---
title: "Get information about a URL for a client"
method: GET
path: "/_matrix/media/v3/preview_url"
tags: ["Media"]
deprecated: true
---

# Get information about a URL for a client

`GET /_matrix/media/v3/preview_url`

## Request

- Base URL: `https://matrix.org`
- URL: `https://matrix.org/_matrix/media/v3/preview_url`
- Auth: one of:
  - API key in query parameter `access_token`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/matrix/apis/matrix-client-server-api/docs/_matrix/media/v3/preview_url/get.ts> (a function with typed inputs; its response is checked against the schema)

> **Deprecated.**

**NOTE:** 
Replaced by [`GET /_matrix/client/v1/media/preview_url`](https://spec.matrix.org/v1.19/client-server-api/#get_matrixclientv1mediapreview_url).


Get information about a URL for the client. Typically this is called when a
client sees a URL in a message and wants to render a preview for the user.

**Note:**
Clients should consider avoiding this endpoint for URLs posted in encrypted
rooms. Encrypted rooms often contain more sensitive information the users
do not want to share with the homeserver, and this can mean that the URLs
being shared should also not be shared with the homeserver.

## Query parameters

- `url` string, uri, required
- `ts` integer

## Response `200`

The OpenGraph data for the URL, which may be empty. Some values are
replaced with matrix equivalents if they are provided in the response.
The differences from the [OpenGraph](https://ogp.me/) protocol are
described here.

- object
  - `matrix:image:size` integer: The byte-size of the image. Omitted if there is no image attached.
  - `og:image` string, uri: An [`mxc://` URI](https://spec.matrix.org/v1.19/client-server-api/#matrix-content-mxc-uris) to the image. Omitted if there is no image.

## Other responses

- `429`: This request was rate-limited.

---

[API](https://skmtc.dev/matrix/apis/matrix-client-server-api.md) - [All operations](https://skmtc.dev/matrix/apis/matrix-client-server-api/llms.txt) - [OpenAPI document](https://skmtc.dev/matrix/apis/matrix-client-server-api/revisions/c7fe4072c681?raw)
