---
title: "Get Post Analytics"
method: GET
path: "/2/tweets/analytics"
tags: ["Posts"]
---

# Get Post Analytics

`GET /2/tweets/analytics`

## Request

- Base URL: `https://api.x.com`
- URL: `https://api.x.com/2/tweets/analytics`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://api.x.com/2/oauth2/authorize`
    - Token URL: `https://api.x.com/2/oauth2/token` scopes: `users.read`, `tweet.read`
  - HTTP oauth

Retrieves analytics data for specified Posts within a defined time range.

## Query parameters

- `ids` AnalyticsId[], required
- `start_time` string, date-time, required
- `end_time` string, date-time, required
- `granularity` 'hourly' | 'weekly' | 'daily' | 'total'
- `analytics.fields` string[]: The fields available for a Analytics object.

## Response `200`

The request has succeeded.

- GetPostsAnalyticsResponse
  - `data` Analytics[]
    - `app_install_attempts` integer
    - `app_opens` integer
    - `bookmarks` integer
    - `detail_expands` integer
    - `email_tweet` integer
    - `engagements` integer
    - `follows` integer
    - `hashtag_clicks` integer
    - `id` string
    - `impressions` integer
    - `likes` integer
    - `media_views` integer
    - `permalink_clicks` integer
    - `quote_tweets` integer
    - `replies` integer
    - `retweets` integer
    - `shares` integer
    - `timestamp` string
    - `timestamped_metrics` object[]: Time-bucketed engagement metrics for the Post, one entry per granularity bucket.
      - `metrics` object, nullable: Engagement metric counts for this bucket.
        - `app_install_attempts` integer, nullable
        - `app_opens` integer, nullable
        - `bookmarks` integer, nullable
        - `detail_expands` integer, nullable
        - `email_tweet` integer, nullable
        - `engagements` integer, nullable
        - `follows` integer, nullable
        - `hashtag_clicks` integer, nullable
        - `impressions` integer, nullable
        - `likes` integer, nullable
        - `media_views` integer, nullable
        - `permalink_clicks` integer, nullable
        - `quote_tweets` integer, nullable
        - `replies` integer, nullable
        - `retweets` integer, nullable
        - `shares` integer, nullable
        - `unfollows` integer, nullable
        - `unlikes` integer, nullable
        - `url_clicks` integer, nullable
        - `user_profile_clicks` integer, nullable
      - `timestamp` string, nullable: Start of the metrics bucket, as an ISO 8601 date-time.
    - `unfollows` integer
    - `unlikes` integer
    - `url_clicks` integer
    - `user_profile_clicks` integer
  - `errors` Problem[]
    - union
      - ResourceNotFoundProblem
        - `detail` string, required
        - `parameter` string
        - `resource_id` string
        - `resource_type` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/resource-not-found', required
        - `value` string
      - InvalidRequestProblem
        - `detail` string, required
        - `parameter` string
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/invalid-request', required
        - `value` string
      - NotAuthorizedForResourceProblem
        - `detail` string, required
        - `parameter` string
        - `resource_id` string
        - `resource_type` string, required
        - `section` string
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/not-authorized-for-resource', required
        - `value` string
      - NotAuthorizedForFieldProblem
        - `detail` string, required
        - `field` string, required
        - `parameter` string
        - `resource_id` string
        - `resource_type` string
        - `section` string
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/not-authorized-for-field', required
        - `value` string
      - FieldUnauthorizedProblem
        - `detail` string, required
        - `field` string, required
        - `resource_type` string
        - `section` string
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/field-unauthorized', required
      - FieldHydrationFailureProblem
        - `detail` string, required
        - `field` string, required
        - `resource_type` string
        - `section` string
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/field-hydration-failure', required
      - ResourceUnavailableProblem
        - `detail` string, required
        - `resource_id` string
        - `resource_type` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/resource-unavailable', required
      - DisallowedResourceProblem
        - `detail` string, required
        - `resource_id` string
        - `resource_type` string
        - `section` string
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/disallowed-resource', required
      - RecipientNotMessageableProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/recipient-not-messageable', required
      - InternalErrorProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/internal-error', required
      - DmBadAttachmentProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-bad-attachment', required
      - DmBadCtaProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-bad-cta', required
      - DmBadCustomProfileProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-bad-custom-profile', required
      - DmBadMediaProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-bad-media', required
      - DmBadQuickReplyProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-bad-quick-reply', required
      - DmBadUrlProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-bad-url', required
      - DmConversationNameTooLongProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-conversation-name-too-long', required
      - DmConversationNotFoundProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-conversation-not-found', required
      - DmDuplicateProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-duplicate', required
      - DmInactiveDeviceProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-inactive-device', required
      - DmNotDeliveredProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-not-delivered', required
      - DmNotFoundProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-not-found', required
      - DmNotOwnerProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-not-owner', required
      - DmParticipantNotAddedProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-participant-not-added', required
      - DmParticipantNotFoundProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-participant-not-found', required
      - DmParticipantRestrictedProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-participant-restricted', required
      - DmParticipantUnavailableProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-participant-unavailable', required
      - DmRateLimitedProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-rate-limited', required
      - DmRecipientBlocksSenderProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-recipient-blocks-sender', required
      - DmRecipientCannotReceiveProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-recipient-cannot-receive', required
      - DmRecipientEncryptedUnavailableProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-recipient-encrypted-unavailable', required
      - DmRecipientNotAcceptingProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-recipient-not-accepting', required
      - DmRecipientNotFoundProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-recipient-not-found', required
      - DmRecipientRestrictsGroupsProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-recipient-restricts-groups', required
      - DmRecipientUnavailableProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-recipient-unavailable', required
      - DmRequestInProgressProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-request-in-progress', required
      - DmSafetyLimitedProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-safety-limited', required
      - DmSafetyRejectedProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-safety-rejected', required
      - DmSenderBlocksRecipientProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-sender-blocks-recipient', required
      - DmSenderDeclinedDmsProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-sender-declined-dms', required
      - DmSenderDmsClosedProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-sender-dms-closed', required
      - DmSenderEncryptedUnavailableProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-sender-encrypted-unavailable', required
      - DmSenderNotInConversationProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-sender-not-in-conversation', required
      - DmSenderNotPermittedProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-sender-not-permitted', required
      - DmSenderNotVerifiedProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-sender-not-verified', required
      - DmSenderPhoneRequiredProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-sender-phone-required', required
      - DmSenderReadOnlyProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-sender-read-only', required
      - DmSenderUnavailableProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-sender-unavailable', required
      - DmTextEmptyProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-text-empty', required
      - DmTextTooLongProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-text-too-long', required
      - DmTooFewParticipantsProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-too-few-participants', required
      - DmTooManyParticipantsProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-too-many-participants', required
      - DmUnsupportedMessageProblem
        - `detail` string, required
        - `status` integer
        - `title` string, required
        - `type` 'https://api.x.com/2/problems/dm-unsupported-message', required
      - DuplicateRuleProblem
        - `detail` string
        - `id` string
        - `title` string, required
        - `type` 'https://api.twitter.com/2/problems/duplicate-rules', required
        - `value` string, required
      - InvalidRuleProblem
        - `detail` string
        - `details` string[], required
        - `title` string, required
        - `type` 'https://api.twitter.com/2/problems/invalid-rules', required
        - `value` string

## Other responses

- `default`: The request has failed.

## Changes

- **2026-11-03** `2e1fefa37444`: 2 breaking, 2 info
  - added `#/components/schemas/DmBadAttachmentProblem, #/components/schemas/DmBadCtaProblem, #/components/schemas/DmBadCustomProfileProblem, #/components/schemas/DmBadMediaProblem, #/components/schemas/DmBadQuickReplyProblem, #/components/schemas/DmBadUrlProblem, #/components/schemas/DmConversationNameTooLongProblem, #/components/schemas/DmConversationNotFoundProblem, #/components/schemas/DmDuplicateProblem, #/components/schemas/DmInactiveDeviceProblem, #/components/schemas/DmNotDeliveredProblem, #/components/schemas/DmNotFoundProblem, #/components/schemas/DmNotOwnerProblem, #/components/schemas/DmParticipantNotAddedProblem, #/components/schemas/DmParticipantNotFoundProblem, #/components/schemas/DmParticipantRestrictedProblem, #/components/schemas/DmParticipantUnavailableProblem, #/components/schemas/DmRateLimitedProblem, #/components/schemas/DmRecipientBlocksSenderProblem, #/components/schemas/DmRecipientCannotReceiveProblem, #/components/schemas/DmRecipientEncryptedUnavailableProblem, #/components/schemas/DmRecipientNotAcceptingProblem, #/components/schemas/DmRecipientNotFoundProblem, #/components/schemas/DmRecipientRestrictsGroupsProblem, #/components/schemas/DmRecipientUnavailableProblem, #/components/schemas/DmRequestInProgressProblem, #/components/schemas/DmSafetyLimitedProblem, #/components/schemas/DmSafetyRejectedProblem, #/components/schemas/DmSenderBlocksRecipientProblem, #/components/schemas/DmSenderDeclinedDmsProblem, #/components/schemas/DmSenderDmsClosedProblem, #/components/schemas/DmSenderEncryptedUnavailableProblem, #/components/schemas/DmSenderNotInConversationProblem, #/components/schemas/DmSenderNotPermittedProblem, #/components/schemas/DmSenderNotVerifiedProblem, #/components/schemas/DmSenderPhoneRequiredProblem, #/components/schemas/DmSenderReadOnlyProblem, #/components/schemas/DmSenderUnavailableProblem, #/components/schemas/DmTextEmptyProblem, #/components/schemas/DmTextTooLongProblem, #/components/schemas/DmTooFewParticipantsProblem, #/components/schemas/DmTooManyParticipantsProblem, #/components/schemas/DmUnsupportedMessageProblem` to the response body `oneOf` list for the response status `default`
  - added `#/components/schemas/DmBadAttachmentProblem, #/components/schemas/DmBadCtaProblem, #/components/schemas/DmBadCustomProfileProblem, #/components/schemas/DmBadMediaProblem, #/components/schemas/DmBadQuickReplyProblem, #/components/schemas/DmBadUrlProblem, #/components/schemas/DmConversationNameTooLongProblem, #/components/schemas/DmConversationNotFoundProblem, #/components/schemas/DmDuplicateProblem, #/components/schemas/DmInactiveDeviceProblem, #/components/schemas/DmNotDeliveredProblem, #/components/schemas/DmNotFoundProblem, #/components/schemas/DmNotOwnerProblem, #/components/schemas/DmParticipantNotAddedProblem, #/components/schemas/DmParticipantNotFoundProblem, #/components/schemas/DmParticipantRestrictedProblem, #/components/schemas/DmParticipantUnavailableProblem, #/components/schemas/DmRateLimitedProblem, #/components/schemas/DmRecipientBlocksSenderProblem, #/components/schemas/DmRecipientCannotReceiveProblem, #/components/schemas/DmRecipientEncryptedUnavailableProblem, #/components/schemas/DmRecipientNotAcceptingProblem, #/components/schemas/DmRecipientNotFoundProblem, #/components/schemas/DmRecipientRestrictsGroupsProblem, #/components/schemas/DmRecipientUnavailableProblem, #/components/schemas/DmRequestInProgressProblem, #/components/schemas/DmSafetyLimitedProblem, #/components/schemas/DmSafetyRejectedProblem, #/components/schemas/DmSenderBlocksRecipientProblem, #/components/schemas/DmSenderDeclinedDmsProblem, #/components/schemas/DmSenderDmsClosedProblem, #/components/schemas/DmSenderEncryptedUnavailableProblem, #/components/schemas/DmSenderNotInConversationProblem, #/components/schemas/DmSenderNotPermittedProblem, #/components/schemas/DmSenderNotVerifiedProblem, #/components/schemas/DmSenderPhoneRequiredProblem, #/components/schemas/DmSenderReadOnlyProblem, #/components/schemas/DmSenderUnavailableProblem, #/components/schemas/DmTextEmptyProblem, #/components/schemas/DmTextTooLongProblem, #/components/schemas/DmTooFewParticipantsProblem, #/components/schemas/DmTooManyParticipantsProblem, #/components/schemas/DmUnsupportedMessageProblem` to the `errors/items/` response property `oneOf` list for the response status `200`
  - added `https://api.x.com/2/problems/dm-bad-attachment, https://api.x.com/2/problems/dm-bad-cta, https://api.x.com/2/problems/dm-bad-custom-profile, https://api.x.com/2/problems/dm-bad-media, https://api.x.com/2/problems/dm-bad-quick-reply, https://api.x.com/2/problems/dm-bad-url, https://api.x.com/2/problems/dm-conversation-name-too-long, https://api.x.com/2/problems/dm-conversation-not-found, https://api.x.com/2/problems/dm-duplicate, https://api.x.com/2/problems/dm-inactive-device, https://api.x.com/2/problems/dm-not-delivered, https://api.x.com/2/problems/dm-not-found, https://api.x.com/2/problems/dm-not-owner, https://api.x.com/2/problems/dm-participant-not-added, https://api.x.com/2/problems/dm-participant-not-found, https://api.x.com/2/problems/dm-participant-restricted, https://api.x.com/2/problems/dm-participant-unavailable, https://api.x.com/2/problems/dm-rate-limited, https://api.x.com/2/problems/dm-recipient-blocks-sender, https://api.x.com/2/problems/dm-recipient-cannot-receive, https://api.x.com/2/problems/dm-recipient-encrypted-unavailable, https://api.x.com/2/problems/dm-recipient-not-accepting, https://api.x.com/2/problems/dm-recipient-not-found, https://api.x.com/2/problems/dm-recipient-restricts-groups, https://api.x.com/2/problems/dm-recipient-unavailable, https://api.x.com/2/problems/dm-request-in-progress, https://api.x.com/2/problems/dm-safety-limited, https://api.x.com/2/problems/dm-safety-rejected, https://api.x.com/2/problems/dm-sender-blocks-recipient, https://api.x.com/2/problems/dm-sender-declined-dms, https://api.x.com/2/problems/dm-sender-dms-closed, https://api.x.com/2/problems/dm-sender-encrypted-unavailable, https://api.x.com/2/problems/dm-sender-not-in-conversation, https://api.x.com/2/problems/dm-sender-not-permitted, https://api.x.com/2/problems/dm-sender-not-verified, https://api.x.com/2/problems/dm-sender-phone-required, https://api.x.com/2/problems/dm-sender-read-only, https://api.x.com/2/problems/dm-sender-unavailable, https://api.x.com/2/problems/dm-text-empty, https://api.x.com/2/problems/dm-text-too-long, https://api.x.com/2/problems/dm-too-few-participants, https://api.x.com/2/problems/dm-too-many-participants, https://api.x.com/2/problems/dm-unsupported-message` mapping keys to the response discriminator for the response status `default`
  - added `https://api.x.com/2/problems/dm-bad-attachment, https://api.x.com/2/problems/dm-bad-cta, https://api.x.com/2/problems/dm-bad-custom-profile, https://api.x.com/2/problems/dm-bad-media, https://api.x.com/2/problems/dm-bad-quick-reply, https://api.x.com/2/problems/dm-bad-url, https://api.x.com/2/problems/dm-conversation-name-too-long, https://api.x.com/2/problems/dm-conversation-not-found, https://api.x.com/2/problems/dm-duplicate, https://api.x.com/2/problems/dm-inactive-device, https://api.x.com/2/problems/dm-not-delivered, https://api.x.com/2/problems/dm-not-found, https://api.x.com/2/problems/dm-not-owner, https://api.x.com/2/problems/dm-participant-not-added, https://api.x.com/2/problems/dm-participant-not-found, https://api.x.com/2/problems/dm-participant-restricted, https://api.x.com/2/problems/dm-participant-unavailable, https://api.x.com/2/problems/dm-rate-limited, https://api.x.com/2/problems/dm-recipient-blocks-sender, https://api.x.com/2/problems/dm-recipient-cannot-receive, https://api.x.com/2/problems/dm-recipient-encrypted-unavailable, https://api.x.com/2/problems/dm-recipient-not-accepting, https://api.x.com/2/problems/dm-recipient-not-found, https://api.x.com/2/problems/dm-recipient-restricts-groups, https://api.x.com/2/problems/dm-recipient-unavailable, https://api.x.com/2/problems/dm-request-in-progress, https://api.x.com/2/problems/dm-safety-limited, https://api.x.com/2/problems/dm-safety-rejected, https://api.x.com/2/problems/dm-sender-blocks-recipient, https://api.x.com/2/problems/dm-sender-declined-dms, https://api.x.com/2/problems/dm-sender-dms-closed, https://api.x.com/2/problems/dm-sender-encrypted-unavailable, https://api.x.com/2/problems/dm-sender-not-in-conversation, https://api.x.com/2/problems/dm-sender-not-permitted, https://api.x.com/2/problems/dm-sender-not-verified, https://api.x.com/2/problems/dm-sender-phone-required, https://api.x.com/2/problems/dm-sender-read-only, https://api.x.com/2/problems/dm-sender-unavailable, https://api.x.com/2/problems/dm-text-empty, https://api.x.com/2/problems/dm-text-too-long, https://api.x.com/2/problems/dm-too-few-participants, https://api.x.com/2/problems/dm-too-many-participants, https://api.x.com/2/problems/dm-unsupported-message` discriminator mapping keys to the `errors/items/` response property for the response status `200`
- …earlier changes not shown

[Operation history](https://skmtc.dev/x/apis/x-api-v2/changes/2/tweets/analytics/get.md)

---

[API](https://skmtc.dev/x/apis/x-api-v2.md) - [All operations](https://skmtc.dev/x/apis/x-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/x/apis/x-api-v2/revisions/2e1fefa37444?raw)
