Introduction

Across the Twitter API endpoints, there are a variety of objects available to request such as Tweets, users, media, places, and polls. There is a top-level resource in each endpoint, such as Tweets in recent search and filtered stream, and users in user lookup. Additional objects relevant to the top-level resource, such as media, place, poll, author (user) in the Tweet, and pinned-Tweet for the user are available to include in the same payload with expansions. To retrieve a complete Tweet or user, use a combination of fields and expansions query parameters.
 

What's new in Twitter API v2

  • Condensed default Tweet and user objects
  • A fields query parameter to request desired object fields
  • Poll, place, media metadata available to request within the Tweet payload
  • Metrics and annotations available in the Tweet payload
  • A new conversation_id field to help you track Tweets included in a conversation
     

The default Tweet object that is delivered with our endpoints is limited to just the id and text fields.
 

{
    "data": {
        "id": "1212092627178287104",
        "text": "These launches would not be possible without the feedback you provided along the way, so THANK YOU to everyone who has contributed your time and ideas. Have more feedback? Let us know ⬇️ https://t.co/Vxp4UKnuJ9"
    }
}

 

The default user object returned in our endpoints only contains the id, name, and username fields.

 

{
    "data": {
        "id": "2244994945",
        "name": "Twitter Dev",
        "username": "TwitterDev"
    }
}

 

This data dictionary will serve as a reference for all top-level fields available to request in each object.

Was this document helpful?

Thank you for the feedback. We’re really glad we could help!

Thank you for the feedback. How could we improve this document?

Thank you for the feedback. Your comments will help us improve our documents in the future.