search
or sample
), a delivery verb which helps to determine how the data will deliver (e.g., stream
), or other resources that have a relationship with the primary resource (e.g., /user/12/tweets
). Finally, you can append a query parameter to the end if the endpoint includes any query parameters.
Here are some examples of how these path and query items could be organized:
/version/resource/id?param1=value¶m2=value /version/resource/delivery/selection?param1=value¶m2=value
Examples of actual requests:
/2/tweets/1067094924124872705?expansions=attachments.media_keys&tweet.fields=author_id /2/users/2244994945?user.fields=created_at,description /2/tweets/search/stream /2/tweets/search/recent?query=snow
id
objects are always strings.entities
object only contains entities sourced from the Post text: this includes urls
, hashtags
, mentions
, and cashtags
.media_keys
and poll_ids
fields, are returned in the attachments
object.author_id
, entities
):
fields
parameter is used to request the fields desired. Fields will remain consistent across endpoints. The Post object will return the same fields across all endpoints where the Post object is returned. The same set of fields can be queried across similar endpoints.
For example, the same Post fields can be queried in the Posts lookup and for the expanded pinned Post in the Users lookup.
*_id
, such as author_id
). Expansions are also available for all fields that have an id that is not the top-level identifier of the current object. For example, in the Posts lookup, the Post is the current object with field id
as the top-level identifier. The author_id
or referenced_tweets.id
fields are available to expand into complete user or Post objects by adding these comma-separated values to the expansions
parameter.
Please report any inconsistencies that you notice, related to these fields.