Change of an account's Twitter Score over the last 7 and 30 days
GET https://twitterscore.io/api/v1/get_twitter_scores_diff
Returns how the account's Twitter Score moved over the trailing week and month, computed from TwitterScore's daily score snapshots: for each window, diff = newest snapshot − oldest snapshot whose date is on or after (today_UTC − 7 days) / (today_UTC − 30 days), ignoring snapshots with a zero score. date is the date of the oldest snapshot used as the baseline, diff_str is the same number as a signed string for display ("+12", "-3", "0"). When no snapshot exists in the window — including accounts known only from the follower graph, which have no snapshots — diff is 0 and date is null. today is the UTC date on which the response was computed.
Required: one of username, twitter_id.
Nested fields
week.date(string (date, YYYY-MM-DD)): Date of the oldest snapshot in the 7-day window (the baseline); null when there is no snapshot.week.diff(integer): Newest snapshot score minus baseline score within the window; 0 when no data.week.diff_str(string):diffas a signed string: "+N" for gains, "-N" for losses, "0" for no change / no data.month.date(string (date, YYYY-MM-DD)): Date of the oldest snapshot in the 30-day window; null when there is no snapshot.month.diff(integer): Newest snapshot score minus baseline score within the window; 0 when no data.month.diff_str(string):diffas a signed string.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
username |
string | no | X/Twitter handle without the leading @ (whitespace/slashes stripped). Also matches the profile slug and previous handles of renamed accounts. | |
twitter_id |
integer | no | Numeric X/Twitter user id. Tried before username when both are given. |
At least one of username, twitter_id is required.
Example request
curl -s "https://twitterscore.io/api/v1/get_twitter_scores_diff?username=VitalikButerin" \
-H "X-API-Key: $TWITTERSCORE_API_KEY" \
-H "User-Agent: my-app/1.0 ([email protected])"
import os, requests
r = requests.get(
"https://twitterscore.io/api/v1/get_twitter_scores_diff",
params={"username": "VitalikButerin"},
headers={"X-API-Key": os.environ["TWITTERSCORE_API_KEY"],
"User-Agent": "my-app/1.0 ([email protected])"},
timeout=15,
)
data = r.json()
if not data.get("success", True): # errors arrive as success=false (see /developers/errors/)
raise RuntimeError(data["message"])
print(data)
const r = await fetch("https://twitterscore.io/api/v1/get_twitter_scores_diff?username=VitalikButerin", {
headers: { "X-API-Key": process.env.TWITTERSCORE_API_KEY,
"User-Agent": "my-app/1.0 ([email protected])" },
});
const data = await r.json();
if (data.success === false) throw new Error(data.message);
console.log(data);
Example response
{
"success": true,
"today": "2026-10-03",
"week": {
"date": "2026-09-26",
"diff": 0,
"diff_str": "0"
},
"month": {
"date": "2026-09-03",
"diff": 3,
"diff_str": "+3"
}
}
Errors
Error codes this endpoint can return (see Errors for the body format): api_key_missing, api_key_invalid, api_access_deactivated, api_key_revoked, invalid_params, account_not_found, method_not_allowed, rate_limited, quota_exceeded, server_error.
Authentication: X-API-Key header (or Authorization: Bearer), see Authentication. Limits: per-minute rate and monthly quota by plan, see Rate limits. Machine-readable definition: /openapi.json.
This page as Markdown.