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

# Metadata on a media file

> Retrieve the metadata on an externally accessible media file URL, such as its format, codec, width, height, duration in seconds, size in bytes, and type.

Retrieve the metadata on a media file URL to check format, dimensions, and other details.

## Header Parameters

**Authorization** `string` *required*

[API Key](https://www.ayrshare.com/docs/apis/overview.md#authorization) of the Primary Profile.

Format: `Authorization: Bearer API_KEY`

## Query Parameters

**url** `string` *required*

Encoded URI of the externally accessible media file URL.

```json 200: Success theme={"system"}
{
    "codec": "h264",
    "duration": 28.24, // In seconds
    "filename": "https://img.ayrshare.com/random/landscape16.mp4",
    "format": "QuickTime / MOV",
    "height": 1080,
    "size": 16275959, // In bytes
    "type": "video",
    "width": 1920
}
```

```json 400: Bad media URL theme={"system"}
{
  "action": "post",
  "status": "error",
  "code": 229,
  "message": "Error validating video. Please check the video or URL."
}
```

```json 503: Media probe temporarily unavailable theme={"system"}
{
  "action": "post",
  "status": "error",
  "code": 499,
  "message": "Ayrshare's media probe service is temporarily unavailable. Please retry shortly.",
  "retryAvailable": true
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.