10-result maximum: The Instagram Graph API limits hashtag media results to a maximum of 10 per page. You can paginate using the after cursor, but the total available results are also limited per API design. For high-volume monitoring, use multiple hashtags to broaden coverage.
When to Use
- UGC (user-generated content) discovery: Monitor your brand hashtag in near real-time to find new customer posts to engage with, repost, or feature in a UGC gallery.
- Campaign participation tracking: For campaign hashtags, fetch recent posts hourly to track participation growth, total post count, and identify top contributors.
- Trend monitoring: Watch industry hashtags for fresh content trends that could inform your editorial calendar or indicate a fast-breaking topic requiring a response.
- Influencer discovery: Identify Instagram users actively posting about your niche by scanning recent posts under relevant hashtags, evaluating accounts for potential partnership outreach.
- Competitor mention monitoring: Track competitor brand hashtags to understand customer sentiment and identify dissatisfied users who might be receptive to switching.
Configuration
Connection
| Field | Required | Description |
accessToken | Required | Long-lived Instagram access token stored in BizFirst Credentials Manager. |
igUserId | Required | Your Instagram Business/Creator account ID. Required by Graph API for hashtag context. |
Operation
| Field | Required | Description |
resource | Required | Must be ig-hashtag. |
operation | Required | Must be get-recent-media. |
hashtagId | Required | Hashtag ID from hashtag/get. |
limit | Optional | Items per page. Default 25. Clamped to max 100 by BizFirst (Instagram returns at most 10 results regardless). |
after | Optional | Cursor for pagination from previous page's paging.after. |
Sample Configuration JSON
{
"resource": "ig-hashtag",
"operation": "get-recent-media",
"accessToken": "{{ $credential.instagram.accessToken }}",
"igUserId": "17841400000000000",
"hashtagId": "{{ $db.hashtagCache.where(name='sustainablefashion').hashtagId }}"
}
Validation Errors
| Error | Cause |
accessToken is required | accessToken field is missing or empty. |
igUserId is required | igUserId field is missing or empty. |
hashtagId is required | hashtagId field is missing or empty. Call hashtag/get first. |
Output
Success Port
| Field | Type | Description |
status | string | "success" |
hashtagId | string | The hashtag ID that was queried. |
media | array | Array of recent media objects tagged with the hashtag. Max 10 items per page. |
paging.before | string | Cursor for the previous page. |
paging.after | string | Cursor for the next page. Empty on last page. |
paging.nextUrl | string | Full Graph API URL for the next page. |
payload | string | Raw JSON response. |
Error Port
| Field | Type | Description |
status | string | "error" |
errorCode | string | Graph API error code. |
errorMessage | string | Error description. |
payload | string | Raw error response. |
Sample Output JSON
{
"status": "success",
"hashtagId": "17843819102081146",
"media": [
{
"id": "17855590000000020",
"caption": "Loving my new eco-friendly outfit! #sustainablefashion",
"media_type": "IMAGE",
"permalink": "https://www.instagram.com/p/ABCD1234/"
}
],
"paging": {
"before": "",
"after": "QVFIUm...",
"nextUrl": "https://graph.facebook.com/v18.0/..."
}
}
Expression Reference
| Expression | Value |
{{ $output.instagram.media }} | Array of recent media items |
{{ $output.instagram.media[0].id }} | First media item's ID |
{{ $output.instagram.media[0].caption }} | First media item's caption |
{{ $output.instagram.paging.after }} | Next-page cursor |
{{ $output.instagram.hashtagId }} | Queried hashtag ID |
Node Policies & GuardRails
- Requires cached hashtagId: Never call this without a pre-resolved
hashtagId from hashtag/get. Add a conditional gate to check for cached ID before resolving.
- Available fields limitation: The Graph API only returns
id, caption, media_type, media_url, permalink, and timestamp for hashtag media. Fields like like_count are not available for other users' media via this endpoint.
- Rate limit: 200 calls per user per hour, shared with all Instagram node operations.
- GDPR: Posts retrieved are public, but storing captions (which may contain personal data) requires lawful basis. Apply data minimisation — only store the fields your use case requires.
Examples
Hourly brand hashtag UGC monitor
{
"resource": "ig-hashtag",
"operation": "get-recent-media",
"accessToken": "{{ $credential.instagram.accessToken }}",
"igUserId": "{{ $env.IG_USER_ID }}",
"hashtagId": "{{ $env.BRAND_HASHTAG_ID }}"
}
Runs hourly via a scheduled trigger. Retrieves the latest 10 posts using your brand hashtag. New posts (compared to the previous run) are queued for community manager review and potential engagement.
Campaign participation counter
{
"resource": "ig-hashtag",
"operation": "get-recent-media",
"accessToken": "{{ $credential.instagram.accessToken }}",
"igUserId": "17841400000000000",
"hashtagId": "{{ $db.campaigns.where(id=$input.campaignId).hashtagId }}",
"after": "{{ $loopState.afterCursor }}"
}
Paginated through multiple calls, counting total media items returned across pages to estimate campaign hashtag participation volume.