Get Media
Retrieve hashtag media by hashtag name.
Params
| Name | Type | Default | Description |
|---|---|---|---|
| name (required) | string | – | Hashtag name |
| max_id | string | None | Use for pagination |
In order to use pagination, pass the next_max_id value from the previous response as max_id.
Note: as of November 16, 2026, the tab parameter (previously recent, top or clips) is no longer accepted: IG removed hashtag tabs.
Usage
- Python
- PHP
- cURL
from rocketapi import InstagramAPI
instagram_api = InstagramAPI(token="your-api-key")
print(instagram_api.get_hashtag_media("catsofinstagram"))
<?php
require('vendor/autoload.php');
use RocketAPI\InstagramAPI;
$api = new InstagramAPI('your-api-key');
print_r($api->getHashtagMedia("catsofinstagram"));
curl --request POST \
--url https://v1.rocketapi.io/instagram/hashtag/get_media \
--header 'Content-Type: application/json' \
--header 'Authorization: Token your-api-key' \
--data '{
"name": "catsofinstagram"
}'
Response example
Loading...