# Instagram Hashtag API (instagram.hashtag)

- Canonical page: https://everyinfra.com/en/instagram-api/hashtag
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "instagram", "action": "hashtag", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 30, max 100 per call
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=instagram&action=hashtag

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| hashtag | not declared | yes | not declared | Accepts an Instagram hashtag string without the leading # symbol (e.g., coffee) to list associated posts or reels. This parameter requires a hashtag name rather than an account handle. |
| results_type | enum: reel / reels | no | not declared | Selects the content type for discover and hashtag: omit it for regular posts, or pass reel or reels for short videos. posts cannot be passed explicitly, and any other value returns 422. It does not choose the response file format. |
| tag | not declared | no | not declared | Provides compatibility input for the hashtag action, automatically stripping leading # symbols. When both are supplied, hashtag takes precedence. Public requests must still include the required hashtag parameter. |
| limit | integer (1–100) | no | 30 | The most rows to return in this call, an integer from 1 to 100. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| post_id | platform-native meaning |
| url | Link to the record on the platform. |
| text | Body text with HTML removed, returned in full and never cut short (on a few platforms the list results themselves carry only an excerpt; the platform's field notes say so). |
| media_type | platform-native meaning |
| like_count | Likes. null means the platform or this capability does not disclose it; it is not 0. |
| comment_count | Comments. null means not disclosed, not 0. |
| view_count | Views or plays. null means not disclosed, not 0. |
| author_username | Author's username (@handle), usually usable in URLs. |
| author_name | Author's display name. |
| posted_at | Publish time in ISO 8601, UTC (for example 2026-08-07T12:34:56+00:00). Non-standard strings from the platform are passed through as is, so parse defensively. null means the platform does not disclose it. |
| location | Location description passed through as is; the format varies by platform. |
| id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
| image_url | Image link. Capabilities with several images may return an image_urls array. |
| video_url | platform-native meaning |
| author_id | Author's unique ID on the platform. |
| width | platform-native meaning |
| height | platform-native meaning |
| is_comments_disabled | platform-native meaning |
| author_follower_count | Author's follower count. null means not disclosed. |
| hashtags | Hashtags in the text, in order of appearance; absent when there are none. |
| top_comments | platform-native meaning |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "instagram",
  "action": "hashtag",
  "params": {
    "hashtag": "photography"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "instagram",
        "action": "hashtag",
        "params": {
            "hashtag": "photography",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 30. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "instagram",
  "action": "hashtag",
  "results": [
    {
      "post_id": "DdvvbQ1ufeL",
      "url": "https://www.instagram.com/p/DdvvbQ1ufeL/",
      "text": "📸@••• \n\n@••• \n@••• \n\n#photography #hobbymodel #jewelry #tattoo #quarry",
      "media_type": "image",
      "like_count": 0,
      "comment_count": 0,
      "author_username": "•••",
      "author_name": "•••",
      "posted_at": "2026-09-26T09:43:53+00:00",
      "location": "Aschaffenburg, Germany",
      "hashtags": [
        "photography",
        "hobbymodel",
        "jewelry"
      ],
      "platform": "instagram"
    },
    {
      "post_id": "Ddvva9EEUmp",
      "url": "https://www.instagram.com/p/Ddvva9EEUmp/",
      "text": "✨..♠️❤️..✨\n\n#instareels #viralpost #malvan #instagram #photography",
      "media_type": "image",
      "like_count": 0,
      "comment_count": 0,
      "author_username": "•••",
      "author_name": "•••",
      "posted_at": "2026-09-26T09:43:48+00:00",
      "location": "Malvan , Sindhudurg",
      "hashtags": [
        "instareels",
        "viralpost",
        "malvan"
      ],
      "platform": "instagram"
    }
  ],
  "count": 30,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=instagram
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
