Docs · Profile
Profile
An account's bio, avatar, verification and exact follower, following, tweet and like counts.
https://api.lurkapi.com/v1/twitter/profileWhen to use this
Use it to size up an account: followers, following, tweets and likes as exact numbers, plus bio, website, location, join date and verification. verified is the blue check; verified_type shows gold (Business) and grey (Government) checks. Pass a pinned_tweet_ids entry to the tweet endpoint for the pinned tweet.
Protected accounts return their profile with protected: true. Unknown and suspended accounts return 404 not_found.
Parameters
All parameters go in the query string.
| Parameter | Description |
|---|---|
handlestringrequired | X username, with or without @ (e.g. NASA), or the profile URL.
|
Example request
Replace YOUR_API_KEY with your key, or set LURKAPI_KEY for the code. Get a free key.
curl "https://api.lurkapi.com/v1/twitter/profile?handle=NASA" \
-H "x-api-key: YOUR_API_KEY"const params = new URLSearchParams({
handle: "NASA",
});
const res = await fetch(`https://api.lurkapi.com/v1/twitter/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.pinned_tweet_ids);import os
import requests
res = requests.get(
"https://api.lurkapi.com/v1/twitter/profile",
params={
"handle": "NASA",
},
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["pinned_tweet_ids"])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 ….
Show the example response (1 KB)Hide
{
"success": true,
"credits_remaining": 999998,
"credits_charged": 1,
"id": "11348282",
"handle": "NASA",
"name": "NASA",
"bio": "Making the seemingly impossible, possible. ✨",
"location": "Pale Blue Dot",
"website": "http://www.nasa.gov/",
"avatar": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg",
"banner": "https://pbs.twimg.com/profile_banners/11348282/1788992290",
"verified": true,
"verified_type": "Government",
"created_at": "2007-12-19T20:20:32.000Z",
"followers": 92377446,
"following": 115,
"tweets": 74343,
"media_count": 28163,
"likes": 17002,
"pinned_tweet_ids": [
"2104593672624886205"
],
"protected": false,
"professional_type": null
}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.
Show all 22 fieldsHide
| 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). |
| id | string | Numeric user id. It stays the same when the handle changes. |
| handle | string | Username (handle), without @, with X's capitalization. |
| name | string | Display name. |
| bio | string | Bio text, t.co links expanded. Empty if none. |
| location | stringnullable | Location as the account wrote it (free text); null if none. |
| website | stringnullable | The website link on the profile, expanded; null if none. |
| avatar | stringnullable | Profile picture URL, 400×400; null if none. |
| banner | stringnullable | Header image URL; null if none. |
| verified | boolean | Has the blue check (X Premium). |
| verified_type | stringnullable | Business (gold check, a verified organization) or Government (grey check); null otherwise. |
| created_at | string | When the account was created, ISO 8601. |
| followers | number | Followers, exact. |
| following | number | Accounts they follow. |
| tweets | number | Tweets posted, replies and retweets included. |
| media_count | number | Tweets with photos or videos. |
| likes | number | Tweets they liked. |
| pinned_tweet_ids | string[] | Ids of the pinned tweet(s); pass one to the tweet endpoint. Empty if none. |
| protected | boolean | A protected (private) account: only approved followers see its tweets. |
| professional_type | stringnullable | Creator or Business for professional accounts; null for personal ones. |
Caching and freshness
Responses are cached for up to 1 hour, 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). All error codes.
| 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, this endpoint is the twitter_profile tool. Ask in plain English, for example:
Use LurkAPI's twitter_profile with handle "NASA" and summarize what you find.Claude calls twitter_profile with arguments like these, and each call costs 1 credit:
{
"handle": "NASA"
}Tool results skip nulls and empty lists to save tokens.