> ## Documentation Index
> Fetch the complete documentation index at: https://docs.querying.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Instagram API

> Lesen Sie öffentliche Instagram-Profile, neue Beiträge mit Likes und Kommentarzahlen, einzelne Beiträge und Reels, Kommentare und Stichwortsuchen als JSON.

Lesen Sie öffentliche Instagram-Daten als JSON über die asynchrone Task-API. Senden Sie `taskType` `SOCIAL` mit `platform` `instagram` und wählen Sie mit `action`, was gelesen wird. Eine abgeschlossene Anfrage kostet **0.5 Credits**.

## Anfrage

```bash theme={"theme":"css-variables"}
curl -X POST https://api.querying.ai/v1/async/task \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "taskType": "SOCIAL", "payload": { "platform": "instagram", "action": "profile", "username": "natgeo" } }'
```

Senden Sie den Task und fragen Sie dann `GET /v1/async/task/{id}` ab oder empfangen Sie den Webhook. Siehe [Asynchrone Tasks](https://docs.querying.ai/de/concepts/async-tasks.md).

## Aktionen

| `action` | Liest | Erforderlich |
| - | - | - |
| `search` (Standard) | Beiträge und Reels zu einem Stichwort | `query` |
| `profile` | Das Profil eines öffentlichen Kontos und seine 12 neuesten Beiträge | `username` |
| `posts` | Die 12 neuesten Beiträge eines Kontos, jeweils mit ihren Zahlen | `username` |
| `post` | Ein Beitrag oder Reel mit seinen ersten Kommentaren | `postUrl` |
| `comments` | Die Kommentare eines Beitrags | `postUrl` |

`username` nimmt einen Nutzernamen oder eine Profil-URL. `postUrl` nimmt die URL eines Beitrags, Reels oder IGTV-Videos, etwa `https://www.instagram.com/p/Df147tCiAyB/`.

## Parameter

* `query`: Erforderlich für `search`. Ein Stichwort, ein Hashtag-Wort oder ein Markenname.
* `limit`: Optional. `search` nimmt 1 bis 30, Standard 10. `posts` nimmt 1 bis 12, Standard 12. `comments` nimmt 1 bis 500, Standard 50.

## Antwortbeispiel

```json theme={"theme":"css-variables"}
{
  "platform": "instagram",
  "action": "profile",
  "id": "787132",
  "username": "natgeo",
  "displayName": "National Geographic",
  "biography": "Step into wonder and find your inner explorer with National Geographic.",
  "profileUrl": "https://www.instagram.com/natgeo/",
  "isVerified": true,
  "isPrivate": false,
  "followerCount": 268096466,
  "followingCount": 195,
  "postCount": 32000,
  "hasReels": true,
  "threadsUsername": "natgeo",
  "latestStoryAt": "2026-11-17T15:07:32.000Z",
  "recentPosts": [
    {
      "id": "4032379434794749057",
      "code": "Df147tCiAyB",
      "url": "https://www.instagram.com/p/Df147tCiAyB/",
      "mediaType": "carousel",
      "caption": "National Geographic photographers ventured to places far and wide this year.",
      "imageUrl": "https://scontent.cdninstagram.com/v/t51.82787-15/912032737.jpg"
    }
  ]
}
```

## Ergebnisfelder

* Jede Antwort wiederholt `platform` und `action`. Listen tragen `returnedCount`.
* `profile` liefert `id`, `username`, `displayName`, `biography`, `bioLinks`, `avatarUrl`, `profileUrl`, `isVerified`, `isPrivate`, `followerCount`, `followingCount`, `postCount`, `hasReels`, `highlights`, `threadsUsername`, `pronouns` und `recentPosts`. `latestStoryAt` erscheint, solange das Konto eine Story online hat, und `isMemorialized` kennzeichnet ein Gedenkkonto.
* `posts` liefert `posts`, die 12 neuesten Beiträge des Kontos, mit `likeCount`, `commentCount` und `publishedAt` von der Seite des jeweiligen Beitrags.
* `post` liefert `post` und die ersten `comments` des Beitrags. Ein Beitrag hat `id`, `code`, `url`, `mediaType` (`image`, `video` oder `carousel`), `caption`, `imageUrl`, `images`, `videoUrl`, `width`, `height`, `likeCount`, `commentCount`, `publishedAt`, `username`, `authorFullName`, `authorIsVerified`, `authorProfileImageUrl`, `coauthors`, `taggedUsers`, `topics`, `audio` (der Song oder der Originalton des Autors), `hasAudio`, `captionIsEdited`, `aiLabel` und `commentsDisabled`.
* `comments` liefert `comments`, jeweils mit `id`, `text`, `username`, `likeCount`, `replyCount` und `publishedAt`. Ein GIF-Kommentar trägt `gifUrl`. `availableCount` ist die Kommentarzahl des Beitrags, und `partial: true` kennzeichnet eine Liste, die kürzer ist als diese Zahl.
* `search` liefert `posts` mit `position`, dem `username` des Autors, `authorId`, `authorIsVerified` und `authorProfileImageUrl` sowie `playCount` bei Reels. `source` ist `instagram`, wenn Instagram eine Suchseite für das Stichwort hat; dann kommen deren `title`, `relatedKeywords` und Instagrams eigene `summary` zum Stichwort mit den `sources` hinzu, auf die ihre Fußnotennummern verweisen. Bei anderen Stichwörtern ist `source` gleich `web`, und `posts` enthält öffentliche Beiträge und Reels der letzten 30 Tage.
* Instagram zeigt abgemeldeten Besuchern die 12 neuesten Beiträge eines Profils und etwa ein Dutzend Kommentare eines Beitrags, und `posts`, `post` und `comments` liefern genau diese. Lesen Sie `post` für die Zahlen und die Veröffentlichungszeit eines Suchergebnisses.
* Ein Konto oder Beitrag, den es nicht gibt, ein privater Beitrag oder eine Seite, die Instagram nur angemeldeten Besuchern zeigt, beendet den Task mit `PAGE_UNAVAILABLE`. Berechnet werden nur abgeschlossene Anfragen.

## Siehe auch

* [YouTube](https://docs.querying.ai/de/engines/youtube.md)
* [Threads](https://docs.querying.ai/de/engines/threads.md)
* [Engine-Übersicht](https://docs.querying.ai/de/engines/overview.md)
* [Credits und Limits](https://docs.querying.ai/de/concepts/credits-and-limits.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.