# Instagram API

> Instagram returns public profile details, recent posts, and reels as a workflow and API.

Get profile returns public profile details and counts from a username, @name, or profile link. List recent posts returns public posts and reels, newest first, from a username or profile link; max results is optional.

- Page: https://fous.com/workflows/instagram
- Handle: `@instagram`
- Category: [Social](https://fous.com/workflows/category/social)
- Source website: https://instagram.com
- Last verified: Sep 29, 2026
- Fous is not affiliated with Instagram.

## Methods

### Get profile

Operation `get_profile`, version 1. 1 credit per call.

Get an Instagram account’s public profile, exact headline counts, bio link, and profile picture from its username or profile link. Business category is not shown on signed-out profiles; Instagram may require login for some profiles.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `username` | string | yes | `"https://www.instagram.com/nasa/"` | Instagram account name, @name, or profile link, such as natgeo. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "username"
  ],
  "properties": {
    "username": {
      "type": "string",
      "description": "Instagram account name, @name, or profile link, such as natgeo.",
      "examples": [
        "https://www.instagram.com/nasa/",
        "natgeo"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "username": "https://www.instagram.com/nasa/"
    },
    {
      "username": "natgeo"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `bio` | string | `"Making the seemingly impossible, possible. ✨"` | Public profile biography. |
| `posts` | integer | `4936` | Number of posts. |
| `username` | string | `"nasa"` | Account username. |
| `followers` | integer | `104329278` | Number of followers. |
| `following` | integer | `89` | Number of followed accounts. |
| `full_name` | string | `"NASA"` | Account display name. |
| `is_private` | boolean | `false` | Whether the account is private. |
| `is_verified` | boolean | `true` | Whether the account is verified. |
| `profile_link` | string | `"https://www.instagram.com/nasa/"` | Instagram profile link. |
| `website_link` | string or null | `"https://www.nasa.gov"` | First website link listed on the profile. |
| `instagram_user_id` | string | `"528817151"` | Instagram account ID. |
| `profile_picture_link` | string or null | `"https://scontent-lga3-2.cdninstagram.com/v/t51.2885-19/29090066_159271188110124_1152068159029641216_n.jpg?stp=dst-jpg_s` | Profile picture link. |

**Example input**

```json
{
  "username": "https://www.instagram.com/nasa/"
}
```

**Example output**

```json
{
  "bio": "Making the seemingly impossible, possible. ✨",
  "posts": 4936,
  "username": "nasa",
  "followers": 104329278,
  "following": 89,
  "full_name": "NASA",
  "is_private": false,
  "is_verified": true,
  "profile_link": "https://www.instagram.com/nasa/",
  "website_link": "https://www.nasa.gov",
  "instagram_user_id": "528817151",
  "profile_picture_link": "https://scontent-lga3-2.cdninstagram.com/v/t51.2885-19/29090066_159271188110124_1152068159029641216_n.jpg?stp=dst-jpg_s150x150_tt6&_nc_cat=1&ccb=7-5&_nc_sid=f7ccc5&efg=eyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVf…"
}
```

### List recent posts

Operation `list_recent_posts`, version 1. 1 credit per call.

List the latest publicly embeddable posts and reels from an Instagram account, newest first. Instagram may show fewer than requested without login; unavailable view counts are null.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `username` | string | yes | `"natgeo"` | Instagram account name, @name, or profile link, for example natgeo. |
| `max_results` | integer | no | `3` | Most posts to return, for example 12. Instagram may publicly show fewer. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "username"
  ],
  "properties": {
    "username": {
      "type": "string",
      "description": "Instagram account name, @name, or profile link, for example natgeo.",
      "examples": [
        "natgeo",
        "@instagram",
        "https://www.instagram.com/natgeo/"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 12,
      "maximum": 50,
      "minimum": 1,
      "description": "Most posts to return, for example 12. Instagram may publicly show fewer.",
      "x-fous-developer": true,
      "examples": [
        3,
        2
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "username": "natgeo"
    },
    {
      "username": "@instagram",
      "max_results": 3
    },
    {
      "username": "https://www.instagram.com/natgeo/",
      "max_results": 2
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `posts` | array |  | Recent public posts and reels, newest first. |
| `posts[].caption` | string or null | `"Take a few seconds to relax in the prairie grass 🌼\n\n#IncredibleAnimalJourneys is now streaming on @disneyplus"` |  |
| `posts[].post_url` | string | `"https://www.instagram.com/reel/Dd1rVy4Ae8b/"` |  |
| `posts[].image_url` | string or null |  |  |
| `posts[].is_pinned` | boolean | `false` |  |
| `posts[].post_type` | string | `"reel"` |  |
| `posts[].posted_at` | string | `"2026-09-28T17:04:13+00:00"` | Date and time posted, ISO 8601 with offset. |
| `posts[].shortcode` | string | `"Dd1rVy4Ae8b"` |  |
| `posts[].like_count` | integer or null | `21387` |  |
| `posts[].view_count` | integer or null | `72855` |  |
| `posts[].comment_count` | integer or null | `119` |  |

**Example input**

```json
{
  "username": "natgeo"
}
```

**Example output**

```json
{
  "posts": [
    {
      "caption": "Take a few seconds to relax in the prairie grass 🌼\n\n#IncredibleAnimalJourneys is now streaming on @disneyplus",
      "post_url": "https://www.instagram.com/reel/Dd1rVy4Ae8b/",
      "image_url": "https://scontent-sea5-1.cdninstagram.com/v/t51.82787-15/825325618_18702123289019133_8306510580496048755_n.jpg?stp=dst-jpg_e15_tt6&_nc_cat=1&ig_cache_key=Mzk5NjI5MDg1ODA5NjkxNDIwMw%3D%3D.3-ccb7-5&ccb=7…",
      "is_pinned": false,
      "post_type": "reel",
      "posted_at": "2026-09-28T17:04:13+00:00",
      "shortcode": "Dd1rVy4Ae8b",
      "like_count": 21387,
      "view_count": 72855,
      "comment_count": 119
    },
    {
      "caption": "National Geographic photographer Jasper Doest joined an annual scientific expedition of the Okavango Delta—learning from local experts’ connections to this living landscape and changing his outlook on…",
      "post_url": "https://www.instagram.com/p/Dd1e6WyCCLZ/",
      "image_url": "https://scontent-sea5-1.cdninstagram.com/v/t51.82787-15/827856154_18702081256019133_8840428697517582330_n.jpg?stp=dst-jpg_e15_tt6&_nc_cat=1&ig_cache_key=Mzk5NjIzNTQzMDk0MDM3OTU4OA%3D%3D.3-ccb7-5&ccb=7…",
      "is_pinned": false,
      "post_type": "carousel",
      "posted_at": "2026-09-28T15:14:59+00:00",
      "shortcode": "Dd1e6WyCCLZ",
      "like_count": 17543,
      "view_count": null,
      "comment_count": 73
    }
  ]
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@instagram",
  "visibility": "public",
  "operation": "get_profile",
  "version": 1,
  "input": {
    "username": "https://www.instagram.com/nasa/"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@instagram\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_profile\",\n  \"version\": 1,\n  \"input\": {\n    \"username\": \"https://www.instagram.com/nasa/\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@instagram",
  "visibility": "public",
  "operation": "get_profile",
  "version": 1,
  "input": {
    "username": "https://www.instagram.com/nasa/"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@instagram","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Review public account profiles and follower counts.
- Track recent public posts and reels from selected accounts.
- Collect captions, post links, and posting dates.
- Compare likes and comments across recent posts.
- Find public profile bios and listed website links.

## FAQ

### Is Fous affiliated with Instagram?

No. Fous is not affiliated with Instagram. This workflow reads the public instagram.com website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a Instagram account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from instagram.com when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### What is a public account’s follower count?

Get profile returns the account’s follower count when given a username, @name, or profile link.

### What are an account’s latest posts and reels?

List recent posts returns the latest publicly embeddable posts and reels, newest first.

### When was a recent post published?

List recent posts returns each post’s posting date and time when available.

## Related

- [Threads API](https://fous.com/workflows/threads.md): Threads provides public profiles and posts, including recent posts, engagement and replies; private or login-only content is excluded, and replies may be limited to 10.
- [Mastodon API](https://fous.com/workflows/mastodon.md): Mastodon provides public profiles and recent public posts, including hashtag posts, but excludes private and unlisted posts and may limit visibility to accounts known to mastodon.social or a selected server.
- [Bluesky API](https://fous.com/workflows/bluesky.md): Bluesky provides public profile details and latest posts, plus searches of up to 100 matching public posts; search results may lag behind new posts.
- [Social Blade API](https://fous.com/workflows/social-blade.md): Social Blade provides public creator totals and grades, YouTube 30-day growth and 14-day history, TikTok 30-day changes and up to 14-day history, and Instagram totals without public daily history or 30-day follower change.
- [TikTok API](https://fous.com/workflows/tiktok.md): TikTok returns public profiles and totals, recent pinned-first videos, and public video details and engagement; private content unavailable, and feeds may be incomplete or empty.
- [Pinterest API](https://fous.com/workflows/pinterest.md): Pinterest helps people discover and save visual ideas, returning public search results from the first page and visible profile boards, with monthly views only when shown.
- [X API](https://fous.com/workflows/x.md): X returns public profile details and public posts with author, media, and engagement; deleted, protected, or unavailable posts cannot be retrieved.
- [Telegram API](https://fous.com/workflows/telegram.md): Telegram provides public channel details and the latest posts visible in public previews, with media and view totals that may be rounded or approximate.
- [All Social workflows](https://fous.com/workflows/category/social)
