Docs
Search lists

Search lists

Public lists whose name or description matches a keyword.

GET/lists/search

Parameters

  • queryquery · string · required

    Search words, up to 512 characters.

  • countquery · integer · optional · default 20

    Number of lists to ask X for, 1 to 100. Other values fall back to 20. X treats it as a hint.

  • cursorquery · string · optional

    Bottom cursor from the previous page. Leave it out for the first page. See Pagination.

Paginated: pass the bottom cursor of one page as cursor to get the next. Each page is one billed call. See Pagination.

Example request

curl 'https://api.twittrapi.com/lists/search?query=crypto' \
  --header 'X-API-KEY: YOUR_API_KEY'

Base URL https://api.twittrapi.com, key in the X-API-KEY header. Python and Node.js use the official SDKs.

Response

Raw JSON of X's ListSearchTimeline query: data.search_by_raw_query.list_search_timeline.timeline.instructions, the lists in one module (TimelineTwitterList items) plus a bottom cursor.

Simple format (?format=simple or X-Response-Format: simple): Collection of List objects, as /user/{userId}/lists. Schema.

{
  "data": {
    "search_by_raw_query": {
      "list_search_timeline": {
        "timeline": {
          "instructions": [
            {
              "type": "TimelineClearCache"
            },
            {
              "direction": "Top",
              "type": "TimelineTerminateTimeline"
            },
            {
              "entries": [
                {
                  "content": {
                    "__typename": "TimelineTimelineModule",
                    "clientEventInfo": {
                      "component": "list_search"
                    },
                    "displayType": "Vertical",
                    "entryType": "TimelineTimelineModule",
                    "items": [
                      {
                        "entryId": "list-search-0-list-1073407660337188865",
                        "item": {
                          "clientEventInfo": {
                            "component": "list_search",
                            "element": "list"
                          },
                          "itemContent": {
                            "__typename": "TimelineTwitterList",
                            "displayType": "ListWithSubscribe",
                            "itemType": "TimelineTwitterList",
                            "list": {
                              "created_at": 1544755303000,
                              "default_banner_media": {
                                "media_info": {
                                  "original_img_height": 375,
                                  "original_img_url": "https://pbs.twimg.com/media/GkIQ8I1XgAAKHEf.png",
                                  "original_img_width": 1125,
                                  "salient_rect": {
                                    "height": 1,
                                    "left": 562,
                                    "top": 187,
                                    "width": 1
                                  }
                                }
                              },
                              "default_banner_media_results": {},
                              "description": "",
                              "facepile_urls": [
                                "https://pbs.twimg.com/profile_images/870589688465182720/RhRnOiGG_mini.jpg",
                                "https://pbs.twimg.com/profile_images/1547787118243561478/PxWzJo1H_mini.jpg",
                                "https://pbs.twimg.com/profile_images/1820716712234303489/9GpKDZjq_mini.jpg"
                              ],
                              "followers_context": "17K followers including @thetanmay",
                              "following": false,
                              "id": "TGlzdDoxOTAwMDAwMDAwMDAwMDAwMDAz",
                              "id_str": "1900000000000000003",
                              "is_member": false,
                              "member_count": 136,
                              "members_context": "136 members",
                              "mode": "Public",
                              "muting": false,
                              "name": "Crypto Core",
                              "pinning": false,
                              "subscriber_count": 17024,
                              "user_results": {
                                "result": {
                                  "__typename": "User",
                                  "action_counts": {
                                    "favorites_count": 313710
                                  },
                                  "affiliates_highlighted_label": {},
                                  "avatar": {
                                    "image_url": "https://pbs.twimg.com/profile_images/example/avatar_normal.jpg"
                                  },
                                  "core": {
                                    "created_at": "Thu Feb 01 23:05:04 +0000 2007",
                                    "name": "Example User 3",
                                    "screen_name": "example_user_3"
                                  },
                                  "follow_request_sent": false,
                                  "has_graduated_access": true,
                                  "id": "VXNlcjoxMDAwMDAwMDAwMDAwMDAwMDAz",
                                  "is_blue_verified": true,
                                  "location": {
                                    "location": ""
                                  },
                                  "media_permissions": {
                                    "can_media_tag": false
                                  },
                                  "notifications_settings": {
                                    "notifications_enabled": false
                                  },
                                  "parody_commentary_fan_label": "None",
                                  "pinned_items": {
                                    "tweet_ids_str": [
                                      "1002103360646823936"
                                    ]
                                  },
                                  "possibly_sensitive": false,
                                  "privacy": {
                                    "protected": false
                                  },
                                  "profile_bio": {
                                    "description": "Example bio.",
                                    "entities": {
                                      "description": {
                                        "urls": []
                                      }
                                    }
                                  },
                                  "profile_image_shape": "Circle",
                                  "profile_metadata": {
                                    "profile_interstitial_type": ""
                                  },
                                  "profile_translation": {
                                    "translator_type": "none"
                                  },
                                  "relationship_counts": {
                                    "followers": 4195491,
                                    "following": 0
                                  },
                                  "relationship_perspectives": {
                                    "blocked_by": false,
                                    "blocking": false,
                                    "followed_by": false,
                                    "following": false,
                                    "live_following": false,
                                    "muting": false
                                  },
                                  "rest_id": "1000000000000000003",
                                  "super_follow_eligible": false,
                                  "super_followed_by": false,
                                  "super_following": false,
                                  "tweet_counts": {
                                    "media_tweets": 338,
                                    "tweets": 27196
                                  },
                                  "verification": {
                                    "verified": false
                                  },
                                  "website": {
                                    "url": "https://t.co/diCVEyXHd9"
                                  },
                                  "legacy": {
                                    "blocked_by": false,
                                    "blocking": false,
                                    "can_media_tag": false,
                                    "created_at": "Thu Feb 01 23:05:04 +0000 2007",
                                    "default_profile_image": false,
                                    "description": "Example bio.",
                                    "entities": {
                                      "description": {
                                        "urls": []
                                      }
                                    },
                                    "fast_followers_count": 0,
                                    "favourites_count": 313710,
                                    "follow_request_sent": false,
                                    "followed_by": false,
                                    "followers_count": 4195491,
                                    "following": false,
                                    "friends_count": 0,
                                    "is_translator": false,
                                    "location": "",
                                    "media_count": 338,
                                    "muting": false,
                                    "name": "Example User 3",
                                    "needs_phone_verification": false,
                                    "normal_followers_count": 4195491,
                                    "notifications": false,
                                    "pinned_tweet_ids_str": [
                                      "1002103360646823936"
                                    ],
                                    "possibly_sensitive": false,
                                    "profile_image_url_https": "https://pbs.twimg.com/profile_images/example/avatar_normal.jpg",
                                    "profile_interstitial_type": "",
                                    "protected": false,
                                    "screen_name": "example_user_3",
                                    "statuses_count": 27196,
                                    "time_zone": "",
                                    "translator_type": "none",
                                    "utc_offset": 0,
                                    "verified": false,
                                    "want_retweets": false,
                                    "withheld_description": "",
                                    "withheld_scope": ""
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      {
                        "entryId": "list-search-0-list-1597593475389984769",
                        "item": {
                          "clientEventInfo": {
                            "component": "list_search",
                            "element": "list"
                          },
                          "itemContent": {
                            "__typename": "TimelineTwitterList",
                            "displayType": "ListWithSubscribe",
                            "itemType": "TimelineTwitterList",
                            "list": {
                              "created_at": 1669730941000,
                              "default_banner_media": {
                                "media_info": {
                                  "original_img_height": 375,
                                  "original_img_url": "https://pbs.twimg.com/media/GkIPUqRX0AAGDxg.png",
                                  "original_img_width": 1125,
                                  "salient_rect": {
                                    "height": 1,
                                    "left": 562,
                                    "top": 187,
                                    "width": 1
                                  }
                                }
                              },
                              "default_banner_media_results": {},
                              "description": "",
                              "facepile_urls": [
                                "https://pbs.twimg.com/profile_images/2052774685109022723/yIciBqlj_mini.jpg",
                                "https://pbs.twimg.com/profile_images/2087489527937986560/80VJbDe7_mini.jpg",
                                "https://abs.twimg.com/sticky/default_profile_images/default_profile_mini.png"
                              ],
                              "followers_context": "9.4K followers including @TrustWallet",
                              "following": false,
                              "id": "TGlzdDoxOTAwMDAwMDAwMDAwMDAwMDA0",
                              "id_str": "1900000000000000004",
                              "is_member": false,
                              "member_count": 44,
                              "members_context": "44 members",
                              "mode": "Public",
                              "muting": false,
                              "name": "Crypto",
                              "pinning": false,
                              "subscriber_count": 9436,
                              "user_results": {
                                "result": {
                                  "__typename": "User",
                                  "action_counts": {
                                    "favorites_count": 759
                                  },
                                  "affiliates_highlighted_label": {},
                                  "avatar": {
                                    "image_url": "https://pbs.twimg.com/profile_images/example/avatar_normal.jpg"
                                  },
                                  "core": {
                                    "created_at": "Fri Sep 23 09:17:27 +0000 2016",
                                    "name": "Example User 4",
                                    "screen_name": "example_user_4"
                                  },
                                  "follow_request_sent": false,
                                  "has_graduated_access": true,
                                  "id": "VXNlcjoxMDAwMDAwMDAwMDAwMDAwMDA0",
                                  "is_blue_verified": false,
                                  "location": {
                                    "location": ""
                                  },
                                  "media_permissions": {
                                    "can_media_tag": true
                                  },
                                  "notifications_settings": {
                                    "notifications_enabled": false
                                  },
                                  "parody_commentary_fan_label": "None",
                                  "pinned_items": {},
                                  "possibly_sensitive": false,
                                  "privacy": {
                                    "protected": false
                                  },
                                  "profile_bio": {
                                    "description": "Example bio.",
                                    "entities": {
                                      "description": {
                                        "urls": []
                                      }
                                    }
                                  },
                                  "profile_image_shape": "Circle",
                                  "profile_metadata": {
                                    "profile_interstitial_type": ""
                                  },
                                  "profile_translation": {
                                    "translator_type": "none"
                                  },
                                  "relationship_counts": {
                                    "followers": 89,
                                    "following": 413
                                  },
                                  "relationship_perspectives": {
                                    "blocked_by": false,
                                    "blocking": false,
                                    "followed_by": false,
                                    "following": false,
                                    "live_following": false,
                                    "muting": false
                                  },
                                  "rest_id": "1000000000000000004",
                                  "super_follow_eligible": false,
                                  "super_followed_by": false,
                                  "super_following": false,
                                  "tweet_counts": {
                                    "media_tweets": 5,
                                    "tweets": 579
                                  },
                                  "verification": {
                                    "verified": false
                                  },
                                  "website": {
                                    "url": ""
                                  },
                                  "legacy": {
                                    "blocked_by": false,
                                    "blocking": false,
                                    "can_media_tag": true,
                                    "created_at": "Fri Sep 23 09:17:27 +0000 2016",
                                    "default_profile_image": false,
                                    "description": "Example bio.",
                                    "entities": {
                                      "description": {
                                        "urls": []
                                      }
                                    },
                                    "fast_followers_count": 0,
                                    "favourites_count": 759,
                                    "follow_request_sent": false,
                                    "followed_by": false,
                                    "followers_count": 89,
                                    "following": false,
                                    "friends_count": 413,
                                    "is_translator": false,
                                    "location": "",
                                    "media_count": 5,
                                    "muting": false,
                                    "name": "Example User 4",
                                    "needs_phone_verification": false,
                                    "normal_followers_count": 89,
                                    "notifications": false,
                                    "possibly_sensitive": false,
                                    "profile_image_url_https": "https://pbs.twimg.com/profile_images/example/avatar_normal.jpg",
                                    "profile_interstitial_type": "",
                                    "protected": false,
                                    "screen_name": "example_user_4",
                                    "statuses_count": 579,
                                    "time_zone": "",
                                    "translator_type": "none",
                                    "utc_offset": 0,
                                    "verified": false,
                                    "want_retweets": false,
                                    "withheld_description": "",
                                    "withheld_scope": ""
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      {
                        "entryId": "list-search-0-list-1522583574041579520",
                        "item": {
                          "clientEventInfo": {
                            "component": "list_search",
                            "element": "list"
                          },
                          "itemContent": {
                            "__typename": "TimelineTwitterList",
                            "displayType": "ListWithSubscribe",
                            "itemType": "TimelineTwitterList",
                            "list": {
                              "created_at": 1651847186000,
                              "default_banner_media": {
                                "media_info": {
                                  "original_img_height": 375,
                                  "original_img_url": "https://pbs.twimg.com/media/GkIQ8I1XgAAKHEf.png",
                                  "original_img_width": 1125,
                                  "salient_rect": {
                                    "height": 1,
                                    "left": 562,
                                    "top": 187,
                                    "width": 1
                                  }
                                }
                              },
                              "default_banner_media_results": {},
                              "description": "",
                              "facepile_urls": [
                                "https://pbs.twimg.com/profile_images/1460611731928059914/33hm_B-h_mini.jpg",
                                "https://pbs.twimg.com/profile_images/1609950294758289413/qilrZFnm_mini.jpg",
                                "https://pbs.twimg.com/profile_images/2089986299289591809/nO0jxiIO_mini.jpg"
                              ],
                              "followers_context": "8.8K followers including @Cryptogemsguru",
                              "following": false,

In the raw format, field names and nesting come from X and can change without notice. See Response format; the simple format keeps a fixed schema.

Errors

  • 400query is missing.
  • 422query is longer than 512 characters.

Errors every endpoint can return (401, 402, 403, 404, 408, 409, 429, 5xx), and which of them are charged, are on the Errors page. Calls that fail with 400, 407, 408, 409 or a 5xx error are refunded.