Skip to main content
The X Activity API (XAA) endpoint group allows developers to tap into activity events happening on the X Platform. You can subscribe to events you are interested in, such as profile.update.bio, post.create, or post.delete, and filter by the User ID whose events you want. XAA delivers matching events for that User ID to your app with sub-second latency.

Delivery mechanisms

The X Activity API currently supports the following delivery mechanisms to send events to your app:

Supported event types

Currently, X Activity API supports the following event types, organized by category:

Post events

Post events are triggered when a user creates or deletes a Post.
Post events via XAA vs Filtered Stream: X Activity API supports post.create and post.delete events. Subscribe by user_id to get real-time notifications when users create or delete Posts.If you want targeted keyword filtering, boolean logic, geo targeting, language filters, or any of the other operators that the Filtered Stream supports, use the Filtered Stream endpoint instead.

Like events

Like events are triggered when a user likes a Post, or when one of the user’s own Posts is liked.
Direction filter: The like.create event supports an optional direction filter set to outbound or inbound. Use outbound for likes the user makes, and inbound for likes the user’s Posts receive. If no direction is specified, both inbound and outbound like events are delivered.Private event: like.create is a private event and requires user-context (OAuth 2.0) authentication. See Event privacy and authentication below.

Follow events

Follow events are triggered when the filtered user follows another user, or is followed by another user.

Profile events

Profile events are triggered when a user makes changes to their profile information.

Chat events

Chat events pertain to the new, encrypted messaging stack, or XChat.

Legacy DM events

Legacy DM events pertain to the legacy, unencrypted DM system.

News events

News events provide updates on trending topics and headlines curated by Grok.
Enterprise only: The news.new event is only available to Enterprise and Partner tier accounts at this time.

Spaces events

Spaces events are triggered when a user starts or ends a Space. In future releases, XAA will expand to support additional event types including social interactions, content engagement, monetization features, and more. We will continue to update our docs when new event types become available.

Event privacy and authentication

The X Activity API distinguishes between public events and private events, at parity with the X app, as explained below.

Public events

Public events are activities that a public user account performs publicly that are visible to all X users. These events are visible to all users on the X platform and don’t require OAuth authentication from the user in order to view. Current public events:
  • Profile updates (bio, picture, banner, location, URL, username changes)
  • Post creation (post.create) and deletion (post.delete)
For these public events, you can create subscriptions by specifying the user ID in your filter and receive them via XAA.

Private events

Private events are activities that require explicit user consent through OAuth authentication. A user must authenticate via X and grant explicit permission to a developer app to access these events. Current private events:
  • Likes (like.create)
  • Encrypted chat received (chat.received)
  • Encrypted chat sent (chat.sent)
  • DM received (dm.received)
  • DM sent (dm.sent)
  • DM read (dm.read)
  • DM typing indicator (dm.indicate_typing)
  • Post mentions (post.mention.create)
Authentication requirements for private events:
  • The user must authenticate your application via OAuth 2.0
  • Your application must obtain appropriate OAuth scopes
  • The user must explicitly grant permission for your app to access these events
  • Subscriptions for private events can only be created for users who have authorized your application

Subscription limits

The X Activity API has different subscription limits based on your account tier:

Endpoints

Account setupTo access these endpoints, you will need:Learn more about getting access to the X API v2 endpoints in our getting started guide.