# Convert Instagram shortcode to media ID

Converts the shortcode in a post URL (the `DcBr7X4SL3h` in `instagram.com/p/DcBr7X4SL3h/`) into the numeric media ID that `/post/by-id` takes.

- Platform: Instagram V3
- Request: `GET https://api.toolzerhub.com/v3/instagram/util/media-id`
- Auth: `x-api-key` header
- Cost: 3 credits per successful request. Failed requests are not billed.
- Page: https://docs.toolzerhub.com/reference/instagram-v3/utility/get-instagram-media-id-v3

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `shortcode` | query | yes | string | Shortcode from the post URL, such as DcBr7X4SL3h in instagram.com/p/DcBr7X4SL3h/. |

## Example request

```bash
curl "https://api.toolzerhub.com/v3/instagram/util/media-id?shortcode=<shortcode>" \
  -H "x-api-key: $TOOLZERHUB_API_KEY"
```

Success responses are wrapped as `{ "data": ... }`. Errors return `{ "error": { "code", "status", "message", "retryable", "details" } }`. See https://docs.toolzerhub.com/docs/responses-and-errors.
