# Profile

> A public profile's biography, links and follower counts.

- **Request:** `GET https://api.lurkapi.com/v1/instagram/profile`
- **Auth:** `x-api-key` header ([get a free key](https://lurkapi.com/login?next=/dashboard))
- **Cost:** 1 credit per call. Validation errors, `401`/`402`/`429` rejections and `5xx` failures are free; `not_found` is charged ([how charging works](https://lurkapi.com/docs.md#credits)).
- **MCP tool:** `instagram_profile` on `https://api.lurkapi.com/mcp`
- **Freshness:** responses are cached for up to 10 minutes
- **Try it live:** https://lurkapi.com/docs/instagram/profile#try (no signup)
- **Platform:** [Instagram](https://lurkapi.com/docs/instagram.md) (instagram.com)
- **Web page:** https://lurkapi.com/docs/instagram/profile

## When to use this

Pass a username or profile URL. Follower and following counts come from public profile data. Post count and higher resolution images depend on what Instagram returns; missing fields are null.

## Parameters

All parameters go in the query string.

| Name | Type | Required | Default | Allowed values | Description | Example |
| --- | --- | --- | --- | --- | --- | --- |
| `username` | string | no |  |  | Instagram username, with or without @, or a profile URL. Required unless url is given. | `nike` |
| `url` | string | no |  |  | An instagram.com profile URL. Required unless username is given. |  |

## Example request

Replace `YOUR_API_KEY` with your key, or set `LURKAPI_KEY` for the code. [Get a free key](https://lurkapi.com/login?next=/dashboard).

curl:

```bash
curl "https://api.lurkapi.com/v1/instagram/profile?username=nike" \
  -H "x-api-key: YOUR_API_KEY"
```

JavaScript:

```js
const params = new URLSearchParams({
  username: "nike",
});
const res = await fetch(`https://api.lurkapi.com/v1/instagram/profile?${params}`, {
  headers: { "x-api-key": process.env.LURKAPI_KEY },
});
const data = await res.json();
if (!data.success) throw new Error(`${data.code}: ${data.error}`);
console.log(data);
```

Python:

```python
import os
import requests

res = requests.get(
    "https://api.lurkapi.com/v1/instagram/profile",
    params={
        "username": "nike",
    },
    headers={"x-api-key": os.environ["LURKAPI_KEY"]},
    timeout=60,
)
data = res.json()
if not data["success"]:
    raise RuntimeError(f"{data['code']}: {data['error']}")
print(data)
```

## Example response

A real response from this endpoint, captured from the live API and trimmed to a couple of items. Strings over 96 characters (mostly signed media URLs) are cut short and end in `…`.

200 OK (application/json):

```json
{
  "success": true,
  "credits_remaining": 99,
  "credits_charged": 1,
  "data": {
    "pk": "13460080",
    "id": "17841400602400210",
    "username": "nike",
    "url": "https://www.instagram.com/nike/",
    "full_name": "Nike",
    "biography": "Just Do It.",
    "profile_pic_url": "https://scontent-iad6-1.cdninstagram.com/v/t51.82787-19/551608484_185671…",
    "profile_pic_url_hd": "https://scontent-iad6-1.cdninstagram.com/v/t51.82787-19/551608484_185671…",
    "is_private": false,
    "is_verified": true,
    "follower_count": 291074487,
    "following_count": 266,
    "media_count": null,
    "external_url": "http://empli.fi/nike",
    "bio_links": [
      {
        "url": "http://empli.fi/nike",
        "title": ""
      }
    ],
    "pronouns": [],
    "account_type": 2,
    "category": "",
    "total_clips_count": 1
  }
}
```

## Response fields

Every field of a successful response. `[]` marks a list: `a[].b` is the `b` of each item in `a`. **nullable** fields can be `null`; **optional** fields can be missing.

| Field | Type | Description |
| --- | --- | --- |
| `success` | `true` | Always true here; errors have `success: false`. |
| `credits_remaining` | `number` | Your balance after this call. On anonymous playground calls: free tries left today. |
| `credits_charged` | `number` | Credits this call cost; 0 on free endpoints. On anonymous playground calls: tries used (1). |
| `data` | `object` | Profile details. |
| `data.pk` | `string` | Numeric Instagram user id, represented as a string. |
| `data.id` | `string`, nullable | Instagram's separate GraphQL profile id; null when not returned. |
| `data.username` | `string` | Instagram username, without @. |
| `data.url` | `string` | Canonical Instagram profile URL. |
| `data.full_name` | `string`, nullable | Display name; null when not returned. |
| `data.biography` | `string`, nullable | Biography, preserving line breaks; null when not returned. |
| `data.profile_pic_url` | `string`, nullable | Profile image URL; CDN links can expire; null when not returned. |
| `data.profile_pic_url_hd` | `string`, nullable | Higher resolution profile image URL, when available; null when not returned. |
| `data.is_private` | `boolean`, nullable | Whether the account is private; null when not returned. |
| `data.is_verified` | `boolean`, nullable | Whether Instagram shows a verified badge; null when not returned. |
| `data.follower_count` | `number`, nullable | Follower count; null when not shown or returned. A null count is not zero. |
| `data.following_count` | `number`, nullable | Number of accounts followed; null when not shown or returned. A null count is not zero. |
| `data.media_count` | `number`, nullable | Number of posts; public GraphQL frequently omits this count; null when not shown or returned. A null count is not zero. |
| `data.external_url` | `string`, nullable | Main website link in the profile; null when not returned. |
| `data.bio_links` | `object[]`, nullable | Links listed in the bio, in Instagram's order; null when not returned. |
| `data.bio_links[].url` | `string` | The link's destination URL. |
| `data.bio_links[].title` | `string`, nullable | Link title; an empty title means none was set; null when not returned. |
| `data.pronouns` | `string[]`, nullable | Pronouns the user set; null when not returned, empty when none are set. |
| `data.account_type` | `number`, nullable | Instagram's account type code, e.g. 2; null when not shown or returned. A null count is not zero. |
| `data.category` | `string`, nullable | Category label; an empty string means Instagram returned no label; null when not returned. |
| `data.total_clips_count` | `number`, nullable | Reel count returned by Instagram; it may differ from the number visible in the reels tab; null when not shown or returned. A null count is not zero. |

## Caching and freshness

Responses are cached for up to 10 minutes, so a repeat call within that window can return the same data. It still costs 1 credit.

## Errors

Errors return `{ success: false, error, code, docs }` with the HTTP status below. Validation errors, `401`/`402`/`429` rejections and `5xx` failures are free; `not_found` is charged ([how charging works](https://lurkapi.com/docs.md#credits)). [All error codes](https://lurkapi.com/docs.md#errors).

| Status | Code | Meaning |
| --- | --- | --- |
| 401 | `missing_api_key` | No API key. Send it in the `x-api-key` header. |
| 401 | `invalid_api_key` | The key is unknown or was revoked. |
| 402 | `insufficient_credits` | Not enough credits for this call. Buy a pack or wait for tomorrow's top-up. |
| 404 | `not_found` | The endpoint, or the thing you asked for (ad, post, subreddit), doesn't exist. Charged when the platform was checked. |
| 405 | `method_not_allowed` | Endpoints take GET with query params. |
| 429 | `rate_limited` | Too many calls at once. Wait for the `retry-after` seconds, then retry. |
| 500 | `internal_error` | Something broke on our side. Retry; 5xx errors are free. |
| 502 | `upstream_error` | The platform didn't give a usable answer. Retry; 5xx errors are free. |
| 503 | `upstream_busy` | All our connections to the platform are busy. Retry in a few seconds; 5xx errors are free. |
| 504 | `upstream_timeout` | The platform took over 30 seconds to answer. Retry; timeouts are free. |

## Use it in Claude

Once LurkAPI is [connected to Claude](https://lurkapi.com/docs.md#claude), this endpoint is the `instagram_profile` tool. Ask in plain English, for example:

Ask Claude:

```text
Use LurkAPI's instagram_profile with username "nike" and summarize what you find.
```

Claude calls `instagram_profile` with arguments like these, and each call costs 1 credit:

Tool arguments:

```json
{
  "username": "nike"
}
```

Tool results skip nulls and empty lists to save tokens.

---

Previous: [Threads post](https://lurkapi.com/docs/threads/post.md) · Next: [User posts](https://lurkapi.com/docs/instagram/user-posts.md)
