Skip to main content

Twitter / X Analytics API

Bring Twitter performance data into your product, reporting workflow, automation, or AI system through one API.

  • Retrieve analytics for individual tweets
  • Pull tweets directly from a connected Twitter account
  • Filter results by date range and sort by performance
  • OAuth and token handling managed through PostPeer
No credit card required.
POST https://api.postpeer.dev/v1/posts
{ "platforms": ["twitter", "linkedin"], "content": "Hello world!" }
Published
2 platforms
TwitterLinkedIn
All posts delivered
Scheduled
queue
12
Queued
847
Sent
Next: in 15 min
Platforms
connected
XLIFBTT
One API, every platform
DF

"I was up and running on six different platforms in under 30 minutes. Strongly recommend!"

David Flor, Founder at Darklight Interactive

Divanshu KhatterMarketing Manager at Sembark

"Couldn't figure out the official Pinterest API. PostPeer was smooth. Using it daily."

Divanshu Khatter, Marketing Manager at Sembark

Het TikawalaFounder at Kalizzle AI Studio

"Great integration experience. Jonathan ships fixes within hours. Mad respect for the speed."

Het Tikawala, Founder at Kalizzle AI Studio

Add Social Media to Your Product in Three Steps

Connect once, then publish, schedule, and read data through the same API.

01

Get Your API Key

Sign up and get your API key instantly. No sales calls or complicated setup.

02

Integrate in Minutes

Connect once to PostPeer to publish, schedule, analyze, manage comments, and handle messages.

03

Support Every Major Platform

Give your users access to major social platforms without building and maintaining each integration yourself.

New to PostPeer? Read the getting started guide

Explore Requests and Responses by Format

Use the same endpoint and change only the fields required for each publishing format.

POSTRequest · Recent Tweets
curl -X GET
"https://api.postpeer.dev/v1/analytics/?source=platform&platform=twitter&accountId=acc_tw_123&limit=10&page=1" \
 -H "x-access-key: your-api-key"
202Response · Recent Tweets
{
    "success": true,
    "total": 1,
    "page": 1,
    "limit": 10,
    "posts": [
      {
        "source": "platform",
        "postId": null,
        "content": "Shipping our latest product update today.",
        "publishedAt": "2026-08-28T14:30:00Z",
        "aggregated": {
          "impressions": 0,
          "reach": null,
          "likes": 0,
          "comments": 0,
          "shares": 0,
          "saves": null,
          "clicks": 0,
          "views": null,
          "engagementRate": null
        },
        "platforms": [
          {
            "platform": "twitter",
            "platformPostId": "1961234567890123456",
            "platformPostUrl": "https://twitter.com/example/status/1961234567890123456",
            "metrics": {
              "impressions": 0,
              "reach": null,
              "likes": 0,
              "comments": 0,
              "shares": 0,
              "saves": null,
              "clicks": 0,
              "views": null,
              "engagementRate": null
            }
          }
        ]
      }
    ]
}

GET /v1/analytics/

View the Twitter API reference

Everything You Need to Understand Twitter Performance

Bring Twitter content and performance data into dashboards, SaaS products, reporting tools, automations, and internal analytics workflows.

Analyze Individual Tweets

Retrieve analytics for a specific tweet using its tweet ID together with platform=twitter and the connected Twitter accountId.

Pull Tweets From Connected Accounts

Use source=platform to retrieve recent content directly from a connected Twitter account, including supported tweets that were not published through PostPeer.

Track Tweets Published Through PostPeer

Retrieve performance data for tweets published through PostPeer, either as a list of published content or by querying a specific stored postId.

Filter Performance by Date

Use fromDate and toDate to focus your Twitter analytics on the reporting period you need.

Find Top-Performing Tweets

Use sortBy and order to rank Twitter content by supported performance metrics, then use page and limit to work through larger result sets.

Use One Consistent Analytics Schema

Receive Twitter performance data in PostPeer's normalized analytics structure, with unsupported metric fields returned as null instead of requiring a separate Twitter-specific response format.

Ship Twitter Analytics in Any Stack

Whether your product is a Node app, a no-code workflow, or an AI agent, the same PostPeer API can power the publishing workflow.

Dev Stack

Typed SDKs and predictable REST APIs let you integrate PostPeer into the stack your application already uses.

No Code

Trigger publishing workflows from tools your team already uses.

Setup guides

AI Agents & MCP

Give Claude, Cursor, Codex, or your own AI agent the ability to publish, schedule, and interact with social workflows through PostPeer.

Connect via MCP

Frequently Asked Questions

Power Your Next Project With a Unified Social Media API

Give your users posting, scheduling, analytics, and engagement features through one API your team can maintain.

Start with 20 free credits. No credit card required.