# Instagram Content discovery API (instagram.discover)

- Canonical page: https://everyinfra.com/en/instagram-api/discover
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "instagram", "action": "discover", "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 200 per call
- Mode: async by default (202 + job_id, poll GET /api/v1/jobs/{job_id})

Instagram Content discovery lists public posts under one hashtag, which you pass as `keyword`, and returns each post's caption in `text`, its `media_type` (image, video or carousel), like, comment and view counts, the author's handle, display name and follower count, the publish time and location text. Marketers and trend researchers use it to see what people post under a tag, which formats draw engagement and which accounts post under it most.

`keyword` is a hashtag word such as coffee, with or without the leading #, not a free-text search phrase. Leave out `results_type` for regular posts, or set it to `reel` or `reels` for short-video results. The capability is async: the call returns a `job_id` instead of rows, and you fetch the results with that ID later. A null `like_count`, `comment_count` or `view_count` means the number was not disclosed, not that it is zero.

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | Specifies the target hashtag string for the discover action, automatically stripping leading # symbols. This parameter queries hashtags rather than executing general full-text searches, and differs from the tag parameter in the hashtag action. |
| 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. |
| limit | integer (1–200) | no | 30 | The most rows to return in this call, an integer from 1 to 200. 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 |

## 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": "discover",
  "params": {
    "keyword": "coffee"
  }
}'
```

```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": "discover",
        "params": {
            "keyword": "coffee",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

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

```text
{
  "id": "req_…",
  "platform": "instagram",
  "action": "discover",
  "results": [
    {
      "post_id": "De4za3DANzi",
      "url": "https://www.instagram.com/p/De4za3DANzi/",
      "text": "Some days I wake up a baddie, and some days I wake up a saddie.\n.\n.\n.\n.\n.\n.\n#fyp #instamood #burberry #coffee #cafe @••• @••• @••• @••• @•••",
      "media_type": "image",
      "like_count": -1,
      "comment_count": 0,
      "author_username": "•••",
      "author_name": "•••",
      "posted_at": "2026-10-24T18:43:18+00:00",
      "id": "•••",
      "image_url": "https://scontent-cph2-1.cdninstagram.com/v/t51.82787-15/865668555_18501136627099477_1202278696858241993_n.jpg?stp=dst-jpg_e35_p1080x1080_sh2.08_tt6&_nc_cat=102&ig_cache_key=NDAxNTE4NDU5MzExMTA0MDM5MQ%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6IkNBUk9VU0VMX0lURU…",
      "author_id": "•••",
      "width": 2479,
      "height": 3305,
      "hashtags": [
        "fyp",
        "instamood",
        "burberry"
      ]
    },
    {
      "post_id": "De4zXldkb3j",
      "url": "https://www.instagram.com/p/De4zXldkb3j/",
      "text": "♥️🌎🌎👌🏻👌🏻.\n.\n.\n.\n.\n.\n.\n.\n.\n.\n.\n.\n#لايك #الكحلي #coffee #flowers #venezuela",
      "media_type": "image",
      "like_count": 1,
      "comment_count": 0,
      "author_username": "•••",
      "author_name": "•••",
      "posted_at": "2026-10-24T18:42:51+00:00",
      "id": "•••",
      "image_url": "https://scontent-cph2-1.cdninstagram.com/v/t51.82787-15/863292678_17970790107172812_3863795868010461481_n.webp?stp=dst-webp_p1080x1080_sh2.08&_nc_cat=102&ig_cache_key=NDAxNTE4NDUzNjc5NDMwNjU5MQ%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6IkNBUk9VU0VMX0lURU0ueHBp…",
      "author_id": "•••",
      "width": 1440,
      "height": 1920,
      "hashtags": [
        "لايك",
        "الكحلي",
        "coffee"
      ]
    }
  ],
  "count": 18,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## FAQ

### How do I get the results of an async discovery call?

Instagram Content discovery is async, so the call answers with a `job_id` rather than rows. Store that ID and use it to fetch the results later; your code makes two steps, submitting the hashtag and then collecting the rows. Keep the `keyword` and `results_type` you sent beside the `job_id`, so each result set stays tied to its request.

### Is `keyword` a full-text search?

No. In Instagram Content discovery, `keyword` is a hashtag: a leading # is removed and the tag itself is looked up, so coffee and #coffee make the same request. Words that appear only in captions are not searched. The Instagram Hashtag capability also lists a tag's posts or reels, synchronously and under a different parameter name.

### How do I get Reels instead of regular posts?

Set `results_type` to `reel` or `reels`; both switch Instagram Content discovery to short-video results. Leave the parameter out for regular posts: posts is not a value you can send, and any other value is rejected with a 422 error when parameters are checked. The parameter picks the kind of content, not an output format such as JSON or CSV.

## 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
