---
title: "Twitter Search Timeline API (V1)"
description: "Searches X (Twitter) by keyword across top, latest, media, people, or list result modes with cursor pagination. Use it to find public conversations, accounts, media, or lists related to a topic."
aiUsagePrompt: true
---

# Twitter Search Timeline API \(V1\)

<ApiTester
  method="GET"
  :path='JSON.parse("\"/api/twitter/search/v1\"")'
  :summary='JSON.parse("\"Search Timeline (V1)\"")'
  openapiDefinitionUrl="https://docs.justoneapi.com/openapi/twitter/search-timeline-v1-en.json"
  openapiVersion="3.1.0"
  :parameters='JSON.parse("[{\"name\":\"token\",\"in\":\"query\",\"description\":\"Authentication token required for API access.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"keyword\",\"in\":\"query\",\"description\":\"Search keyword.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"searchType\",\"in\":\"query\",\"description\":\"Search result type.\\n\\nAvailable Values:\\n- `TOP`: Top search results\\n- `LATEST`: Latest search results\\n- `MEDIA`: Media search results\\n- `PEOPLE`: People search results\\n- `LISTS`: List search results\",\"required\":false,\"schema\":{\"type\":\"string\",\"default\":\"Top\",\"description\":\"Twitter search type\",\"enum\":[\"TOP\",\"LATEST\",\"MEDIA\",\"PEOPLE\",\"LISTS\"]}},{\"name\":\"cursor\",\"in\":\"query\",\"description\":\"Pagination cursor returned by the previous response.\",\"required\":false,\"schema\":{\"type\":\"string\",\"default\":\"\"}}]")'
  :requestBody='JSON.parse("null")'
  :responses='JSON.parse("{\"200\":{\"description\":\"OK\",\"content\":{\"application/json\":{\"schema\":{\"if\":{\"properties\":{\"code\":{\"const\":0}},\"required\":[\"code\"]},\"then\":{\"properties\":{\"data\":{\"type\":\"object\",\"description\":\"One page of X search results with pagination cursors.\",\"properties\":{\"status\":{\"type\":\"string\",\"description\":\"Status text reported for the search response.\"},\"next_cursor\":{\"type\":\"string\",\"description\":\"Opaque cursor for requesting the next page. Pass it unchanged as cursor with the same keyword and searchType. A cursor can be present on an empty page.\"},\"prev_cursor\":{\"type\":\"string\",\"description\":\"Opaque cursor supplied for the preceding page. A cursor can be present on an empty page.\"},\"timeline\":{\"type\":\"array\",\"description\":\"Entries returned for this search page. Read each entry&#39;s type to identify what it contains. PEOPLE and LISTS searches can also return posts, and a search can return an empty array.\",\"items\":{\"type\":\"object\",\"description\":\"One entry in the search results.\",\"properties\":{\"type\":{\"type\":\"string\",\"description\":\"Entry type label returned in the search results.\"},\"screen_name\":{\"type\":\"string\",\"description\":\"Public X username attached to the search result.\"},\"source\":{\"type\":[\"string\",\"null\"],\"description\":\"Posting client or source label as returned by X, when available.\"},\"display_text_range\":{\"type\":\"array\",\"description\":\"Offsets for the visible portion of the post text, in the original X format.\",\"items\":{\"type\":\"integer\",\"description\":\"One offset in the post&#39;s display text range.\"}},\"user_info\":{\"type\":\"object\",\"description\":\"Profile information for the user shown on the search result.\",\"properties\":{\"rest_id\":{\"type\":\"string\",\"description\":\"X account ID represented as text.\"},\"screen_name\":{\"type\":\"string\",\"description\":\"Public X username of the account.\"},\"name\":{\"type\":\"string\",\"description\":\"Display name of the account.\"},\"created_at\":{\"type\":\"string\",\"description\":\"Account creation time in X&#39;s original timestamp format.\"},\"avatar\":{\"type\":\"string\",\"description\":\"Address of the account&#39;s avatar image.\"},\"verified\":{\"type\":\"boolean\",\"description\":\"Verification flag reported for the account.\"},\"verified_type\":{\"type\":[\"string\",\"null\"],\"description\":\"Verification category reported for the account, when available.\"},\"followers_count\":{\"type\":\"integer\",\"description\":\"Follower count reported for the account.\"},\"favorites_count\":{\"type\":\"integer\",\"description\":\"Number of posts liked by the account, as reported by X.\"},\"location\":{\"type\":[\"string\",\"null\"],\"description\":\"Public profile location text, when provided.\"}}},\"entities\":{\"type\":\"object\",\"description\":\"References attached to the post text and media, such as hashtags, mentions, and URLs.\",\"properties\":{\"hashtags\":{\"type\":\"array\",\"description\":\"Hashtags referenced in the post text.\",\"items\":{\"type\":\"object\",\"description\":\"One hashtag reference in the post text.\",\"properties\":{\"text\":{\"type\":\"string\",\"description\":\"Hashtag text supplied for the reference.\"},\"indices\":{\"type\":\"array\",\"description\":\"Text offsets associated with this entity, in the original X format.\",\"items\":{\"type\":\"integer\",\"description\":\"One text offset associated with the entity.\"}}}}},\"symbols\":{\"type\":\"array\",\"description\":\"Cashtag symbols referenced in the post text.\",\"items\":{\"type\":\"object\",\"description\":\"One cashtag reference in the post text.\",\"properties\":{\"text\":{\"type\":\"string\",\"description\":\"Text of the cashtag reference.\"},\"indices\":{\"type\":\"array\",\"description\":\"Text offsets associated with this entity, in the original X format.\",\"items\":{\"type\":\"integer\",\"description\":\"One text offset associated with the entity.\"}}}}},\"user_mentions\":{\"type\":\"array\",\"description\":\"Account mentions referenced in the post text.\",\"items\":{\"type\":\"object\",\"description\":\"One account mention in the post text.\",\"properties\":{\"id_str\":{\"type\":\"string\",\"description\":\"Mentioned X account ID represented as text.\"},\"name\":{\"type\":\"string\",\"description\":\"Display name of the mentioned account.\"},\"screen_name\":{\"type\":\"string\",\"description\":\"Public X username of the mentioned account.\"},\"indices\":{\"type\":\"array\",\"description\":\"Text offsets associated with this entity, in the original X format.\",\"items\":{\"type\":\"integer\",\"description\":\"One text offset associated with the entity.\"}}}}},\"urls\":{\"type\":\"array\",\"description\":\"Links referenced by the post.\",\"items\":{\"type\":\"object\",\"description\":\"One link referenced by the post.\",\"properties\":{\"url\":{\"type\":\"string\",\"description\":\"URL present in the post entity.\"},\"expanded_url\":{\"type\":\"string\",\"description\":\"Expanded address for the link when supplied.\"},\"display_url\":{\"type\":\"string\",\"description\":\"Display text for the link.\"},\"indices\":{\"type\":\"array\",\"description\":\"Text offsets associated with this entity, in the original X format.\",\"items\":{\"type\":\"integer\",\"description\":\"One text offset associated with the entity.\"}}}}},\"media\":{\"type\":\"array\",\"description\":\"Media entities referenced by the post.\",\"items\":{\"type\":\"object\",\"description\":\"One media entity referenced by the post.\",\"properties\":{\"id_str\":{\"type\":\"string\",\"description\":\"Media entity ID represented as text.\"},\"type\":{\"type\":\"string\",\"description\":\"Media type label reported by X.\"},\"media_url_https\":{\"type\":\"string\",\"description\":\"HTTPS image address attached to the media entity.\"},\"url\":{\"type\":\"string\",\"description\":\"URL for the media entity in the post.\"},\"display_url\":{\"type\":\"string\",\"description\":\"Display text for the media link.\"},\"expanded_url\":{\"type\":\"string\",\"description\":\"Expanded address for the media link when supplied.\"},\"ext_alt_text\":{\"type\":\"string\",\"description\":\"Alternative text supplied for the media.\"},\"source_status_id_str\":{\"type\":\"string\",\"description\":\"ID of the source post for this media, represented as text.\"},\"source_user_id_str\":{\"type\":\"string\",\"description\":\"ID of the source account for this media, represented as text.\"},\"ext_media_availability\":{\"type\":\"object\",\"description\":\"Media availability details, when supplied.\",\"properties\":{\"status\":{\"type\":\"string\",\"description\":\"Availability status label returned for the media.\"}}},\"allow_download_status\":{\"type\":[\"array\",\"object\"],\"description\":\"Download availability details for the media. This field can also be an empty array.\",\"properties\":{\"allow_download\":{\"type\":\"boolean\",\"description\":\"Whether downloading is marked as allowed.\"}}},\"additional_media_info\":{\"type\":\"object\",\"description\":\"Additional descriptive metadata for the media, when supplied.\",\"properties\":{\"title\":{\"type\":\"string\",\"description\":\"Title supplied for the media.\"},\"description\":{\"type\":\"string\",\"description\":\"Description supplied for the media.\"},\"embeddable\":{\"type\":\"boolean\",\"description\":\"Whether embedding is marked as allowed.\"},\"monetizable\":{\"type\":\"boolean\",\"description\":\"Whether the media is marked as eligible for monetization.\"}}},\"original_info\":{\"type\":\"object\",\"description\":\"Original media dimensions, when supplied.\",\"properties\":{\"width\":{\"type\":\"integer\",\"description\":\"Original media width in pixels.\"},\"height\":{\"type\":\"integer\",\"description\":\"Original media height in pixels.\"}}},\"sizes\":{\"type\":\"object\",\"description\":\"Available image sizes reported for the media entity.\",\"properties\":{\"large\":{\"type\":\"object\",\"description\":\"Large image dimensions.\",\"properties\":{\"w\":{\"type\":\"integer\",\"description\":\"Image width in pixels.\"},\"h\":{\"type\":\"integer\",\"description\":\"Image height in pixels.\"},\"resize\":{\"type\":\"string\",\"description\":\"Resize method label reported for this image size.\"}}},\"medium\":{\"type\":\"object\",\"description\":\"Medium image dimensions.\",\"properties\":{\"w\":{\"type\":\"integer\",\"description\":\"Image width in pixels.\"},\"h\":{\"type\":\"integer\",\"description\":\"Image height in pixels.\"},\"resize\":{\"type\":\"string\",\"description\":\"Resize method label reported for this image size.\"}}},\"small\":{\"type\":\"object\",\"description\":\"Small image dimensions.\",\"properties\":{\"w\":{\"type\":\"integer\",\"description\":\"Image width in pixels.\"},\"h\":{\"type\":\"integer\",\"description\":\"Image height in pixels.\"},\"resize\":{\"type\":\"string\",\"description\":\"Resize method label reported for this image size.\"}}},\"thumb\":{\"type\":\"object\",\"description\":\"Thumbnail image dimensions.\",\"properties\":{\"w\":{\"type\":\"integer\",\"description\":\"Image width in pixels.\"},\"h\":{\"type\":\"integer\",\"description\":\"Image height in pixels.\"},\"resize\":{\"type\":\"string\",\"description\":\"Resize method label reported for this image size.\"}}}}},\"video_info\":{\"type\":\"object\",\"description\":\"Video-specific metadata for the media entity.\",\"properties\":{\"duration_millis\":{\"type\":\"integer\",\"description\":\"Video duration in milliseconds.\"},\"aspect_ratio\":{\"type\":\"array\",\"description\":\"Video aspect ratio reported as width and height proportions.\",\"items\":{\"type\":\"integer\",\"description\":\"One value in the width and height ratio.\"}},\"variants\":{\"type\":\"array\",\"description\":\"Playback variants reported for the media entity.\",\"items\":{\"type\":\"object\",\"description\":\"One playback variant.\",\"properties\":{\"content_type\":{\"type\":\"string\",\"description\":\"Media type of the playback variant.\"},\"bitrate\":{\"type\":\"integer\",\"description\":\"Reported bitrate for this playback variant.\"},\"url\":{\"type\":\"string\",\"description\":\"Playback address for this variant.\"}}}}}},\"indices\":{\"type\":\"array\",\"description\":\"Text offsets associated with this entity, in the original X format.\",\"items\":{\"type\":\"integer\",\"description\":\"One text offset associated with the entity.\"}}}}}}},\"quoted\":{\"type\":\"object\",\"description\":\"Details of the post quoted by this result, when available.\",\"properties\":{\"tweet_id\":{\"type\":\"string\",\"description\":\"X post ID represented as text.\"},\"conversation_id\":{\"type\":\"string\",\"description\":\"ID of the post&#39;s conversation, represented as text when supplied.\"},\"created_at\":{\"type\":\"string\",\"description\":\"Post publication time in X&#39;s original timestamp format.\"},\"text\":{\"type\":\"string\",\"description\":\"Post text returned by X.\"},\"lang\":{\"type\":\"string\",\"description\":\"Language code supplied for the post.\"},\"views\":{\"type\":\"string\",\"description\":\"Reported view count as numeric text when available.\"},\"favorites\":{\"type\":\"integer\",\"description\":\"Like count reported for the post.\"},\"bookmarks\":{\"type\":\"integer\",\"description\":\"Bookmark count reported for the post.\"},\"replies\":{\"type\":\"integer\",\"description\":\"Reply count reported for the post.\"},\"retweets\":{\"type\":\"integer\",\"description\":\"Repost count reported for the post.\"},\"quotes\":{\"type\":\"integer\",\"description\":\"Quote count reported for the post.\"},\"sensitive\":{\"type\":[\"boolean\",\"null\"],\"description\":\"Sensitive-content flag when supplied.\"},\"media\":{\"type\":[\"array\",\"object\"],\"description\":\"Media attached to the post. It can be an object with media lists or an empty array.\",\"properties\":{\"photo\":{\"type\":\"array\",\"description\":\"Photo attachments for the post.\",\"items\":{\"type\":\"object\",\"description\":\"One photo attachment on the post.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Photo ID represented as text.\"},\"media_url_https\":{\"type\":\"string\",\"description\":\"HTTPS address supplied for the photo.\"},\"sizes\":{\"type\":\"object\",\"description\":\"Dimensions reported for the photo.\",\"properties\":{\"w\":{\"type\":\"integer\",\"description\":\"Photo width in pixels.\"},\"h\":{\"type\":\"integer\",\"description\":\"Photo height in pixels.\"}}}}}},\"video\":{\"type\":\"array\",\"description\":\"Video attachments for the post.\",\"items\":{\"type\":\"object\",\"description\":\"One video attachment on the post.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Video ID represented as text.\"},\"media_url_https\":{\"type\":\"string\",\"description\":\"HTTPS preview image address supplied for the video.\"},\"duration\":{\"type\":\"integer\",\"description\":\"Video duration in milliseconds when available.\"},\"aspect_ratio\":{\"type\":\"array\",\"description\":\"Aspect ratio reported as width and height proportions.\",\"items\":{\"type\":\"integer\",\"description\":\"One value in the width and height ratio.\"}},\"original_info\":{\"type\":\"object\",\"description\":\"Original video dimensions reported for the media.\",\"properties\":{\"width\":{\"type\":\"integer\",\"description\":\"Original video width in pixels.\"},\"height\":{\"type\":\"integer\",\"description\":\"Original video height in pixels.\"}}},\"variants\":{\"type\":\"array\",\"description\":\"Available playback variants for the video.\",\"items\":{\"type\":\"object\",\"description\":\"One playback variant.\",\"properties\":{\"content_type\":{\"type\":\"string\",\"description\":\"Media type of the playback variant.\"},\"bitrate\":{\"type\":\"integer\",\"description\":\"Reported bitrate for this playback variant.\"},\"url\":{\"type\":\"string\",\"description\":\"Playback address for this variant.\"}}}}}}}}},\"author\":{\"type\":\"object\",\"description\":\"Profile information for the author of this post.\",\"properties\":{\"rest_id\":{\"type\":\"string\",\"description\":\"X account ID represented as text.\"},\"screen_name\":{\"type\":\"string\",\"description\":\"Public X username of the account.\"},\"name\":{\"type\":\"string\",\"description\":\"Display name of the account.\"},\"created_at\":{\"type\":\"string\",\"description\":\"Account creation time in X&#39;s original timestamp format.\"},\"avatar\":{\"type\":\"string\",\"description\":\"Address of the account&#39;s avatar image.\"},\"blue_verified\":{\"type\":\"boolean\",\"description\":\"Whether the response marks the account as blue verified.\"}}}}},\"retweeted\":{\"type\":\"object\",\"description\":\"Reference to the original post attached to a repost.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"X post ID of the reposted original, represented as text.\"}}},\"retweeted_tweet\":{\"type\":\"object\",\"description\":\"Details of the original post attached to a repost, when available.\",\"properties\":{\"tweet_id\":{\"type\":\"string\",\"description\":\"X post ID represented as text.\"},\"conversation_id\":{\"type\":\"string\",\"description\":\"ID of the post&#39;s conversation, represented as text when supplied.\"},\"created_at\":{\"type\":\"string\",\"description\":\"Post publication time in X&#39;s original timestamp format.\"},\"text\":{\"type\":\"string\",\"description\":\"Post text returned by X.\"},\"lang\":{\"type\":\"string\",\"description\":\"Language code supplied for the post.\"},\"favorites\":{\"type\":\"integer\",\"description\":\"Like count reported for the post.\"},\"bookmarks\":{\"type\":\"integer\",\"description\":\"Bookmark count reported for the post.\"},\"replies\":{\"type\":\"integer\",\"description\":\"Reply count reported for the post.\"},\"retweets\":{\"type\":\"integer\",\"description\":\"Repost count reported for the post.\"},\"quotes\":{\"type\":\"integer\",\"description\":\"Quote count reported for the post.\"},\"sensitive\":{\"type\":[\"boolean\",\"null\"],\"description\":\"Sensitive-content flag when supplied.\"},\"media\":{\"type\":[\"array\",\"object\"],\"description\":\"Media attached to the post. It can be an object with media lists or an empty array.\",\"properties\":{\"photo\":{\"type\":\"array\",\"description\":\"Photo attachments for the post.\",\"items\":{\"type\":\"object\",\"description\":\"One photo attachment on the post.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Photo ID represented as text.\"},\"media_url_https\":{\"type\":\"string\",\"description\":\"HTTPS address supplied for the photo.\"}}}},\"video\":{\"type\":\"array\",\"description\":\"Video attachments for the post.\",\"items\":{\"type\":\"object\",\"description\":\"One video attachment on the post.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Video ID represented as text.\"},\"media_url_https\":{\"type\":\"string\",\"description\":\"HTTPS preview image address supplied for the video.\"},\"duration\":{\"type\":\"integer\",\"description\":\"Video duration in milliseconds when available.\"},\"aspect_ratio\":{\"type\":\"array\",\"description\":\"Aspect ratio reported as width and height proportions.\",\"items\":{\"type\":\"integer\",\"description\":\"One value in the width and height ratio.\"}},\"original_info\":{\"type\":\"object\",\"description\":\"Original video dimensions reported for the media.\",\"properties\":{\"width\":{\"type\":\"integer\",\"description\":\"Original video width in pixels.\"},\"height\":{\"type\":\"integer\",\"description\":\"Original video height in pixels.\"}}},\"variants\":{\"type\":\"array\",\"description\":\"Available playback variants for the video.\",\"items\":{\"type\":\"object\",\"description\":\"One playback variant.\",\"properties\":{\"content_type\":{\"type\":\"string\",\"description\":\"Media type of the playback variant.\"},\"bitrate\":{\"type\":\"integer\",\"description\":\"Reported bitrate for this playback variant.\"},\"url\":{\"type\":\"string\",\"description\":\"Playback address for this variant.\"}}}}}}}}},\"author\":{\"type\":\"object\",\"description\":\"Profile information for the author of this post.\",\"properties\":{\"rest_id\":{\"type\":\"string\",\"description\":\"X account ID represented as text.\"},\"screen_name\":{\"type\":\"string\",\"description\":\"Public X username of the account.\"},\"name\":{\"type\":\"string\",\"description\":\"Display name of the account.\"},\"avatar\":{\"type\":\"string\",\"description\":\"Address of the account&#39;s avatar image.\"},\"blue_verified\":{\"type\":\"boolean\",\"description\":\"Whether the response marks the account as blue verified.\"}}}}},\"place\":{\"type\":\"object\",\"description\":\"Place label attached to the post, when available.\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"Place name reported by X.\"},\"full_name\":{\"type\":\"string\",\"description\":\"Full display name of the place.\"},\"country\":{\"type\":\"string\",\"description\":\"Country name supplied for the place.\"},\"country_code\":{\"type\":\"string\",\"description\":\"Country code supplied for the place.\"},\"place_type\":{\"type\":\"string\",\"description\":\"Type label associated with the place.\"}}},\"tweet_id\":{\"type\":\"string\",\"description\":\"X post ID represented as text.\"},\"conversation_id\":{\"type\":[\"string\",\"null\"],\"description\":\"ID of the post&#39;s conversation, represented as text when supplied.\"},\"created_at\":{\"type\":\"string\",\"description\":\"Post publication time in X&#39;s original timestamp format.\"},\"text\":{\"type\":\"string\",\"description\":\"Post text returned by X.\"},\"lang\":{\"type\":\"string\",\"description\":\"Language code supplied for the post.\"},\"views\":{\"type\":[\"string\",\"null\"],\"description\":\"Reported view count as numeric text when available.\"},\"favorites\":{\"type\":\"integer\",\"description\":\"Like count reported for the post.\"},\"bookmarks\":{\"type\":\"integer\",\"description\":\"Bookmark count reported for the post.\"},\"replies\":{\"type\":\"integer\",\"description\":\"Reply count reported for the post.\"},\"retweets\":{\"type\":\"integer\",\"description\":\"Repost count reported for the post.\"},\"quotes\":{\"type\":\"integer\",\"description\":\"Quote count reported for the post.\"},\"sensitive\":{\"type\":[\"boolean\",\"null\"],\"description\":\"Sensitive-content flag when supplied.\"},\"media\":{\"type\":[\"array\",\"object\"],\"description\":\"Media attached to the post. It can be an object with media lists or an empty array.\",\"properties\":{\"photo\":{\"type\":\"array\",\"description\":\"Photo attachments for the post.\",\"items\":{\"type\":\"object\",\"description\":\"One photo attachment on the post.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Photo ID represented as text.\"},\"media_url_https\":{\"type\":\"string\",\"description\":\"HTTPS address supplied for the photo.\"},\"sizes\":{\"type\":\"object\",\"description\":\"Dimensions reported for the photo.\",\"properties\":{\"w\":{\"type\":\"integer\",\"description\":\"Photo width in pixels.\"},\"h\":{\"type\":\"integer\",\"description\":\"Photo height in pixels.\"}}}}}},\"video\":{\"type\":\"array\",\"description\":\"Video attachments for the post.\",\"items\":{\"type\":\"object\",\"description\":\"One video attachment on the post.\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Video ID represented as text.\"},\"media_url_https\":{\"type\":\"string\",\"description\":\"HTTPS preview image address supplied for the video.\"},\"duration\":{\"type\":[\"integer\",\"null\"],\"description\":\"Video duration in milliseconds when available.\"},\"aspect_ratio\":{\"type\":\"array\",\"description\":\"Aspect ratio reported as width and height proportions.\",\"items\":{\"type\":\"integer\",\"description\":\"One value in the width and height ratio.\"}},\"original_info\":{\"type\":\"object\",\"description\":\"Original video dimensions reported for the media.\",\"properties\":{\"width\":{\"type\":\"integer\",\"description\":\"Original video width in pixels.\"},\"height\":{\"type\":\"integer\",\"description\":\"Original video height in pixels.\"}}},\"variants\":{\"type\":\"array\",\"description\":\"Available playback variants for the video.\",\"items\":{\"type\":\"object\",\"description\":\"One playback variant.\",\"properties\":{\"content_type\":{\"type\":\"string\",\"description\":\"Media type of the playback variant.\"},\"bitrate\":{\"type\":\"integer\",\"description\":\"Reported bitrate for this playback variant.\"},\"url\":{\"type\":\"string\",\"description\":\"Playback address for this variant.\"}}}}}}}}}}}}}}}},\"allOf\":[{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}]}}}},\"400\":{\"description\":\"Invalid request parameters or body\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"401\":{\"description\":\"Invalid or inactive access token\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"403\":{\"description\":\"Permission denied\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"429\":{\"description\":\"Request rate or daily quota limit exceeded\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"500\":{\"description\":\"Internal server error\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"503\":{\"description\":\"Service temporarily unavailable\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}}}")'
  :servers='JSON.parse("[{\"url\":\"https://api.justoneapi.com\",\"description\":\"Global production API (default)\"}]")'
  :security='JSON.parse("[]")'
  :securitySchemes='JSON.parse("{}")'
  :schemas='JSON.parse("{}")'
/>

<ApiHealthSection :api='JSON.parse("\"/api/twitter/search/v1\"")' />

<p>Searches X (Twitter) by keyword across top, latest, media, people, or list result modes with cursor pagination. Use it to find public conversations, accounts, media, or lists related to a topic.</p>

## Parameters

<div class="api-doc-table api-doc-table--params">

| Name | In | Type | Required | Default | Description |
| --- | --- | --- | --- | --- | --- |
| <code>token</code> | query | <code>string</code> | Yes | - | Authentication token required for API access. |
| <code>keyword</code> | query | <code>string</code> | Yes | - | Search keyword. |
| <code>searchType</code> | query | <code>string</code> | No | <code>Top</code> | Search result type.<br /><br><br>Available Values:<br /><br>- <code>TOP</code>: Top search results<br /><br>- <code>LATEST</code>: Latest search results<br /><br>- <code>MEDIA</code>: Media search results<br /><br>- <code>PEOPLE</code>: People search results<br /><br>- <code>LISTS</code>: List search results |
| <code>cursor</code> | query | <code>string</code> | No | <code></code> | Pagination cursor returned by the previous response. |

</div>

## Code Samples

::: code-group

```bash [🐚 cURL]
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/twitter/search/v1?token=YOUR_API_KEY&keyword=VALUE'
```

```text [🤖 AI Prompt]
I want to use the "Search Timeline (V1)" API from JustOneAPI.
Base URL: https://api.justoneapi.com.
API Path: /api/twitter/search/v1?token=YOUR_API_KEY&keyword=VALUE
API Endpoint: BASE_URL + /api/twitter/search/v1?token=YOUR_API_KEY&keyword=VALUE
HTTP Method: GET
Authentication: Append the "token" query parameter to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/twitter/search-timeline-v1-en.json

Parameters:
- token (query): Authentication token required for API access. (Required)
- keyword (query): Search keyword. (Required)
- searchType (query): Search result type.

Available Values:
- `TOP`: Top search results
- `LATEST`: Latest search results
- `MEDIA`: Media search results
- `PEOPLE`: People search results
- `LISTS`: List search results
- cursor (query): Pagination cursor returned by the previous response.

Return format: safely handle JSON or text according to the actual Content-Type.

Response Handling & Error Codes:
1. Business results should be determined by the "code" field in the response body (code 0 means success).
2. Timeout Recommendation: Set the request timeout to 120 seconds. If 120 seconds is too long for your use case, use at least 60 seconds, but a small number of requests may time out before receiving a result.
3. Business Code Reference:
   - 0: Success
   - 100: Invalid or Inactive Token
   - 301: Collection Failed. Please Retry.
   - 302: Rate Limit Exceeded
   - 303: Daily Quota Exceeded
   - 400: Invalid Parameters
   - 500: Internal Server Error
   - 600: Permission Denied
   - 601: Insufficient Balance
   - 602: Token Budget Exceeded
4. Code 601 means the shared account balance is insufficient. Code 602 means the current API token's own cumulative budget limit has been reached. Token budget limits do not transfer funds out of the shared account balance.

Please help me write a script in my preferred programming language to call this API and handle the response.
```

```python [🐍 Python]
import requests

BASE_URL = "https://api.justoneapi.com"  # Provided by OpenAPI servers

url = BASE_URL + "/api/twitter/search/v1?token=YOUR_API_KEY&keyword=VALUE"
response = requests.get(url, timeout=120)
print(response.status_code)
if response.content:
    content_type = response.headers.get("content-type", "").lower()
    if "json" in content_type:
        try:
            print(response.json())
        except ValueError:
            print(response.text)
    elif content_type.startswith("text/") or "xml" in content_type or content_type.split(";", 1)[0].strip() in {"application/javascript", "application/x-www-form-urlencoded", "application/graphql"}:
        print(response.text)
    else:
        with open("response.bin", "wb") as output:
            output.write(response.content)
        print(f"Saved {len(response.content)} bytes to response.bin")
```

```js [🌐 JavaScript]
const BASE_URL = "https://api.justoneapi.com"; // Provided by OpenAPI servers
const url = BASE_URL + "/api/twitter/search/v1?token=YOUR_API_KEY&keyword=VALUE";

const response = await fetch(url, {
  method: "GET",
  signal: AbortSignal.timeout(120000)
});
console.log(response.status);
const responseBytes = await response.arrayBuffer();
if (responseBytes.byteLength) {
  const contentType = (response.headers.get("content-type") || "").toLowerCase();
  const mediaType = contentType.split(";", 1)[0].trim();
  const textual = contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("xml") || ["application/javascript", "application/x-www-form-urlencoded", "application/graphql"].includes(mediaType);
  if (textual) {
    const responseText = new TextDecoder().decode(responseBytes);
    let data = responseText;
    if (contentType.includes("json")) {
      try { data = JSON.parse(responseText); } catch { /* Keep the raw body. */ }
    }
    console.log(data);
  } else {
    console.log(`Received ${responseBytes.byteLength} binary bytes`);
  }
}
```

```java [☕ Java]
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;

public class Main {
    public static void main(String[] args) throws Exception {
        final String BASE_URL = "https://api.justoneapi.com"; // Provided by OpenAPI servers
        final String url = BASE_URL + "/api/twitter/search/v1?token=YOUR_API_KEY&keyword=VALUE";

        HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(120)).build();
        HttpRequest.Builder builder = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .timeout(Duration.ofSeconds(120))
            .method("GET", HttpRequest.BodyPublishers.noBody());

        HttpRequest request = builder.build();

        HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray());
        System.out.println(response.statusCode());
        String contentType = response.headers().firstValue("content-type").orElse("").toLowerCase();
        String mediaType = contentType.split(";", 2)[0].trim();
        if (contentType.startsWith("text/") || contentType.contains("json") || contentType.contains("xml") || mediaType.equals("application/javascript") || mediaType.equals("application/x-www-form-urlencoded") || mediaType.equals("application/graphql")) {
            System.out.println(new String(response.body(), StandardCharsets.UTF_8));
        } else {
            Files.write(Path.of("response.bin"), response.body());
            System.out.println("Saved " + response.body().length + " bytes to response.bin");
        }
    }
}
```

```go [🐹 Go]
package main

import (
	"fmt"
	"io"
	"os"
	"strings"
	"net/http"
	"time"
)

const BASE_URL = "https://api.justoneapi.com" // Provided by OpenAPI servers

func main() {
	client := &http.Client{Timeout: 120 * time.Second}
	url := BASE_URL + "/api/twitter/search/v1?token=YOUR_API_KEY&keyword=VALUE"
	req, _ := http.NewRequest("GET", url, nil)
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	fmt.Println(resp.StatusCode)
	bodyBytes, _ := io.ReadAll(resp.Body)
	contentType := strings.ToLower(resp.Header.Get("Content-Type"))
	mediaType := strings.TrimSpace(strings.SplitN(contentType, ";", 2)[0])
	if strings.HasPrefix(contentType, "text/") || strings.Contains(contentType, "json") || strings.Contains(contentType, "xml") || mediaType == "application/javascript" || mediaType == "application/x-www-form-urlencoded" || mediaType == "application/graphql" {
		fmt.Println(string(bodyBytes))
	} else {
		os.WriteFile("response.bin", bodyBytes, 0600)
		fmt.Printf("Saved %d bytes to response.bin\n", len(bodyBytes))
	}
}
```

```php [🐘 PHP]
<?php
$BASE_URL = 'https://api.justoneapi.com'; // Provided by OpenAPI servers
$url = $BASE_URL . '/api/twitter/search/v1?token=YOUR_API_KEY&keyword=VALUE';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$contentType = strtolower((string) curl_getinfo($ch, CURLINFO_CONTENT_TYPE));
curl_close($ch);
echo $status . PHP_EOL;
$mediaType = trim(explode(';', $contentType, 2)[0]);
if (str_starts_with($contentType, 'text/') || str_contains($contentType, 'json') || str_contains($contentType, 'xml') || in_array($mediaType, ['application/javascript', 'application/x-www-form-urlencoded', 'application/graphql'], true)) {
    echo $response;
} else {
    file_put_contents('response.bin', $response);
    echo 'Saved ' . strlen($response) . ' bytes to response.bin' . PHP_EOL;
}
```

:::

<div style="text-align: right; margin-top: -20px; margin-bottom: 20px;">
<a href="/openapi/twitter/search-timeline-v1-en.json" target="_blank" style="font-size: 12px; color: var(--vp-c-text-3); text-decoration: none; opacity: 0.8;">[OpenAPI Definition (JSON)]</a>
</div>

## Response Fields

Key fields in a successful response (`code = 0`).

<div class="api-doc-table api-doc-table--response">

| Field path | Type | Description |
| --- | --- | --- |
| <code>data</code> | <code>object</code> | One page of X search results with pagination cursors. |
| <code>data.status</code> | <code>string</code> | Status text reported for the search response. |
| <code>data.next_cursor</code> | <code>string</code> | Opaque cursor for requesting the next page. Pass it unchanged as cursor with the same keyword and searchType. A cursor can be present on an empty page. |
| <code>data.prev_cursor</code> | <code>string</code> | Opaque cursor supplied for the preceding page. A cursor can be present on an empty page. |
| <code>data.timeline</code> | <code>array</code> | Entries returned for this search page. Read each entry's type to identify what it contains. PEOPLE and LISTS searches can also return posts, and a search can return an empty array. |
| <code>data.timeline[]</code> | <code>object</code> | One entry in the search results. |
| <code>data.timeline[].type</code> | <code>string</code> | Entry type label returned in the search results. |
| <code>data.timeline[].screen_name</code> | <code>string</code> | Public X username attached to the search result. |
| <code>data.timeline[].source</code> | <code>string &#124; null</code> | Posting client or source label as returned by X, when available. |
| <code>data.timeline[].display_text_range</code> | <code>array</code> | Offsets for the visible portion of the post text, in the original X format. |
| <code>data.timeline[].display_text_range[]</code> | <code>integer</code> | One offset in the post's display text range. |
| <code>data.timeline[].user_info</code> | <code>object</code> | Profile information for the user shown on the search result. |
| <code>data.timeline[].user_info.rest_id</code> | <code>string</code> | X account ID represented as text. |
| <code>data.timeline[].user_info.screen_name</code> | <code>string</code> | Public X username of the account. |
| <code>data.timeline[].user_info.name</code> | <code>string</code> | Display name of the account. |
| <code>data.timeline[].user_info.created_at</code> | <code>string</code> | Account creation time in X's original timestamp format. |
| <code>data.timeline[].user_info.avatar</code> | <code>string</code> | Address of the account's avatar image. |
| <code>data.timeline[].user_info.verified</code> | <code>boolean</code> | Verification flag reported for the account. |
| <code>data.timeline[].user_info.verified_type</code> | <code>string &#124; null</code> | Verification category reported for the account, when available. |
| <code>data.timeline[].user_info.followers_count</code> | <code>integer</code> | Follower count reported for the account. |
| <code>data.timeline[].user_info.favorites_count</code> | <code>integer</code> | Number of posts liked by the account, as reported by X. |
| <code>data.timeline[].user_info.location</code> | <code>string &#124; null</code> | Public profile location text, when provided. |
| <code>data.timeline[].entities</code> | <code>object</code> | References attached to the post text and media, such as hashtags, mentions, and URLs. |
| <code>data.timeline[].entities.hashtags</code> | <code>array</code> | Hashtags referenced in the post text. |
| <code>data.timeline[].entities.hashtags[]</code> | <code>object</code> | One hashtag reference in the post text. |
| <code>data.timeline[].entities.hashtags[].text</code> | <code>string</code> | Hashtag text supplied for the reference. |
| <code>data.timeline[].entities.hashtags[].indices</code> | <code>array</code> | Text offsets associated with this entity, in the original X format. |
| <code>data.timeline[].entities.hashtags[].indices[]</code> | <code>integer</code> | One text offset associated with the entity. |
| <code>data.timeline[].entities.symbols</code> | <code>array</code> | Cashtag symbols referenced in the post text. |
| <code>data.timeline[].entities.symbols[]</code> | <code>object</code> | One cashtag reference in the post text. |
| <code>data.timeline[].entities.symbols[].text</code> | <code>string</code> | Text of the cashtag reference. |
| <code>data.timeline[].entities.symbols[].indices</code> | <code>array</code> | Text offsets associated with this entity, in the original X format. |
| <code>data.timeline[].entities.symbols[].indices[]</code> | <code>integer</code> | One text offset associated with the entity. |
| <code>data.timeline[].entities.user_mentions</code> | <code>array</code> | Account mentions referenced in the post text. |
| <code>data.timeline[].entities.user_mentions[]</code> | <code>object</code> | One account mention in the post text. |
| <code>data.timeline[].entities.user_mentions[].id_str</code> | <code>string</code> | Mentioned X account ID represented as text. |
| <code>data.timeline[].entities.user_mentions[].name</code> | <code>string</code> | Display name of the mentioned account. |
| <code>data.timeline[].entities.user_mentions[].screen_name</code> | <code>string</code> | Public X username of the mentioned account. |
| <code>data.timeline[].entities.user_mentions[].indices</code> | <code>array</code> | Text offsets associated with this entity, in the original X format. |
| <code>data.timeline[].entities.user_mentions[].indices[]</code> | <code>integer</code> | One text offset associated with the entity. |
| <code>data.timeline[].entities.urls</code> | <code>array</code> | Links referenced by the post. |
| <code>data.timeline[].entities.urls[]</code> | <code>object</code> | One link referenced by the post. |
| <code>data.timeline[].entities.urls[].url</code> | <code>string</code> | URL present in the post entity. |
| <code>data.timeline[].entities.urls[].expanded_url</code> | <code>string</code> | Expanded address for the link when supplied. |
| <code>data.timeline[].entities.urls[].display_url</code> | <code>string</code> | Display text for the link. |
| <code>data.timeline[].entities.urls[].indices</code> | <code>array</code> | Text offsets associated with this entity, in the original X format. |
| <code>data.timeline[].entities.urls[].indices[]</code> | <code>integer</code> | One text offset associated with the entity. |
| <code>data.timeline[].entities.media</code> | <code>array</code> | Media entities referenced by the post. |
| <code>data.timeline[].entities.media[]</code> | <code>object</code> | One media entity referenced by the post. |
| <code>data.timeline[].entities.media[].id_str</code> | <code>string</code> | Media entity ID represented as text. |
| <code>data.timeline[].entities.media[].type</code> | <code>string</code> | Media type label reported by X. |
| <code>data.timeline[].entities.media[].media_url_https</code> | <code>string</code> | HTTPS image address attached to the media entity. |
| <code>data.timeline[].entities.media[].url</code> | <code>string</code> | URL for the media entity in the post. |
| <code>data.timeline[].entities.media[].display_url</code> | <code>string</code> | Display text for the media link. |
| <code>data.timeline[].entities.media[].expanded_url</code> | <code>string</code> | Expanded address for the media link when supplied. |
| <code>data.timeline[].entities.media[].ext_alt_text</code> | <code>string</code> | Alternative text supplied for the media. |
| <code>data.timeline[].entities.media[].source_status_id_str</code> | <code>string</code> | ID of the source post for this media, represented as text. |
| <code>data.timeline[].entities.media[].source_user_id_str</code> | <code>string</code> | ID of the source account for this media, represented as text. |
| <code>data.timeline[].entities.media[].ext_media_availability</code> | <code>object</code> | Media availability details, when supplied. |
| <code>data.timeline[].entities.media[].ext_media_availability.status</code> | <code>string</code> | Availability status label returned for the media. |
| <code>data.timeline[].entities.media[].allow_download_status</code> | <code>array &#124; object</code> | Download availability details for the media. This field can also be an empty array. |
| <code>data.timeline[].entities.media[].allow_download_status.allow_download</code> | <code>boolean</code> | Whether downloading is marked as allowed. |
| <code>data.timeline[].entities.media[].additional_media_info</code> | <code>object</code> | Additional descriptive metadata for the media, when supplied. |
| <code>data.timeline[].entities.media[].additional_media_info.title</code> | <code>string</code> | Title supplied for the media. |
| <code>data.timeline[].entities.media[].additional_media_info.description</code> | <code>string</code> | Description supplied for the media. |
| <code>data.timeline[].entities.media[].additional_media_info.embeddable</code> | <code>boolean</code> | Whether embedding is marked as allowed. |
| <code>data.timeline[].entities.media[].additional_media_info.monetizable</code> | <code>boolean</code> | Whether the media is marked as eligible for monetization. |
| <code>data.timeline[].entities.media[].original_info</code> | <code>object</code> | Original media dimensions, when supplied. |
| <code>data.timeline[].entities.media[].original_info.width</code> | <code>integer</code> | Original media width in pixels. |
| <code>data.timeline[].entities.media[].original_info.height</code> | <code>integer</code> | Original media height in pixels. |
| <code>data.timeline[].entities.media[].sizes</code> | <code>object</code> | Available image sizes reported for the media entity. |
| <code>data.timeline[].entities.media[].sizes.large</code> | <code>object</code> | Large image dimensions. |
| <code>data.timeline[].entities.media[].sizes.large.w</code> | <code>integer</code> | Image width in pixels. |
| <code>data.timeline[].entities.media[].sizes.large.h</code> | <code>integer</code> | Image height in pixels. |
| <code>data.timeline[].entities.media[].sizes.large.resize</code> | <code>string</code> | Resize method label reported for this image size. |
| <code>data.timeline[].entities.media[].sizes.medium</code> | <code>object</code> | Medium image dimensions. |
| <code>data.timeline[].entities.media[].sizes.medium.w</code> | <code>integer</code> | Image width in pixels. |
| <code>data.timeline[].entities.media[].sizes.medium.h</code> | <code>integer</code> | Image height in pixels. |
| <code>data.timeline[].entities.media[].sizes.medium.resize</code> | <code>string</code> | Resize method label reported for this image size. |
| <code>data.timeline[].entities.media[].sizes.small</code> | <code>object</code> | Small image dimensions. |
| <code>data.timeline[].entities.media[].sizes.small.w</code> | <code>integer</code> | Image width in pixels. |
| <code>data.timeline[].entities.media[].sizes.small.h</code> | <code>integer</code> | Image height in pixels. |
| <code>data.timeline[].entities.media[].sizes.small.resize</code> | <code>string</code> | Resize method label reported for this image size. |
| <code>data.timeline[].entities.media[].sizes.thumb</code> | <code>object</code> | Thumbnail image dimensions. |
| <code>data.timeline[].entities.media[].sizes.thumb.w</code> | <code>integer</code> | Image width in pixels. |
| <code>data.timeline[].entities.media[].sizes.thumb.h</code> | <code>integer</code> | Image height in pixels. |
| <code>data.timeline[].entities.media[].sizes.thumb.resize</code> | <code>string</code> | Resize method label reported for this image size. |
| <code>data.timeline[].entities.media[].video_info</code> | <code>object</code> | Video-specific metadata for the media entity. |
| <code>data.timeline[].entities.media[].video_info.duration_millis</code> | <code>integer</code> | Video duration in milliseconds. |
| <code>data.timeline[].entities.media[].video_info.aspect_ratio</code> | <code>array</code> | Video aspect ratio reported as width and height proportions. |
| <code>data.timeline[].entities.media[].video_info.aspect_ratio[]</code> | <code>integer</code> | One value in the width and height ratio. |
| <code>data.timeline[].entities.media[].video_info.variants</code> | <code>array</code> | Playback variants reported for the media entity. |
| <code>data.timeline[].entities.media[].video_info.variants[]</code> | <code>object</code> | One playback variant. |
| <code>data.timeline[].entities.media[].video_info.variants[].content_type</code> | <code>string</code> | Media type of the playback variant. |
| <code>data.timeline[].entities.media[].video_info.variants[].bitrate</code> | <code>integer</code> | Reported bitrate for this playback variant. |
| <code>data.timeline[].entities.media[].video_info.variants[].url</code> | <code>string</code> | Playback address for this variant. |
| <code>data.timeline[].entities.media[].indices</code> | <code>array</code> | Text offsets associated with this entity, in the original X format. |
| <code>data.timeline[].entities.media[].indices[]</code> | <code>integer</code> | One text offset associated with the entity. |
| <code>data.timeline[].quoted</code> | <code>object</code> | Details of the post quoted by this result, when available. |
| <code>data.timeline[].quoted.tweet_id</code> | <code>string</code> | X post ID represented as text. |
| <code>data.timeline[].quoted.conversation_id</code> | <code>string</code> | ID of the post's conversation, represented as text when supplied. |
| <code>data.timeline[].quoted.created_at</code> | <code>string</code> | Post publication time in X's original timestamp format. |
| <code>data.timeline[].quoted.text</code> | <code>string</code> | Post text returned by X. |
| <code>data.timeline[].quoted.lang</code> | <code>string</code> | Language code supplied for the post. |
| <code>data.timeline[].quoted.views</code> | <code>string</code> | Reported view count as numeric text when available. |
| <code>data.timeline[].quoted.favorites</code> | <code>integer</code> | Like count reported for the post. |
| <code>data.timeline[].quoted.bookmarks</code> | <code>integer</code> | Bookmark count reported for the post. |
| <code>data.timeline[].quoted.replies</code> | <code>integer</code> | Reply count reported for the post. |
| <code>data.timeline[].quoted.retweets</code> | <code>integer</code> | Repost count reported for the post. |
| <code>data.timeline[].quoted.quotes</code> | <code>integer</code> | Quote count reported for the post. |
| <code>data.timeline[].quoted.sensitive</code> | <code>boolean &#124; null</code> | Sensitive-content flag when supplied. |
| <code>data.timeline[].quoted.media</code> | <code>array &#124; object</code> | Media attached to the post. It can be an object with media lists or an empty array. |
| <code>data.timeline[].quoted.media.photo</code> | <code>array</code> | Photo attachments for the post. |
| <code>data.timeline[].quoted.media.photo[]</code> | <code>object</code> | One photo attachment on the post. |
| <code>data.timeline[].quoted.media.photo[].id</code> | <code>string</code> | Photo ID represented as text. |
| <code>data.timeline[].quoted.media.photo[].media_url_https</code> | <code>string</code> | HTTPS address supplied for the photo. |
| <code>data.timeline[].quoted.media.photo[].sizes</code> | <code>object</code> | Dimensions reported for the photo. |
| <code>data.timeline[].quoted.media.photo[].sizes.w</code> | <code>integer</code> | Photo width in pixels. |
| <code>data.timeline[].quoted.media.photo[].sizes.h</code> | <code>integer</code> | Photo height in pixels. |
| <code>data.timeline[].quoted.media.video</code> | <code>array</code> | Video attachments for the post. |
| <code>data.timeline[].quoted.media.video[]</code> | <code>object</code> | One video attachment on the post. |
| <code>data.timeline[].quoted.media.video[].id</code> | <code>string</code> | Video ID represented as text. |
| <code>data.timeline[].quoted.media.video[].media_url_https</code> | <code>string</code> | HTTPS preview image address supplied for the video. |
| <code>data.timeline[].quoted.media.video[].duration</code> | <code>integer</code> | Video duration in milliseconds when available. |
| <code>data.timeline[].quoted.media.video[].aspect_ratio</code> | <code>array</code> | Aspect ratio reported as width and height proportions. |
| <code>data.timeline[].quoted.media.video[].aspect_ratio[]</code> | <code>integer</code> | One value in the width and height ratio. |
| <code>data.timeline[].quoted.media.video[].original_info</code> | <code>object</code> | Original video dimensions reported for the media. |
| <code>data.timeline[].quoted.media.video[].original_info.width</code> | <code>integer</code> | Original video width in pixels. |
| <code>data.timeline[].quoted.media.video[].original_info.height</code> | <code>integer</code> | Original video height in pixels. |
| <code>data.timeline[].quoted.media.video[].variants</code> | <code>array</code> | Available playback variants for the video. |
| <code>data.timeline[].quoted.media.video[].variants[]</code> | <code>object</code> | One playback variant. |
| <code>data.timeline[].quoted.media.video[].variants[].content_type</code> | <code>string</code> | Media type of the playback variant. |
| <code>data.timeline[].quoted.media.video[].variants[].bitrate</code> | <code>integer</code> | Reported bitrate for this playback variant. |
| <code>data.timeline[].quoted.media.video[].variants[].url</code> | <code>string</code> | Playback address for this variant. |
| <code>data.timeline[].quoted.author</code> | <code>object</code> | Profile information for the author of this post. |
| <code>data.timeline[].quoted.author.rest_id</code> | <code>string</code> | X account ID represented as text. |
| <code>data.timeline[].quoted.author.screen_name</code> | <code>string</code> | Public X username of the account. |
| <code>data.timeline[].quoted.author.name</code> | <code>string</code> | Display name of the account. |
| <code>data.timeline[].quoted.author.created_at</code> | <code>string</code> | Account creation time in X's original timestamp format. |
| <code>data.timeline[].quoted.author.avatar</code> | <code>string</code> | Address of the account's avatar image. |
| <code>data.timeline[].quoted.author.blue_verified</code> | <code>boolean</code> | Whether the response marks the account as blue verified. |
| <code>data.timeline[].retweeted</code> | <code>object</code> | Reference to the original post attached to a repost. |
| <code>data.timeline[].retweeted.id</code> | <code>string</code> | X post ID of the reposted original, represented as text. |
| <code>data.timeline[].retweeted_tweet</code> | <code>object</code> | Details of the original post attached to a repost, when available. |
| <code>data.timeline[].retweeted_tweet.tweet_id</code> | <code>string</code> | X post ID represented as text. |
| <code>data.timeline[].retweeted_tweet.conversation_id</code> | <code>string</code> | ID of the post's conversation, represented as text when supplied. |
| <code>data.timeline[].retweeted_tweet.created_at</code> | <code>string</code> | Post publication time in X's original timestamp format. |
| <code>data.timeline[].retweeted_tweet.text</code> | <code>string</code> | Post text returned by X. |
| <code>data.timeline[].retweeted_tweet.lang</code> | <code>string</code> | Language code supplied for the post. |
| <code>data.timeline[].retweeted_tweet.favorites</code> | <code>integer</code> | Like count reported for the post. |
| <code>data.timeline[].retweeted_tweet.bookmarks</code> | <code>integer</code> | Bookmark count reported for the post. |
| <code>data.timeline[].retweeted_tweet.replies</code> | <code>integer</code> | Reply count reported for the post. |
| <code>data.timeline[].retweeted_tweet.retweets</code> | <code>integer</code> | Repost count reported for the post. |
| <code>data.timeline[].retweeted_tweet.quotes</code> | <code>integer</code> | Quote count reported for the post. |
| <code>data.timeline[].retweeted_tweet.sensitive</code> | <code>boolean &#124; null</code> | Sensitive-content flag when supplied. |
| <code>data.timeline[].retweeted_tweet.media</code> | <code>array &#124; object</code> | Media attached to the post. It can be an object with media lists or an empty array. |
| <code>data.timeline[].retweeted_tweet.media.photo</code> | <code>array</code> | Photo attachments for the post. |
| <code>data.timeline[].retweeted_tweet.media.photo[]</code> | <code>object</code> | One photo attachment on the post. |
| <code>data.timeline[].retweeted_tweet.media.photo[].id</code> | <code>string</code> | Photo ID represented as text. |
| <code>data.timeline[].retweeted_tweet.media.photo[].media_url_https</code> | <code>string</code> | HTTPS address supplied for the photo. |
| <code>data.timeline[].retweeted_tweet.media.video</code> | <code>array</code> | Video attachments for the post. |
| <code>data.timeline[].retweeted_tweet.media.video[]</code> | <code>object</code> | One video attachment on the post. |
| <code>data.timeline[].retweeted_tweet.media.video[].id</code> | <code>string</code> | Video ID represented as text. |
| <code>data.timeline[].retweeted_tweet.media.video[].media_url_https</code> | <code>string</code> | HTTPS preview image address supplied for the video. |
| <code>data.timeline[].retweeted_tweet.media.video[].duration</code> | <code>integer</code> | Video duration in milliseconds when available. |
| <code>data.timeline[].retweeted_tweet.media.video[].aspect_ratio</code> | <code>array</code> | Aspect ratio reported as width and height proportions. |
| <code>data.timeline[].retweeted_tweet.media.video[].aspect_ratio[]</code> | <code>integer</code> | One value in the width and height ratio. |
| <code>data.timeline[].retweeted_tweet.media.video[].original_info</code> | <code>object</code> | Original video dimensions reported for the media. |
| <code>data.timeline[].retweeted_tweet.media.video[].original_info.width</code> | <code>integer</code> | Original video width in pixels. |
| <code>data.timeline[].retweeted_tweet.media.video[].original_info.height</code> | <code>integer</code> | Original video height in pixels. |
| <code>data.timeline[].retweeted_tweet.media.video[].variants</code> | <code>array</code> | Available playback variants for the video. |
| <code>data.timeline[].retweeted_tweet.media.video[].variants[]</code> | <code>object</code> | One playback variant. |
| <code>data.timeline[].retweeted_tweet.media.video[].variants[].content_type</code> | <code>string</code> | Media type of the playback variant. |
| <code>data.timeline[].retweeted_tweet.media.video[].variants[].bitrate</code> | <code>integer</code> | Reported bitrate for this playback variant. |
| <code>data.timeline[].retweeted_tweet.media.video[].variants[].url</code> | <code>string</code> | Playback address for this variant. |
| <code>data.timeline[].retweeted_tweet.author</code> | <code>object</code> | Profile information for the author of this post. |
| <code>data.timeline[].retweeted_tweet.author.rest_id</code> | <code>string</code> | X account ID represented as text. |
| <code>data.timeline[].retweeted_tweet.author.screen_name</code> | <code>string</code> | Public X username of the account. |
| <code>data.timeline[].retweeted_tweet.author.name</code> | <code>string</code> | Display name of the account. |
| <code>data.timeline[].retweeted_tweet.author.avatar</code> | <code>string</code> | Address of the account's avatar image. |
| <code>data.timeline[].retweeted_tweet.author.blue_verified</code> | <code>boolean</code> | Whether the response marks the account as blue verified. |
| <code>data.timeline[].place</code> | <code>object</code> | Place label attached to the post, when available. |
| <code>data.timeline[].place.name</code> | <code>string</code> | Place name reported by X. |
| <code>data.timeline[].place.full_name</code> | <code>string</code> | Full display name of the place. |
| <code>data.timeline[].place.country</code> | <code>string</code> | Country name supplied for the place. |
| <code>data.timeline[].place.country_code</code> | <code>string</code> | Country code supplied for the place. |
| <code>data.timeline[].place.place_type</code> | <code>string</code> | Type label associated with the place. |
| <code>data.timeline[].tweet_id</code> | <code>string</code> | X post ID represented as text. |
| <code>data.timeline[].conversation_id</code> | <code>string &#124; null</code> | ID of the post's conversation, represented as text when supplied. |
| <code>data.timeline[].created_at</code> | <code>string</code> | Post publication time in X's original timestamp format. |
| <code>data.timeline[].text</code> | <code>string</code> | Post text returned by X. |
| <code>data.timeline[].lang</code> | <code>string</code> | Language code supplied for the post. |
| <code>data.timeline[].views</code> | <code>string &#124; null</code> | Reported view count as numeric text when available. |
| <code>data.timeline[].favorites</code> | <code>integer</code> | Like count reported for the post. |
| <code>data.timeline[].bookmarks</code> | <code>integer</code> | Bookmark count reported for the post. |
| <code>data.timeline[].replies</code> | <code>integer</code> | Reply count reported for the post. |
| <code>data.timeline[].retweets</code> | <code>integer</code> | Repost count reported for the post. |
| <code>data.timeline[].quotes</code> | <code>integer</code> | Quote count reported for the post. |
| <code>data.timeline[].sensitive</code> | <code>boolean &#124; null</code> | Sensitive-content flag when supplied. |
| <code>data.timeline[].media</code> | <code>array &#124; object</code> | Media attached to the post. It can be an object with media lists or an empty array. |
| <code>data.timeline[].media.photo</code> | <code>array</code> | Photo attachments for the post. |
| <code>data.timeline[].media.photo[]</code> | <code>object</code> | One photo attachment on the post. |
| <code>data.timeline[].media.photo[].id</code> | <code>string</code> | Photo ID represented as text. |
| <code>data.timeline[].media.photo[].media_url_https</code> | <code>string</code> | HTTPS address supplied for the photo. |
| <code>data.timeline[].media.photo[].sizes</code> | <code>object</code> | Dimensions reported for the photo. |
| <code>data.timeline[].media.photo[].sizes.w</code> | <code>integer</code> | Photo width in pixels. |
| <code>data.timeline[].media.photo[].sizes.h</code> | <code>integer</code> | Photo height in pixels. |
| <code>data.timeline[].media.video</code> | <code>array</code> | Video attachments for the post. |
| <code>data.timeline[].media.video[]</code> | <code>object</code> | One video attachment on the post. |
| <code>data.timeline[].media.video[].id</code> | <code>string</code> | Video ID represented as text. |
| <code>data.timeline[].media.video[].media_url_https</code> | <code>string</code> | HTTPS preview image address supplied for the video. |
| <code>data.timeline[].media.video[].duration</code> | <code>integer &#124; null</code> | Video duration in milliseconds when available. |
| <code>data.timeline[].media.video[].aspect_ratio</code> | <code>array</code> | Aspect ratio reported as width and height proportions. |
| <code>data.timeline[].media.video[].aspect_ratio[]</code> | <code>integer</code> | One value in the width and height ratio. |
| <code>data.timeline[].media.video[].original_info</code> | <code>object</code> | Original video dimensions reported for the media. |
| <code>data.timeline[].media.video[].original_info.width</code> | <code>integer</code> | Original video width in pixels. |
| <code>data.timeline[].media.video[].original_info.height</code> | <code>integer</code> | Original video height in pixels. |
| <code>data.timeline[].media.video[].variants</code> | <code>array</code> | Available playback variants for the video. |
| <code>data.timeline[].media.video[].variants[]</code> | <code>object</code> | One playback variant. |
| <code>data.timeline[].media.video[].variants[].content_type</code> | <code>string</code> | Media type of the playback variant. |
| <code>data.timeline[].media.video[].variants[].bitrate</code> | <code>integer</code> | Reported bitrate for this playback variant. |
| <code>data.timeline[].media.video[].variants[].url</code> | <code>string</code> | Playback address for this variant. |

</div>

## Response Example

<ApiExampleSection :api='JSON.parse("\"/api/twitter/search/v1\"")' />

