integrations

Get integration account stats

Fetch account/page analytics for a single connected integration.

Returns the normalized AccountStats model (followers, impressions, reach, profile_views, plus a timeseries metrics array) for the integration's platform — Facebook, Instagram, LinkedIn, Twitter/X, TikTok, Pinterest, or YouTube. Use the id from GET /businesses/{business_id}/integrations as the integration_id.

Some accounts have no account-level analytics to give — a LinkedIn personal profile, or a platform whose reads we have turned off on cost grounds. Those return 200 with a populated unavailable_reason and null metrics, NOT an error. Null there means "not available", not zero.

Errors: 400 invalid_value: The integration_id is not a valid UUID. 400 invalid_request: A date, period, or metric value was rejected. 401 authentication_required: API key or token is missing, invalid, or revoked. 401 SOCIAL_TOKEN_EXPIRED: The connected account's token expired and could not be refreshed — the response's reconnect_url points to where to reconnect. 403 permission_denied: Your plan does not include API access. 404 resource_not_found: No integration with that ID exists, or it is not in your org. 429 rate_limit_exceeded: You sent too many requests this minute. 502 UPSTREAM_PROVIDER_ERROR: The social platform returned an error while fetching stats.

get/api/businesses/{business_id}/integrations/{integration_id}/stats

Request

  • Base URL: https://api.mymarky.ai
  • URL: https://api.mymarky.ai/api/businesses/{business_id}/integrations/{integration_id}/stats
  • Auth: HTTP bearer

Path parameters

business_idstring required

A UUID identifier.

integration_idstring required

A UUID identifier.

Query parameters

sincestring nullable

Start date (YYYY-MM-DD). Defaults to 30 days ago.

untilstring nullable

End date (YYYY-MM-DD). Defaults to today.

periodstring

Aggregation period: day, week, days_28, lifetime

metricsstring nullable

Comma-separated metric names (platform-specific). Omit for defaults.

Headers

Marky-Version'2026-04-08' | '2026-07-17' | '2026-08-02' | '2026-08-04' | '2026-08-06'
Example:2026-08-06

Opt into a dated API version. Omit to stay on the floor (2026-04-08) forever — unpinned clients never break. Pin to a newer date (e.g. 2026-08-06) to receive the newest response shapes. Unknown values fall back to the floor. See https://docs.mymarky.ai for the versioning model.

Response

Successful Response

fetched_atstring date-time
platformstring nullable
account_idstring nullable
page_idstring nullable
followersinteger nullable
followinginteger nullable
posts_countinteger nullable
impressionsinteger nullable
reachinteger nullable
profile_viewsinteger nullable
website_clicksinteger nullable
audience_age_pctobject nullable

Age bucket -> share of audience (0.0-1.0). IG, YT, LinkedIn, Pinterest.

audience_gender_pctobject nullable

Gender ('FEMALE'/'MALE'/'UNKNOWN') -> share. IG, YT, LinkedIn, Pinterest.

audience_country_pctobject nullable

ISO country code -> share. IG, YT, LinkedIn.

audience_city_pctobject nullable

City name -> share. IG only.

audience_industry_pctobject nullable

LinkedIn-only: industry name -> share.

audience_seniority_pctobject nullable

LinkedIn-only: seniority bucket -> share.

audience_function_pctobject nullable

LinkedIn-only: job function -> share.

raw_metricsobject
unavailable_reasonstring nullable

Non-null when the platform does not support account-level analytics for this account type (e.g. LinkedIn personal profiles). When set, the numeric fields being null means 'not supported by provider', not 'zero' or 'no data'.

post_stats_hintstring

Changes

No recorded changes to this operation across all 1 revision of this API.