# Instagram Account Details API

> Get when an Instagram account joined, the country it is based in, verification, and how many times it changed username (Instagram's "About this account"), as JSON. 1 credit.

**Get Instagram's "About this account" details**: the month the account joined, the country it is based in, whether it is verified, and how many times it changed its username. Useful for spotting fake or recycled accounts.

```
GET https://api.handlehaul.com/v1/users/{user}/account-details
```

- `GET /v1/users/{user}/account-details`: "About this account" details

**Cost:** 1 credit per successful call (free from cache). Failed calls and private accounts are free. Naming the account by a username we have to look up adds 1 credit; send the numeric id to skip it ([details](/pricing#usernames-and-ids)).

## Parameters

| Parameter | In | Description |
|---|---|---|
| `user` | path | Numeric user id (cheapest) or username. A username we have to look up costs 1 extra credit ([why](/docs/pricing#usernames-and-ids)). All digits = an id; write `@12345` for an all-digit username. Private accounts answer `403 private_account` (free). |
| `by` | query | Optional. `username` or `id`: says which one `user` is, instead of guessing from the digits. |
| `fresh` | query | `true` skips the cache. |

## Response

```json
{
  "data": {
    "joined": "January 2021",
    "country": "Brazil",
    "is_verified": false,
    "former_username_count": 1
  },
  "meta": {
    "request_id": "req_…",
    "cached": false,
    "cache_age_seconds": 0,
    "credits_charged": 1,
    "credits_remaining": 26943
  }
}
```

## Examples

```bash
curl "https://api.handlehaul.com/v1/users/natgeo/account-details" -H "X-Api-Key: $HANDLEHAUL_API_KEY"
```

```python
import os, requests
r = requests.get("https://api.handlehaul.com/v1/users/natgeo/account-details",
                 headers={"X-Api-Key": os.environ["HANDLEHAUL_API_KEY"]}, timeout=30)
r.raise_for_status()
d = r.json()["data"]
print(d["joined"], d["country"], d["former_username_count"])
```

```javascript
const res = await fetch("https://api.handlehaul.com/v1/users/natgeo/account-details", {
  headers: { "X-Api-Key": process.env.HANDLEHAUL_API_KEY },
});
const { data: details } = await res.json();
```

```php
$ch = curl_init("https://api.handlehaul.com/v1/users/natgeo/account-details");
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => ["X-Api-Key: " . getenv("HANDLEHAUL_API_KEY")],
    CURLOPT_RETURNTRANSFER => true,
]);
$body = json_decode(curl_exec($ch), true);
print_r($body["data"]);
```

```go
req, _ := http.NewRequest("GET", "https://api.handlehaul.com/v1/users/natgeo/account-details", nil)
req.Header.Set("X-Api-Key", os.Getenv("HANDLEHAUL_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
    log.Fatal(err)
}
defer res.Body.Close()
var body map[string]any
json.NewDecoder(res.Body).Decode(&body)
fmt.Println(body["data"])
```

## FAQ

### How do I see when an Instagram account was created?
Call `GET /v1/users/{username}/account-details`: `joined` is the month and year Instagram shows (for example "June 2017").
