Search for recent tweets.
Args: request (TweetsRequest): The request object containing search parameters. http_headers (ExposedDefaultHeaders): The HTTP headers.
Returns: dict: The response from the Twitter API containing the search results.
Request model for searching.
List of dot-notation field paths to include in the response. This is a post-processing filter that does not alter the data request nor the 3rd party response data.
How to use: Specify field paths using dot notation to include only those fields in the response. Supports nested fields (e.g., 'user.name', 'payload.headers'). When filtering lists, each item is filtered recursively. If a top-level field is specified without sub-fields, the entire value is included. If nested fields are specified, only those nested fields are included.
["id","name","status"]Filters to apply to response items. This is a post-processing filter that does not alter the data request nor the 3rd party response data.
How to use:
field_name: The field to filter on. Supports dot notation for nested fields (e.g., 'creator.age'). When filtering list items, this filters the items themselves. When usingroot, this filters elements within the array at therootpath.root: Optional path to an array of dictionaries. When set, filters the array elements at this path instead of filtering the items themselves. Use dot notation (e.g., 'payload.headers'). Important: Therootpath must target an array of dictionaries (the last array before filtering byfield_namevalue), andfield_nameshould be a field within those dictionary elements. In nested array structures,rootshould point to the final array of dictionaries that contain thefield_namefield. Otherwise no filtering will occur.
[{"field_name":"status","type":"string_list","values":["open","in_progress"]}]Search query string.
End time in ISO 8601 format.
Start time in ISO 8601 format.
Sort order for the results.
Language code for the results.
Number of results to return (10-100).
10List of tweet fields.
List of expansions.
List of media fields.
Get results with a Tweet ID greater than the specified ID.
Get results with a Tweet ID less than the specified ID.
Used to get the next page of results from the API.
Select specific place fields to include in the returned Tweet.
Select specific poll fields to include in the returned Tweet.
Select specific user fields to include in the returned Space or Tweet.
Successful Response
Validation Error
No content
Retrieve multiple tweets by their IDs.
Args: request (GetTweetsRequest): The request object containing a list of tweet IDs and optional fields. http_headers (ExposedDefaultHeaders): The HTTP headers.
Returns: dict: The response from the Twitter API containing the requested tweets.
Request model for retrieving multiple tweets by their IDs.
List of dot-notation field paths to include in the response. This is a post-processing filter that does not alter the data request nor the 3rd party response data.
How to use: Specify field paths using dot notation to include only those fields in the response. Supports nested fields (e.g., 'user.name', 'payload.headers'). When filtering lists, each item is filtered recursively. If a top-level field is specified without sub-fields, the entire value is included. If nested fields are specified, only those nested fields are included.
["id","name","status"]Filters to apply to response items. This is a post-processing filter that does not alter the data request nor the 3rd party response data.
How to use:
field_name: The field to filter on. Supports dot notation for nested fields (e.g., 'creator.age'). When filtering list items, this filters the items themselves. When usingroot, this filters elements within the array at therootpath.root: Optional path to an array of dictionaries. When set, filters the array elements at this path instead of filtering the items themselves. Use dot notation (e.g., 'payload.headers'). Important: Therootpath must target an array of dictionaries (the last array before filtering byfield_namevalue), andfield_nameshould be a field within those dictionary elements. In nested array structures,rootshould point to the final array of dictionaries that contain thefield_namefield. Otherwise no filtering will occur.
[{"field_name":"status","type":"string_list","values":["open","in_progress"]}]A list of tweet IDs to retrieve.
Optional list of expansions to include in the response.
Optional list of media fields to return.
Optional list of place fields to return.
Optional list of poll fields to return.
Optional list of tweet fields to return.
Optional list of user fields to return.
Successful Response
Validation Error
No content
Retrieve a thread of tweets based on the provided tweet ID.
Args: request (GetThreadRequest): The request object containing the tweet ID for the thread. http_headers (ExposedDefaultHeaders): The HTTP headers.
Returns: dict: The response from the Twitter API containing the tweets in the thread.
Request model for retrieving multiple tweets by their IDs.
List of dot-notation field paths to include in the response. This is a post-processing filter that does not alter the data request nor the 3rd party response data.
How to use: Specify field paths using dot notation to include only those fields in the response. Supports nested fields (e.g., 'user.name', 'payload.headers'). When filtering lists, each item is filtered recursively. If a top-level field is specified without sub-fields, the entire value is included. If nested fields are specified, only those nested fields are included.
["id","name","status"]Filters to apply to response items. This is a post-processing filter that does not alter the data request nor the 3rd party response data.
How to use:
field_name: The field to filter on. Supports dot notation for nested fields (e.g., 'creator.age'). When filtering list items, this filters the items themselves. When usingroot, this filters elements within the array at therootpath.root: Optional path to an array of dictionaries. When set, filters the array elements at this path instead of filtering the items themselves. Use dot notation (e.g., 'payload.headers'). Important: Therootpath must target an array of dictionaries (the last array before filtering byfield_namevalue), andfield_nameshould be a field within those dictionary elements. In nested array structures,rootshould point to the final array of dictionaries that contain thefield_namefield. Otherwise no filtering will occur.
[{"field_name":"status","type":"string_list","values":["open","in_progress"]}]The ID of the tweet conversation.
Successful Response
Validation Error
No content
This endpoint returns information about users. Specify users by ID(s) / username(s).
Args: request: The request object. http_headers (ExposedDefaultHeaders): The HTTP headers.
Note:
Only one of the four fields must be provided to successfully make a request.
If multiple fields are provided, the request will throw an error.
Request model for searching user by ID(s) / username(s).
This model allows the user to specify either user ID(s) or username(s) to retrieve user information(s). It enforces that at least one of the two fields must be provided to successfully make a request.
Note: - Only one of the four fields must be provided to successfully make a request. - If multiple fields are provided, the request will throw an error.
List of dot-notation field paths to include in the response. This is a post-processing filter that does not alter the data request nor the 3rd party response data.
How to use: Specify field paths using dot notation to include only those fields in the response. Supports nested fields (e.g., 'user.name', 'payload.headers'). When filtering lists, each item is filtered recursively. If a top-level field is specified without sub-fields, the entire value is included. If nested fields are specified, only those nested fields are included.
["id","name","status"]Filters to apply to response items. This is a post-processing filter that does not alter the data request nor the 3rd party response data.
How to use:
field_name: The field to filter on. Supports dot notation for nested fields (e.g., 'creator.age'). When filtering list items, this filters the items themselves. When usingroot, this filters elements within the array at therootpath.root: Optional path to an array of dictionaries. When set, filters the array elements at this path instead of filtering the items themselves. Use dot notation (e.g., 'payload.headers'). Important: Therootpath must target an array of dictionaries (the last array before filtering byfield_namevalue), andfield_nameshould be a field within those dictionary elements. In nested array structures,rootshould point to the final array of dictionaries that contain thefield_namefield. Otherwise no filtering will occur.
[{"field_name":"status","type":"string_list","values":["open","in_progress"]}]User ID to retrieve; must be provided if username is absent.
User IDs to retrieve; must be provided if usernames are absent.
Username to retrieve; must be provided if id is absent.
Usernames to retrieve; must be provided if IDs are absent.
A comma separated list of User fields to display.
A comma separated list of fields to expand.
A comma separated list of Tweet fields to display.
Successful Response
Validation Error
No content
Last updated