---
title: "Look up an account"
canonical_url: "https://tweetstream.io/docs/api/lookup-user"
last_updated: 2026-11-05
---

# Look up an account

Returns one account's profile.

Canonical URL: https://tweetstream.io/docs/api/lookup-user

## `GET /api/user/{id}`

`https://api.tweetstream.io/api/user/{id}`

## Authorization

| Name | Type | Description |
| --- | --- | --- |
| `Authorization` | `string`, required | Bearer authentication with your TweetStream API key: `Bearer <key>`. |

## Path parameters

| Name | Type | Description |
| --- | --- | --- |
| `id` | `string`, required | Numeric account ID, or a handle with or without @. A handle made only of digits needs the @. |

## Response fields

| Name | Type | Description |
| --- | --- | --- |
| `pinnedTweet` | `object \| null`, required | The account's pinned post, with the same fields as tweet in a post lookup. Filled in only for accounts TweetStream has seen pin a post. Null otherwise, after the account unpins, or when the post can't be shown right now. |
| `user` | `object`, required | The same fields as author in WebSocket post events. |

## Responses

| Status | Description | Headers |
| --- | --- | --- |
| `200` | Success |  |
| `400` | Invalid account ID or handle |  |
| `401` | Missing or invalid API key |  |
| `403` | The API key's account has no paid or trialing subscription. |  |
| `404` | Account not found |  |
| `429` | Rate limit reached (60 lookups per minute per account, in bursts of up to 10) or 4 lookups already in progress for the account | `Retry-After` |
| `503` | Lookup or authentication is temporarily unavailable | `Retry-After` |

### 200

```json
{
  "user": {
    "id": "1189745302",
    "handle": "@marketdesk",
    "name": "Market Desk",
    "platform": "twitter",
    "verifiedType": "blue",
    "followersCount": 48210,
    "followingCount": 312,
    "joinedAt": 1358208000000,
    "profileImage": "https://pbs.twimg.com/profile_images/marketdesk_400x400.jpg"
  },
  "pinnedTweet": {
    "tweetId": "1234567890",
    "text": "Rate decision at 2pm ET.",
    "createdAt": 1744156800000,
    "kind": "post",
    "link": "https://x.com/marketdesk/status/1234567890",
    "author": {
      "id": "1189745302",
      "handle": "@marketdesk",
      "name": "Market Desk",
      "platform": "twitter",
      "verifiedType": "blue",
      "followersCount": 48210,
      "followingCount": 312,
      "joinedAt": 1358208000000,
      "profileImage": "https://pbs.twimg.com/profile_images/marketdesk_400x400.jpg"
    }
  }
}
```

### 400

```json
{
  "error": "<string>"
}
```

### 401

```json
{
  "error": "<string>"
}
```

### 403

```json
{
  "error": "<string>"
}
```

### 404

```json
{
  "error": "<string>"
}
```

### 429

```json
{
  "error": "<string>",
  "retryAfterSeconds": 0
}
```

### 503

```json
{
  "error": "<string>"
}
```

## Code samples

### cURL

```bash
curl --request GET \
  --url https://api.tweetstream.io/api/user/@marketdesk \
  --header "Authorization: Bearer $TWEETSTREAM_API_KEY"
```

### JavaScript

```javascript
const response = await fetch("https://api.tweetstream.io/api/user/@marketdesk", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.TWEETSTREAM_API_KEY}`,
  },
});

console.log(response.status, await response.json());
```

### Python

```python
import os
import requests

response = requests.get(
    "https://api.tweetstream.io/api/user/@marketdesk",
    headers={"Authorization": f"Bearer {os.environ['TWEETSTREAM_API_KEY']}"},
)

print(response.status_code, response.json())
```
