Skip to main content

Analytics API

GET /api/analytics/profile_username

Retrieves analytics data for a specified user profile across one or more social media platforms.


Method: GET

Endpoint URL: https://api.upload-post.com/api/analytics/profile_username

Description:

This endpoint provides key analytics metrics for a given social media profile associated with a user's account. It allows fetching data for multiple platforms in a single request. The system is designed to be extensible, with support for more platforms planned for the future.

Authentication:

A valid JSON Web Token (JWT) is required for authentication. The token must be included in the Authorization header as a Apikey token.

Authorization: Apikey <YOUR_JWT_TOKEN>

Parameters:

ParameterTypeLocationRequiredDescription
profile_usernamestringPathYesThe unique username of the profile for which you want to retrieve analytics.
platformsstringQueryYesA comma-separated list of platforms to fetch analytics for. E.g., ?platforms=instagram,youtube,threads,pinterest,reddit.
page_idstringQueryNoRequired for Facebook analytics. The ID of the Facebook Page.
page_urnstringQueryNoOptional for LinkedIn. Defaults to "me" (personal profile). Use Organization URN/ID for pages.

Supported Platforms:

Currently, the following platforms are supported:

  • instagram
  • tiktok
  • Linkedin
  • Facebook
  • X (Twitter)
  • youtube
  • threads
  • pinterest
  • reddit
  • bluesky

Support for additional platforms will be added in the future. If you request a platform that is not yet supported, the response will include a message indicating this for that specific platform.

Here is an example of how to call the endpoint to get analytics for the test profile on Instagram, YouTube, Threads, Pinterest, and Reddit.

curl 'https://api.upload-post.com/api/analytics/test?platforms=instagram,youtube,threads,pinterest,reddit' \
--header 'Authorization: Apikey XXX...'

Example Successful Response (200 OK):

The response is a JSON object where each key corresponds to a requested platform. The value is another object containing the specific analytics data for that platform.

{
"instagram": {
"followers": 47,
"impressions": 0,
"profileViews": 0,
"reach": 0,
"reach_timeseries": [
{
"date": "2025-07-04",
"value": 0
},
{
"date": "2025-07-05",
"value": 0
},
// ... more date entries
{
"date": "2025-08-02",
"value": 0
}
]
}
}

Field Descriptions for Instagram Analytics:

  • followers: Total number of followers.
  • impressions: Total number of times the profile's content was shown to users.
  • profileViews: Total number of times the profile was viewed.
  • reach: The number of unique accounts that have seen any of the profile's content.
  • reach_timeseries: An array of objects showing the daily reach value over the last 30 days.

Error Responses:

  • 400 Bad Request: The platforms query parameter is missing or invalid.
  • 401 Unauthorized: The JWT is missing, invalid, or expired.
  • 404 Not Found: The specified profile_username does not exist for the authenticated user.
  • 500 Internal Server Error: An unexpected error occurred on the server while fetching the data.