← Back to API Documentation

API v2 Changelog

This page summarizes all changes between API v1 and v2. The new API is available at /api/v2/. The existing v1 API at /api/v1/ remains available in parallel.

New Base URL

v1
/api/v1/...
v2
/api/v2/...

Endpoint Overview (v2)

  • GET /api/v2/{network}
  • GET /api/v2/{network}/{profileId}
  • GET /api/v2/{network}/{profileId}/{endpoint}
  • GET /api/v2/profiles/connected
  • GET /api/v2/profiles/queried
  • GET /api/v2/profiles/dashboards
  • GET /api/v2/docs

Available endpoints per profile: profile, profile/daily, posts, stories

Supported networks: facebook, instagram, x, youtube, linkedin, pinterest, tiktok, threads, bluesky

December 2026 — OAuth tokens end when their user leaves the account

Former members get INVALID_TOKEN right away

An OAuth access token now stops working as soon as the user who authorized the connection leaves the account or is deleted. Every endpoint, /token/validate included, returns INVALID_TOKEN (401). Until now the token kept working until it expired, at most one hour, and only the refresh was refused. A refresh does not help; another member of the account has to connect again. The account's API token is not affected.

New OAuth scope publish:write and error code INSUFFICIENT_SCOPE (403)

All upcoming Publish endpoints, including those that only read posts, need the scope publish:write. The consent page shows it as an option when a client requests it, preselected for known web apps and unselected for unknown clients and for clients that redirect to a local address; the user can deselect it and allow reading only. Every connection includes dataapi:read. A token without publish:write is answered with INSUFFICIENT_SCOPE at these endpoints. A refresh keeps the scope of the connection and does not help: the user has to connect again and allow publishing. Connections made before this change can only read. Existing endpoints never return this code.

New error code USER_TOKEN_REQUIRED (403)

Reserved for upcoming endpoints that act on behalf of a user. They need a user's OAuth access token; the account's API token is answered with USER_TOKEN_REQUIRED. Existing endpoints never return this code. A new token of the same account does not help, so do not treat it as a token error.

November 2026 — Look up a YouTube channel by ID

You can use a YouTube channel ID such as UC3XTzVzaHQEd30rQbuvCtTQ even when Fanpage Karma has never tracked the channel and YouTube search returns no matching channel. The ID is case-sensitive. The usual profile quota rules apply when the API returns data. If your account has no room for another profile, the channel is not added and the request returns INVALID_PROFILE_ID.

November 2026 — No Broken Image Links for Instagram Competitor Profiles

image is missing instead of a link that never loads

For Instagram profiles without valid Insights access for your user (not connected, Insights token expired, or not shared with you), /posts returned a redirect link in image once the stored image link was older than a few days. Instagram never serves these images to us, so the link always ended with a 404. The field is now missing in this case. Profiles with valid Insights access keep the redirect link. /stories is not affected.

The same applies to very old Instagram posts from before the Instagram Graph API whose image Instagram no longer serves: image is missing instead of an expired link.

Image links expire

Links in image point to the network's CDN and expire after a few days. Load the image while the link is fresh and do not store the link; request the post again to get a new one.

November 2026 — Image URLs Without a Readable Token

Instagram post images and Facebook profile pictures

Image URLs of Instagram posts (image) and profile pictures of Facebook pages (profile_picture_url) no longer contain an access token in plain text. The token is encrypted and only valid for this one image or profile: Instagram post images carry it in parameter t instead of access_token, Facebook profile pictures inside the signed value of parameter token. Images of Instagram profiles that a user of the account has access to now load again via the MCP server as well. The URLs are still plain strings; URLs stored earlier keep working as long as their token is valid. For a while after the change, answers built from data cached before it may contain image URLs of older Instagram posts that do not load; they load again once the data has been refreshed.

November 2026 — HTTP 202 When a Profile Update Takes Longer Than 20 Seconds

New 202 Accepted with Retry-After

When a request needs data that is not up to date, the API updates the profile before it answers. A request now waits at most about 20 seconds for this update. Most updates finish in that time and the answer is a 200 as before. If the update takes longer, it continues in the background and the API answers with a 202 and a Retry-After header. This answer contains no data yet: the data field is missing. Wait for the seconds given in the header and repeat the request to get the data. Requests no longer run for minutes or into a timeout. A 202 answer counts neither against the hourly rate limit nor against your profile quota. Clients need to tell a 202 apart from a 200.

New metadata.data_status

The answers of /profile, /profile/daily, /posts and /stories now say in metadata.data_status whether they contain data: ready in a 200, updating in a 202. Error answers do not have the field.

New 429 TOO_MANY_UPDATES

At most 10 profile updates run for one account at the same time. A request that would start another one is answered with 429, the error code TOO_MANY_UPDATES and a Retry-After header; error.details.max_concurrent_updates names the limit. Repeat the request after the seconds given in the header: a place becomes free as soon as a running update has finished. Requests for data that is already up to date, and requests that wait for an update that is already running, are not affected. Like a 202, this answer counts neither against the hourly rate limit nor against your profile quota.

November 2026 — Profile Handles With @, Clearer INVALID_PROFILE_ID

A leading @ in the profile ID is ignored

/youtube/@doenges1903/profile now finds the channel just like /youtube/doenges1903/profile, also for profiles that Fanpage Karma does not know yet. Surrounding whitespace is ignored as well. Every profile ID or username that worked before still returns the same profile. Public demo profiles work with a leading @ too (/tiktok/@nike/profile without a token), and the hourly rate limit counts all spellings of a profile together (@nike, Nike, nike).

Instagram: numeric Graph API IDs

The numeric Instagram Graph API ID of a profile (e.g. 17841400921600159) now finds the profile if it is already known to Fanpage Karma.

New message for INVALID_PROFILE_ID

The message is now Profile not found. Pass the exact username from the profile URL or the profile ID. instead of Invalid profile ID. The error code and the HTTP status (404) are unchanged; if you compare the message text, switch to error.code.

October 2026 — Profiles From All Dashboards, Full Post Texts

/profiles/dashboards: pages with limit and offset

Large accounts can request the dashboard profiles page by page: limit (max. 1,000) and offset. A page responds quickly even for thousands of profiles. Without both parameters, the response is unchanged. total_profiles and total_dashboards always count the whole list.

/posts: limitation names where the newest 1,000 posts start

/posts still returns at most 1,000 posts, newest first. If the time period contains more, metadata.limitation now names the day on which the returned posts start and how to get older ones: set to to that day or earlier. The returned posts are the same as before, but large time periods now respond much faster. date_from and date_to still show the requested time period.

New GET /api/v2/profiles/dashboards

Returns all profiles contained in the active Analytics dashboards of your account, regardless of which user added them. Each profile appears once and lists the dashboards it belongs to (id, name); metadata.total_dashboards counts the dashboards that appear in the list. Only profiles from networks supported by this API are included. Listing does not count towards your quota — requesting data for a profile does.

Full text in message

The message field of /posts and /stories is no longer cut off after 1,000 characters; it now contains the full text of the post. If you store it in a column of fixed length, check its width.

August 2026 — Limits Are Now Explainable

Breaking EXCEEDED_ACCESS_LIMIT now returns HTTP 403 instead of 429

An exhausted profile quota used to be indistinguishable from an hourly rate limit, since both returned 429. The two are not the same: the quota only resets once per billing cycle, so waiting never helps — clients retrying on 429 kept hitting the wall until the cycle ended. The API documentation already listed 403 for this error code.

Breaking Further Status Codes Aligned With the Documentation

Error Code Before Now
EXCEEDED_ACCESS_LIMIT429403
INVALID_TOKEN403401
INVALID_ENDPOINT400404
INVALID_PROFILE_ID400404
ENDPOINT_NOT_AVAILABLE_FOR_NETWORK403400

Integrations that branch on error.code rather than the HTTP status are unaffected by all five changes.

Breaking Error responses no longer carry profile_name / username

When a request is rejected because of the profile quota, the API now stops before refreshing the profile, so metadata no longer contains profile_name and username. network, profile_id and endpoint are still present, and successful responses are unchanged. The reason is response time: previously a full report was computed and then discarded — a rejection took 10.5 seconds in the case that triggered this change, and now takes under one.

New error.details

Limit errors now carry machine-readable numbers, so an integration no longer has to parse the message text.

{
"error": {
"code": "EXCEEDED_ACCESS_LIMIT",
"message": "Your API access is configured for 50 profiles, and 50 are already in use. ...",
"details": {
"quota_unit": "profiles",
"quota_max": 50,
"quota_used": 50,
"quota_required": 1,
"quota_resets_at": "2026-09-01",
"requested_profile_is_new": true
}
}
}

With an ENTERPRISE licence quota_unit is credits and quota_required states what the requested network costs (TikTok 3, X 5, otherwise 1). For RATE_LIMIT_EXCEEDED the object contains limit, remaining, reset, window and days_requested.

New Retry-After

429 responses now include a Retry-After header with the seconds until the limit resets at the top of the hour. Quota-related 403 responses deliberately omit it — their reset date is returned as quota_resets_at instead.

Correction: Rate-Limit Table

The documented rate-limit tiers did not match the actual behaviour. For /profile and /profile/daily, the limit of 365 requests per hour applies to date ranges of less than 8 days; from 8 days onwards it is 75 (previously documented as 365 up to and including 13 days). The tiers for /posts and /stories are also at 8 and 14 days. The API behaviour is unchanged — only the documentation was wrong.

Breaking Changes

The following changes in v2 are intentionally breaking and require updates to existing integrations.

Breaking 1. Authentication via Bearer Header

The API token is no longer passed as a query parameter. Use the Authorization header instead.

v1
?token=YOUR_TOKEN
v2
Authorization: Bearer YOUR_TOKEN

Example:

curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://app.fanpagekarma.com/api/v2/facebook/6815841748/profile"

Breaking 2. period Replaced by from / to

The period=YYYY-MM-DD_YYYY-MM-DD parameter is removed in v2. Use separate from and to parameters instead.

v1
?period=2026-01-01_2026-01-31
v2
?from=2026-01-01&to=2026-01-31

Rules:

  • If both from and to are omitted: default period (last 28 full days, excluding today).
  • If only from is set: to defaults to yesterday (UTC).
  • If to is set, from must also be set.

Breaking 3. Network Path twitter → x

The twitter network path has been removed in v2. Use x instead.

v1
/api/v1/twitter/...
v2
/api/v2/x/...

Breaking 4. Intentional Breaking Changes

v2 is a new major version with intentional breaking changes. It is not backwards-compatible with v1.

Breaking 5. KPI Alias Names Removed

In v2, only the current metric key names are returned. Legacy alias key names from the v1 fallback are no longer included in the response.

Breaking 6. Field Name kpi → metrics

In v2, the nested metrics object in post and story responses uses the field name metrics instead of kpi.

v1
{
"kpi": { ... }
}
v2
{
"metrics": { ... }
}

Breaking 7. Field Name task → endpoint

In v2, the metadata field for the requested path is named endpoint instead of task.

v1
{
"task": "profile"
}
v2
{
"endpoint": "profile"
}

Breaking 8. Structured Error Object

The metadata.error string field is removed. Instead, a top-level error object with code and message is returned.

v1
{
"data": {},
"metadata": {
"error": "Invalid token."
}
}
v2
{
"data": {},
"metadata": {
"version": "v2"
},
"error": {
"code": "INVALID_TOKEN",
"message": "Invalid token."
}
}

Possible error codes:

UNEXPECTED_ERROR, INVALID_ENDPOINT, NO_BEARER_TOKEN,
INVALID_BEARER_HEADER, INVALID_TOKEN, NO_PROFILE_ID,
INVALID_PROFILE_ID, NO_USER_FOR_ACCOUNT, EXCEEDED_ACCESS_LIMIT,
ACCOUNT_SUSPENDED, DATABASE_ERROR,
ENDPOINT_NOT_AVAILABLE_FOR_NETWORK, RATE_LIMIT_EXCEEDED,
INVALID_DATE_RANGE, MISSING_METRICS

Breaking 9. Date Format Changed to ISO 8601

All date fields now use ISO 8601 format.

v1 — Metadata dates
"Thu Jan 22 00:00:00 UTC 2026"
v2 — Metadata dates
"2026-01-22"
v1 — Post/Story timestamps
"Thu Jan 22 14:30:00 UTC 2026"
v2 — Post/Story timestamps
"2026-01-22T14:30:00Z"

Breaking 10. Metric description Field Removed

The description field has been removed from metric objects in data responses. Use the dedicated metrics catalog endpoint to retrieve metric descriptions.

v1
{
"engagement": {
"title": "Engagement",
"description": "Average number of interactions...",
"value": 0.042,
"formatted_value": "4.2%"
}
}
v2
{
"engagement": {
"title": "Engagement",
"value": 0.042,
"formatted_value": "4.2%"
}
}

Metric descriptions are available via:

GET /api/v2/{network}/{endpoint}/metrics

New Features

New Profile Daily Endpoint

The /profile/daily endpoint returns daily time series data for profile metrics.

  • from and to are both required parameters (YYYY-MM-DD)
  • metrics is a required parameter — comma-separated list of metric API names
  • Response contains a time series per metric with title and values: [{date, value}]
  • Response data key is "daily"
  • Available metric keys can be discovered via the /profile endpoint

Example:

curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://app.fanpagekarma.com/api/v2/facebook/6815841748/profile/daily?from=2026-01-01&to=2026-01-31&metrics=page_follower,engagement"

New Metrics Filter for All Endpoints

The metrics query parameter is now supported on all data endpoints (/profile, /posts, /stories), not just /profile/daily. Pass a comma-separated list of metric API names to return only the specified metrics.

  • Required for /profile/daily, optional for all other endpoints
  • If omitted on /profile, /posts, /stories: all metrics are returned (same as before)
  • Use GET /api/v2/{network}/{endpoint}/metrics to discover available metric keys

Example — only return engagement and page_follower for a profile:

curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://app.fanpagekarma.com/api/v2/facebook/6815841748/profile?metrics=page_follower,engagement"

New Pagination for Posts/Stories

Posts and stories endpoints now support limit and offset query parameters.

  • limit — Maximum number of returned items (default and max: 1000)
  • offset — Number of items to skip (default: 0)
  • Metadata includes: total_count, limit, offset

Example:

curl -H "Authorization: Bearer YOUR_TOKEN" \
"https://app.fanpagekarma.com/api/v2/facebook/6815841748/posts?limit=5&offset=10"

New Rate-Limit Headers

All authenticated responses to /{network}/{profileId}/{endpoint} now include rate-limit information as HTTP headers:

  • X-RateLimit-Limit — Maximum requests per hour for this token/endpoint/profile combination
  • X-RateLimit-Remaining — Remaining requests in the current hour
  • X-RateLimit-Reset — Unix timestamp (seconds) when the limit resets

New OpenAPI Documentation

The OpenAPI specification at /api/v2/docs now includes:

  • Security schema (Bearer Token)
  • Parameter descriptions with example values and allowed values
  • Response documentation for all endpoints

Unchanged in v2

  • API rate limits remain the same.
  • Public demo profiles remain available; a demo token is no longer required for these.

Migration Checklist

Follow these steps to migrate your integration from v1 to v2:

  1. Change your base URL to /api/v2/.
  2. Remove the token query parameter and set the Authorization: Bearer <token> header instead.
  3. Replace period with separate from and to parameters.
  4. Change the twitter network path to x.
  5. Update post/story parsing: rename kpi to metrics.
  6. Update metadata parsing: rename task to endpoint.
  7. Update error handling: parse error.code / error.message instead of metadata.error.
  8. Update date parsing to ISO 8601 format (YYYY-MM-DD and YYYY-MM-DDTHH:mm:ssZ).
  9. Optionally integrate the new OpenAPI spec at /api/v2/docs.
  10. For daily time series data, use the new /profile/daily endpoint. Requires from, to, and metrics parameters.
  11. Remove any code that reads the description field from metric objects. Use GET /api/v2/{network}/{endpoint}/metrics to retrieve metric descriptions separately.