Get Media
Retrieve hashtag media by hashtag name.
Params
Name | Type | Default | Description |
---|---|---|---|
name (required) | string | – | Hashtag name |
tab | string | recent | Tab (allowed values: recent , top or clips ) |
page | int | None | Use for pagination |
max_id | string | None | Use for pagination |
In order to use pagination, you need to use both the max_id
and page
parameters. You can obtain these values from the response's next_page
and next_max_id
fields.
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/location/get_media \
--header 'Content-Type: application/json' \
--header 'Authorization: Token your-api-key' \
--data '{
"name": "catsofinstagram"
}'
Response example
Loading...