Get id by shortcode
Get media id by media shortcode. This endpoint is provided free of charge.
Params
Name | Type | Default | Description |
---|---|---|---|
shortcode (required) | string | – | Media shortcode |
Usage
- Python
- PHP
- cURL
from rocketapi import InstagramAPI
instagram_api = InstagramAPI(token="your-api-key")
print(instagram_api.get_media_id_by_shortcode("Ckv3mrWq7W"))
<?php
require('vendor/autoload.php');
use RocketAPI\InstagramAPI;
$api = new InstagramAPI('your-api-key');
print_r($api->getMediaIdByShortcode("Ckv3mrWq7W"));
curl --request POST \
--url https://v1.rocketapi.io/instagram/media/get_id_by_shortcode \
--header 'Content-Type: application/json' \
--header 'Authorization: Token your-api-key' \
--data '{
"shortcode": "Ckv3mrWq7W"
}'
Response example
Loading...