# social.colibri.beta.embed.getMetadata

> Published by [colibri.social](https://lexicon.garden/identity/did:plc:mprdjqjluoswa7awzggaggj3)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.embed.getMetadata)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.embed.getMetadata/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.embed.getMetadata/examples)

## Definitions

### `social.colibri.beta.embed.getMetadata`

**Type**: `query`

Fetches and parses a link preview. The AppView fetches the URL on the client's behalf, so the client's address is never exposed to the target site.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (uri) | Yes | The URL to preview. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `embed` | `ref` → `social.colibri.beta.embed.defs#linkEmbed` | Yes | The parsed preview. |

#### Errors

- **AuthRequired**: The request has no valid service auth.
- **InvalidRequest**: The arguments are inconsistent or malformed beyond schema validation.
- **NotFetchable**: The target refused the request, timed out, or resolves to an address the AppView will not fetch.
- **UpstreamFailure**: The target site failed while the AppView fetched or parsed it.

## Raw Schema

```json
{
  "id": "social.colibri.beta.embed.getMetadata",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "AuthRequired",
          "description": "The request has no valid service auth."
        },
        {
          "name": "InvalidRequest",
          "description": "The arguments are inconsistent or malformed beyond schema validation."
        },
        {
          "name": "NotFetchable",
          "description": "The target refused the request, timed out, or resolves to an address the AppView will not fetch."
        },
        {
          "name": "UpstreamFailure",
          "description": "The target site failed while the AppView fetched or parsed it."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "embed"
          ],
          "properties": {
            "embed": {
              "ref": "social.colibri.beta.embed.defs#linkEmbed",
              "type": "ref",
              "description": "The parsed preview."
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "uri"
        ],
        "properties": {
          "uri": {
            "type": "string",
            "format": "uri",
            "description": "The URL to preview."
          }
        }
      },
      "description": "Fetches and parses a link preview. The AppView fetches the URL on the client's behalf, so the client's address is never exposed to the target site."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
