# Instagram API without login

The official Instagram Graph API needs a Facebook login, a Meta app and an Instagram Business or Creator account of your own, and it mostly reads your own data. The StoriesFly API needs one API key. Send a username or a link and get the public data of any public account as JSON.

## How it differs from the Graph API

The Graph API is built to manage the account that signs in. It reads other accounts only through narrow doors such as Business Discovery, which covers Business and Creator accounts. You never log in to Instagram, and your own account never appears among the story's viewers.

|   | Instagram Graph API | StoriesFly API |
| --- | --- | --- |
| Read any public account | Business and Creator accounts only, through Business Discovery | Any public account |
| Stories of other accounts | No | Yes, with video length |
| Followers and following lists | No | Yes, paged |
| Views, shares, saves, reposts of a post | Only on your own posts | On any public post where Instagram shows them |
| Country and join date of an account | No | Yes (`user/about`) |
| App review, Facebook login | Required | Not needed: one API key |
| An Instagram account of your own | A Business or Creator account linked to a Facebook Page | None. You sign in with Telegram, not with Instagram |
| Comments on a post | Only on your own posts | On any public post (`post/comments`), with likes and reply counts |
| Hashtags | Hashtag search, up to 30 different hashtags per week for each account | Posts under any hashtag (`hashtag/posts`) |
| Private accounts | No | No, the answer is `private_account` |
| Publish, reply, send messages | Yes, for the account that signed in | No, the API only reads |
| Price | Free, with per-app call limits | From $1.50 per 1,000 requests |

## What you can do without a login

Everything below works with an API key and nothing else. A call takes 1 request, and a list takes 1 per page.

| To get | Call | Requests |
| --- | --- | --- |
| A profile with the verified badge, bio and link | `user/profile` | 1 |
| The stories an account has up | `user/stories` | 1 |
| The highlights of an account | `user/highlights` | 1 per page |
| The stories inside a highlight | `highlight` | 1 |
| Posts and reels of an account | `user/posts` and `user/reels` | 1 per page |
| Followers and following of an account | `user/followers` and `user/following` | 1 per page |
| One post with its picture and video links, caption, owner, time, and its views, likes, comments, shares and saves | `post` | 1 |
| Comments of a post | `post/comments` | 1 per page |
| Posts under a hashtag | `hashtag/posts` | 1 per page |
| Accounts and hashtags by name | `search/users` and `search/hashtags` | 1 per page |
| Places by name | `search/places` | 1 |

## What you cannot do

- Read a private account. Its stories, posts and lists answer `private_account` (HTTP 403). The profile of a private account still works.
- Act as an account. Posting, liking, following, commenting and sending messages are not in the API, which only reads.
- Read what only the owner of an account sees, such as insights, ad data or the list of people who viewed a story.
- Read a story that has expired. A story is up for 24 hours after it is posted.
- Read a field Instagram does not show to the public. Shares and saves of a post, for example, are returned only where Instagram shows them.

## Example request

One call and one header. This reads the profile of `arianagrande`.

**cURL**

```bash
curl "https://storiesfly.com/api/v1/user/profile?username=arianagrande" \
  -H "X-Api-Key: sf_live_your_key"
```

## Example response

The answer is the profile with the verified badge, the bio and the link in bio. It takes 1 request.

**Response**

```json
{
  "id": "7719696",
  "username": "arianagrande",
  "full_name": "Ariana Grande",
  "bio": "petal out now ꕤ ｡˚",
  "followers": 362337023,
  "following": 1075,
  "posts": 599,
  "verified": true,
  "is_private": false,
  "profile_pic_url": "https://scontent-iad3-1.cdninstagram.com/v/t51.82787-19/758252911_18764924023039697_5331858031316748508_n.jpg",
  "external_url": "https://linktr.ee/arianagrande"
}
```

## How the key works

Sign in with Telegram in the [dashboard](https://storiesfly.com/developers/dashboard), create a key and send it in the `X-Api-Key` header. A new account gets 100 free requests. After that you top up a prepaid balance from $10 and pay per request, from $1.50 per 1,000. See [pricing](https://storiesfly.com/developers/pricing).

Errors have the same shape everywhere: `{error, code}`. The [docs](https://storiesfly.com/developers/docs) list the codes.

## Questions developers ask

### Is this the official Instagram API?

No. It is our own API. It returns public Instagram data, and it is not affiliated with or endorsed by Instagram or Meta.

### Do I need an Instagram or Facebook account?

No. You sign in to StoriesFly with Telegram to get a key. You never log in to Instagram, and your own account never appears among the story's viewers.

### Do I need a Meta app or app review?

No. There is no app to register and no review. You send the key in the `X-Api-Key` header and call the endpoints.

### Which accounts can I read?

Any public account. For a private account the profile still works, and its stories, posts and lists answer `private_account`.

### Can I post, like, follow or send messages?

No. The API only reads public data.

### What does it cost?

From $1.50 per 1,000 requests, paid from a prepaid balance that never expires. Your first 100 requests are free.

## Links

- [This page on the site](https://storiesfly.com/developers/instagram-api-without-login)
- [Read the docs](https://storiesfly.com/developers/docs)
- [Instagram data API](https://storiesfly.com/developers): what the API is and what it returns
- [Pricing](https://storiesfly.com/developers/pricing): rates, examples and billing rules
- [OpenAPI file](https://storiesfly.com/openapi.json): the whole API in one file
- [API dashboard](https://storiesfly.com/developers/dashboard): get a key and top up
- [Changelog](https://storiesfly.com/developers/changelog): what changed and when
