get_v2_media_info_by_code
Retrieve an Instagram post or reel by its shortcode (the code after /p/ or /reel/) and return the media object. Returns 404 if deleted or unavailable.
Instructions
Get an Instagram post or reel by its shortcode (the part after /p/ or /reel/ in the link). Use get_v2_media_info_by_url when you have a full link and get_v2_media_info_by_id for a numeric media id. Returns the media object, or 404 for deleted or unavailable posts; promoted (ad) posts may also return 404. User tags are not included for videos, use get_gql_media_usertags for those. Live request to Instagram, billed per call. (GET /v2/media/info/by/code)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>"
},
"name": "get_v2_media_info_by_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| safe_int | No | Convert all big integers to strings |