Skip to main content

Analytics Overview

warning

Analytics endpoints are not available on the Basic plan. Upgrade to Intermediate, Growth or Business plan to access these endpoints.

The Analytics API provides insights and performance data for your connected Facebook, Instagram, LinkedIn, Threads, Pinterest, Snapchat, Bluesky, YouTube, TikTok, Google Business Profile, and Meta Ads accounts. Retrieve metrics on reach, engagement, followers, post performance, and demographics.

Base URL:

https://analyze.oneupapp.io

Authentication​

All analytics endpoints require an apiKey parameter validated by the VerifyApiKeyV2 middleware.

ErrorStatusResponse
Missing key401{ "message": "Please provide a valid API key" }

Common Parameters​

All analytics endpoints share the following query parameters:

ParameterRequiredDescription
apiKeyYesYour personal API key generated from the API Access page.
social_network_idYesThe social account ID to retrieve analytics for.
presetNoDate preset: last_7_days, last_30_days, or last_90_days.
start_dateRequired without presetStart date in Y-m-d format.
end_dateRequired without presetEnd date in Y-m-d format. Must be > start_date (minimum 1 day range) and <= yesterday.
timezoneNoValid PHP timezone identifier (default: UTC).

Response Patterns​

Stats with Period Comparison​

Every endpoint returns metrics comparing the current period to the previous period:

{
"key": "likes",
"name": "Likes",
"value_current_period": 1234,
"value_last_period": 1000,
"percentage_change": "+23.40%"
}

Percentage change formula: ((current - last) / last) * 100

  • If last = 0 and current > 0, percentage change is 100.
  • If both are 0, percentage change is 0.

Post Performance​

Overview endpoints include top and bottom performing posts:

{
"most_engaging": [
{
"id": "...",
"caption": "...",
"permalink_url": "...",
"engagement_rate": 5.23
}
],
"least_engaging": [],
"most_reach": [],
"least_reach": [],
"most_shared": [],
"least_shared": []
}

Top and bottom 3 posts per category. LinkedIn personal profiles return post_performance: [].

Caching​

All analytics endpoints use Cache::flexible() with a 1 hour primary TTL and 2 hours stale-while-revalidate.

Summary Table​

PlatformEndpointContent Type
Facebook/api/facebook/overviewPage-level metrics + post performance
Facebook/api/facebook/postsPosts (excl. reels/stories) + hashtags
Facebook/api/facebook/reelsReels only
Facebook/api/facebook/storiesStories only
Facebook/api/facebook/demographicsFollowers by city & country
Instagram/api/instagram/overviewAccount-level metrics + post performance
Instagram/api/instagram/postsPosts (excl. stories)
Instagram/api/instagram/storiesStories only
Instagram/api/instagram/demographicsFollowers + engaged audience demographics (age, gender, city, country)
LinkedIn/api/linkedin/overviewAccount metrics (org or personal) + post performance
LinkedIn/api/linkedin/postsPosts (organization only)