Skip to main content
Sign Up
Back to all posts

PostPeer Update: Social Media Analytics API

·Jonathan Geiger
product updateanalyticsapitwitteryoutubepinterest

Posting is half the job. Knowing what worked is the other half.

We just shipped the Social Media Analytics API. One endpoint. One schema. Metrics from every connected platform. Today it covers Twitter, YouTube, and Pinterest. LinkedIn and the others are next.

Here's what it does and how to use it.

One endpoint, every platform

Every platform's analytics API looks different. Twitter calls them "public_metrics." YouTube returns a statistics object. Pinterest splits views and outbound clicks across two endpoints. If you're tracking performance across all three, you're maintaining three different parsers, three different field names, three different rate-limit handlers.

The new endpoint normalizes all of that:

curl "https://api.postpeer.dev/v1/analytics?postId=69e0893109e2c65ae5957084" \
  -H "x-access-key: YOUR_API_KEY"
{
  "success": true,
  "post": {
    "source": "postpeer",
    "postId": "69e0893109e2c65ae5957084",
    "content": "Hello world!",
    "publishedAt": "2026-04-16T20:56:00.747Z",
    "aggregated": {
      "impressions": 25,
      "likes": 1,
      "comments": 0,
      "shares": null,
      "saves": 0,
      "clicks": null,
      "views": null,
      "engagementRate": null
    },
    "platforms": [
      {
        "platform": "twitter",
        "platformPostId": "2044882524506136582",
        "platformPostUrl": "https://twitter.com/user/status/2044882524506136582",
        "metrics": { "impressions": 25, "likes": 1, "comments": 0, "...": "..." }
      }
    ]
  }
}

Same schema for EVERY platform. Fields that don't apply on a given platform return null instead of being missing. Your code doesn't have to special-case TikTok versus Twitter versus Pinterest.

Four ways to query it

Same path, four different shapes depending on what you pass.

By PostPeer post ID

For posts you published through PostPeer. Returns metrics for that post on every platform it was sent to.

curl "https://api.postpeer.dev/v1/analytics?postId=69e0893109e2c65ae5957084" \
  -H "x-access-key: YOUR_API_KEY"

By external platform ID

Drop in any tweet ID, YouTube video ID, or Pinterest pin ID. PostPeer first looks for a matching post in your database. If it doesn't find one, pass platform and accountId and it fetches directly from the platform.

curl "https://api.postpeer.dev/v1/analytics?postId=2045080886845005934&platform=twitter&accountId=YOUR_ACCOUNT_ID" \
  -H "x-access-key: YOUR_API_KEY"

Paginated list

Omit postId to get all your published posts with analytics. Filter by platform, date range, sort by likes or engagement.

curl "https://api.postpeer.dev/v1/analytics?platform=twitter&fromDate=2026-04-10&toDate=2026-04-17&sortBy=likes&order=desc&limit=10" \
  -H "x-access-key: YOUR_API_KEY"

Account posts pulled from the platform

Set source=platform with an accountId and you'll get recent posts pulled directly from the platform, including ones you didn't publish through PostPeer. Useful for migrating an account or auditing existing content.

curl "https://api.postpeer.dev/v1/analytics?source=platform&accountId=YOUR_ACCOUNT_ID&platform=pinterest&limit=10" \
  -H "x-access-key: YOUR_API_KEY"

Each call costs 1 credit. Same as a publish call.

What metrics you actually get

Different platforms expose different signals. The unified schema makes that explicit.

MetricTwitterYouTubePinterest
impressionsyesnoyes
likesyesyesyes (reactions)
commentsyes (replies)yesyes
sharesyes (RT+quotes)nono
savesyes (bookmarks)noyes
clicksyes (URL)noyes (outbound+pin)
viewsnoyesno

Anything missing on a platform returns null. There's also an aggregated object that sums across every platform a post was published to, so you can sort the list by combined likes or impressions without doing the rollup yourself.

LinkedIn analytics need the r_member_postAnalytics OAuth scope and aren't live yet. If you connected LinkedIn before this scope existed, reconnect to enable analytics on that account when LinkedIn ships.

Try it without writing code

If you just want to see analytics for an account you already run, the free tools work without an API key.

These hit the same API under the hood. What you see on the page is what your code would get back.

What's next

Right now it's Twitter, YouTube, and Pinterest. Instagram, TikTok, and LinkedIn (with the right scope) are next. The schema won't change as we add platforms. Fields just stop being null.

Full reference is in the docs. The pitch and feature breakdown is on the landing page. If you'd rather skip the API key and try it on your own accounts, the free tools are one click away.