# Instagram Posts by user API (instagram.user_posts)

- Canonical page: https://everyinfra.com/en/instagram-api/user_posts
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "instagram", "action": "user_posts", "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})

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| username | not declared | yes | not declared | Identifies an Instagram account handle without the @ symbol or as a full profile URL. Used by profile, persona, user_posts, and reels to fetch account data. The followers action returns only total follower counts, whereas followers_list and following_list return account lists. |
| 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": "user_posts",
  "params": {
    "username": "nasa"
  }
}'
```

```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": "user_posts",
        "params": {
            "username": "nasa",
        },
    },
    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 30. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "instagram",
  "action": "user_posts",
  "results": [
    {
      "post_id": "De2t82PPyx9",
      "url": "https://www.instagram.com/p/De2t82PPyx9/",
      "text": "We are not slowing down. 🚀\n\nOur #Artemis III mission will send four astronauts to low Earth orbit next year to test critical systems needed for future lunar landings and we’re accelerating efforts to ensure the success of Artemis IV, the first Artemis mission on the lunar surface…",
      "media_type": "image",
      "like_count": 46089,
      "comment_count": 364,
      "author_username": "nasa",
      "author_name": "NASA",
      "posted_at": "2026-10-23T23:20:57+00:00",
      "id": "4014598211346836605_528817151",
      "image_url": "https://instagram.fuba2-1.fna.fbcdn.net/v/t51.82787-15/859070372_18661402093049152_3071139610491516778_n.jpg?stp=dst-jpg_e15_tt6&_nc_cat=1&ig_cache_key=NDAxNDU5ODIxMTM0NjgzNjYwNTE4NjYxNDAyMDg3MDQ5MTUy.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6IkNMSVBTLnhwaWRzLjcyMC5…",
      "video_url": "https://instagram.fuba2-1.fna.fbcdn.net/o1/v/t2/f2/m86/AQNTkECBw2suz97dudN4wjd5tp7fZgWYJZB6PwTVUGMQU9r4E08_w4KcBLpaInhz4kASzQbv8D4AqHGg8nn8IWBidZ5OR5QfmdqpvN0.mp4?_nc_cat=102&_nc_oc=Adq5bLzGCWm2kVZWdS8bGQwb60nMRQoz0Yl-AbZ3EdrSsTV4Mt8qEBWTMMUiwkNKBeQ&_nc_sid=5e9851&_nc_ht=instagra…",
      "author_id": "•••",
      "width": 1080,
      "height": 1920
    },
    {
      "post_id": "De1wbZ6l2Vy",
      "url": "https://www.instagram.com/p/De1wbZ6l2Vy/",
      "text": "This disc is 50,000 light-years wide!\n\nIt's the Sombrero Galaxy — seen here by our orbiting @••• telescope. Its unique appearance could be the result of a long-ago merger with other galaxies.\n\n#NASA #Space #Galaxy",
      "media_type": "image",
      "like_count": 693209,
      "comment_count": 2199,
      "author_username": "nasa",
      "author_name": "NASA",
      "posted_at": "2026-10-23T14:19:41+00:00",
      "id": "4014327632355616114_528817151",
      "image_url": "https://instagram.fuba2-1.fna.fbcdn.net/v/t51.82787-15/862320651_18661289491049152_6188246238745863140_n.jpg?stp=dst-jpg_e35_tt6&_nc_cat=1&ig_cache_key=NDAxNDMyNzU3MzgyODI5NTU0MQ%3D%3D.3-ccb7-5&ccb=7-5&_nc_sid=58cdad&efg=eyJ2ZW5jb2RlX3RhZyI6IkNBUk9VU0VMX0lURU0ueHBpZHMuMTQ0MC5zZHI…",
      "author_id": "•••",
      "width": 1440,
      "height": 1440
    }
  ],
  "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
