Analytics

Get bulk post analytics

Changed on

Batch version of GET /analytics/posts/{id}. Pass a comma-separated list of numeric OmniSocials post ids in ids and get each post's latest per-platform metrics back in a single request (thread posts are summed across their parts, same as the single-post endpoint). Built for sync clients that would otherwise call the single-post endpoint once per post and hit the 100 requests/minute rate limit. Up to 100 ids per call; page through larger sets in batches. Every requested id is returned (in request order); ids with no collected analytics come back with an empty platforms object rather than being omitted, so clients can map results 1:1 to the ids they sent. Reads stored snapshots from our database, the same data as the single-post endpoint, so it never calls the social platforms live.

get/analytics/posts

Request

  • Base URL
    https://api.omnisocials.com/v1
  • URL
    https://api.omnisocials.com/v1/analytics/posts
  • Auth
    HTTP bearer

Query parameters

idsstring required
Example:1024,1025,1026

Comma-separated numeric OmniSocials post ids (the id field from GET /posts), e.g. "1024,1025,1026". Max 100 per request.

Response

Per-post analytics, one entry per requested id

countinteger

Number of entries returned (equals the number of valid ids requested)

Example response

{
  "data": [
    {
      "post_id": "1024",
      "tags": [
        {
          "id": 12,
          "name": "Question hook"
        }
      ]
    }
  ],
  "count": 3
}

Changes

    • breaking

      the / response's property type changed from object to no type for status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • info

      added subschema #2 to the / response property allOf list for the response status