Twitter Search API documentation

The Twitter Search API allows you to search for tweets in the same way as you would perform queries in the search interface:

  • The Twitter API returns 20 tweets per request.
  • The order in which tweets are returned is by descending date(from newest to oldest).
  • You can get all the tweets for a query by using the cursor parameter.

To get tweets from Wextractor you will need to perform GET requests against the https://wextractor.com/api/v1/twitter/tweets endpoint.

Reviews endpoint parameters:

Parameter Required Description Example
auth_token Required Your API token for authentication. Once you register to Wextractor you can extract this key from your account's setting page. -
query Required The query to perform, you can use the search operators from Twitter to perform advanced queries: Twitter reference musk
cursor Optional This parameter defines the cursor to use for pagination. After getting the first page of results without sending the cursor parameter. The response will include a cursor field. To get the following page of results you need to create a new request adding the value of that field as the cursor parameter. -

Example usage:

https://wextractor.com/api/v1/twitter/tweets?query=musk&auth_token=XXXXX

Example response:

        {
            "tweets": [
                {
                    "id": "1646449347461099521",
                    "url": "https://twitter.com/i/web/status/1646449347461099521",
                    "created_at": "Thu Apr 13 09:44:48 +0000 2023",
                    "full_text": "I am now Dr. Maye Musk PhD! 👩‍🎓🥰 Thank you the University of the Free State for honoring me with the Doctor of Dietetics. After dedicating my adult life to nutrition research and the promotion of dietitians, this is the best recognition ever! This ceremony brought me to tears. It… https://t.co/KHaE40o3o6",
                    "text": "I am now Dr. Maye Musk PhD! 👩‍🎓🥰 Thank you the University of the Free State for honoring me with the Doctor of Dietetics. After dedicating my adult life to nutrition research and the promotion of dietitians, this is the best recognition ever! This ceremony brought me to tears. It…",
                    "place": null,
                    "user": {
                        "screen_name": "mayemusk",
                        "name": "Maye Musk",
                        "id": "14171401",
                        "description": "Bestselling International Author #AWomanMakesAPlan 📖 Doctor of Dietetics 🤓 Supermodel😉💃 #ItsGreatToBe74 Agents ⬇️",
                        "followers_count": 894322
                    },
                    "retweet_count": 1683
                },
                {
                    "id": "1646540130730098690",
                    "url": "https://twitter.com/i/web/status/1646540130730098690",
                    "created_at": "Thu Apr 13 15:45:33 +0000 2023",
                    "full_text": "if you were wondering what Matt Taibbi’s next move would be after leaving Twitter following a falling out with Elon Musk…\n\ndo i have some news for you https://t.co/eSTEEmtRZO",
                    "text": "if you were wondering what Matt Taibbi’s next move would be after leaving Twitter following a falling out with Elon Musk…\n\ndo i have some news for you",
                    "place": null,
                    "user": {
                        "screen_name": "MattBinder",
                        "name": "Matt Binder",
                        "id": "14931637",
                        "description": "host: https://t.co/MuuVDPKViz & https://t.co/8tcAihCMq5 // video: https://t.co/TH6pyUtFb7 // newsletter: https://t.co/rDJSuSdyBI // reporter: @mashable // @majorityfm thursdays",
                        "followers_count": 134118
                    },
                    "retweet_count": 666
                },
                {
                    "id": "1646621088858742784",
                    "url": "https://twitter.com/i/web/status/1646621088858742784",
                    "created_at": "Thu Apr 13 21:07:14 +0000 2023",
                    "full_text": "Here is San Francisco DA Brooke Jenkins slapping the shit out of Elon Musk for spreading trash-ass nonsense about the killing of Cash App founder Bob Lee. \n\nBeautiful.\n https://t.co/qek57M1tB6",
                    "text": "Here is San Francisco DA Brooke Jenkins slapping the shit out of Elon Musk for spreading trash-ass nonsense about the killing of Cash App founder Bob Lee. \n\nBeautiful.\n https://t.co/qek57M1tB6",
                    "place": null,
                    "user": {
                        "screen_name": "JasonOverstreet",
                        "name": "Jason Overstreet",
                        "id": "2865907814",
                        "description": "Author. Beneath the Darkest Sky. The Strivers' Row Spy. 71 Days: The Media Assault. Currently typing....",
                        "followers_count": 58157
                    },
                    "retweet_count": 16
                },
                {
                    "id": "1646509307872026625",
                    "url": "https://twitter.com/i/web/status/1646509307872026625",
                    "created_at": "Thu Apr 13 13:43:04 +0000 2023",
                    "full_text": "Instead of posting a dozen tweets going like \"this is terrifying who the hell is the puppet master?\" he could have just taken 30 sec to do a Google search and find his questions have all been answered and extensively covered by the media https://t.co/9LYCc76cYy",
                    "text": "Instead of posting a dozen tweets going like \"this is terrifying who the hell is the puppet master?\" he could have just taken 30 sec to do a Google search and find his questions have all been answered and extensively covered by the media",
                    "place": null,
                    "user": {
                        "screen_name": "steinkobbe",
                        "name": "Wild Geerters",
                        "id": "813554157097459714",
                        "description": "Ø",
                        "followers_count": 90381
                    },
                    "retweet_count": 849
                },
                {
                    "id": "1646560815003373568",
                    "url": "https://twitter.com/i/web/status/1646560815003373568",
                    "created_at": "Thu Apr 13 17:07:44 +0000 2023",
                    "full_text": "Apply to offer your followers subscriptions of any material, from longform text to hours long video!\n\nJust tap on “Monetization” in settings.",
                    "text": "Apply to offer your followers subscriptions of any material, from longform text to hours long video!\n\nJust tap on “Monetization” in settings.",
                    "place": null,
                    "user": {
                        "screen_name": "elonmusk",
                        "name": "Elon Musk",
                        "id": "44196397",
                        "description": "",
                        "followers_count": 134793009
                    },
                    "retweet_count": 6527
                },
                {
                    "id": "1646575492709974036",
                    "url": "https://twitter.com/i/web/status/1646575492709974036",
                    "created_at": "Thu Apr 13 18:06:04 +0000 2023",
                    "full_text": "So, not a random act of violence in a lawless Democratic city like right-wingers and Musk have relentlessly spun since this happened? A targeted attack by an owner of a tech company who knew him. https://t.co/pdjvV49B6C",
                    "text": "So, not a random act of violence in a lawless Democratic city like right-wingers and Musk have relentlessly spun since this happened? A targeted attack by an owner of a tech company who knew him. https://t.co/pdjvV49B6C",
                    "place": null,
                    "user": {
                        "screen_name": "RonFilipkowski",
                        "name": "Ron Filipkowski 🇺🇦",
                        "id": "1298372735383605249",
                        "description": "Attorney, Marine, Fmr Fed Prosec  & Repub; now Def Att & Dem. Chair of Normal Caucus, Track & Report on the Right-Wing. Seen on BBC, CNN, MSNBC, CBS, Al-Jazeera",
                        "followers_count": 722597
                    },
                    "retweet_count": 1069
                },
                {
                    "id": "1646613334819766278",
                    "url": "https://twitter.com/i/web/status/1646613334819766278",
                    "created_at": "Thu Apr 13 20:36:26 +0000 2023",
                    "full_text": "San Francisco District Attorney Brooke Jenkins calls out Elon Musk for criticizing the city on crime following the fatal stabbing of Cash App founder Bob Lee:\n\n“Since waking up to Elon Musk’s tweet, my office has worked hard to actually tell people not to make assumptions.” https://t.co/rHeqP10PF4",
                    "text": "San Francisco District Attorney Brooke Jenkins calls out Elon Musk for criticizing the city on crime following the fatal stabbing of Cash App founder Bob Lee:\n\n“Since waking up to Elon Musk’s tweet, my office has worked hard to actually tell people not to make assumptions.”",
                    "place": null,
                    "user": {
                        "screen_name": "therecount",
                        "name": "The Recount",
                        "id": "1087380412089987077",
                        "description": "Everything is politics. Download our app & subscribe to our newsletter. 📩 [email protected]",
                        "followers_count": 363860
                    },
                    "retweet_count": 22
                },
                {
                    "id": "1599815537407803393",
                    "url": "https://twitter.com/i/web/status/1599815537407803393",
                    "created_at": "Mon Dec 05 17:18:41 +0000 2022",
                    "full_text": "Why Family First Life? Here is why!",
                    "text": "Why Family First Life? Here is why!",
                    "place": null,
                    "user": {
                        "screen_name": "FamilyFirstLife",
                        "name": "Family First Life",
                        "id": "1530855967",
                        "description": "Our mission at Family First Life, is to make the families we protect and the families of our agents our number one priority. Follow on IG @familyfirstlife",
                        "followers_count": 3052
                    },
                    "retweet_count": 32
                },
                {
                    "id": "1646536591383359489",
                    "url": "https://twitter.com/i/web/status/1646536591383359489",
                    "created_at": "Thu Apr 13 15:31:29 +0000 2023",
                    "full_text": "This is the third different time Elon Musk has promoted the video I made showing Sinclair broadcasters being forced to read a pro-Trump script and declared it to be, actually, liberal indoctrination \n\nElon Musk may be the stupidest person on the planet",
                    "text": "This is the third different time Elon Musk has promoted the video I made showing Sinclair broadcasters being forced to read a pro-Trump script and declared it to be, actually, liberal indoctrination \n\nElon Musk may be the stupidest person on the planet",
                    "place": {
                        "id": "dc62519fda13b4ec",
                        "url": "https://api.twitter.com/1.1/geo/id/dc62519fda13b4ec.json",
                        "place_type": "city",
                        "name": "Tampa",
                        "full_name": "Tampa, FL",
                        "country_code": "US",
                        "country": "United States",
                        "contained_within": [],
                        "bounding_box": {
                            "type": "Polygon",
                            "coordinates": [
                                [
                                    [
                                        -82.620093,
                                        27.821353
                                    ],
                                    [
                                        -82.2652945,
                                        27.821353
                                    ],
                                    [
                                        -82.2652945,
                                        28.171836
                                    ],
                                    [
                                        -82.620093,
                                        28.171836
                                    ]
                                ]
                            ]
                        },
                        "attributes": {}
                    },
                    "user": {
                        "screen_name": "bubbaprog",
                        "name": "Timothy Burke",
                        "id": "62103",
                        "description": "Support @LynnHurtak for Tampa City Council: https://t.co/W1qeY5G50u",
                        "followers_count": 117017
                    },
                    "retweet_count": 1359
                },
                {
                    "id": "1646409720427868161",
                    "url": "https://twitter.com/i/web/status/1646409720427868161",
                    "created_at": "Thu Apr 13 07:07:20 +0000 2023",
                    "full_text": "Elon Musk's “free-speech absolutism” was \"mostly code for a high tolerance for bigotry toward particular groups, a smoke screen that obscured an obvious hostility toward any speech that threatened his ability to make money.\" – @AdamSerwer \n\nhttps://t.co/fuJfmj0XXF",
                    "text": "Elon Musk's “free-speech absolutism” was \"mostly code for a high tolerance for bigotry toward particular groups, a smoke screen that obscured an obvious hostility toward any speech that threatened his ability to make money.\" – @AdamSerwer \n\nhttps://t.co/fuJfmj0XXF",
                    "place": null,
                    "user": {
                        "screen_name": "keithboykin",
                        "name": "Keith Boykin",
                        "id": "21728303",
                        "description": "Author of 6 books. Former White House aide. NBJC co-founder. TV Political Commentator. Film/TV producer. Harvard Law alum. Not subscribed to Twitter Blue.",
                        "followers_count": 248713
                    },
                    "retweet_count": 1013
                },
                {
                    "id": "1646622372756180994",
                    "url": "https://twitter.com/i/web/status/1646622372756180994",
                    "created_at": "Thu Apr 13 21:12:21 +0000 2023",
                    "full_text": "Artificial Intelligence artist Gokul Pillai shared pictures showing what billionaires would look like if they lived in slums. The post features Donald Trump, Bill Gates, Mukesh Ambani, Mark Zuckerberg, Warren Buffett, Jeff Bezos, and Elon Musk. \n\n📸: @withgokul\n.\n.\n.\n#AI… https://t.co/44aKkRWYdF",
                    "text": "Artificial Intelligence artist Gokul Pillai shared pictures showing what billionaires would look like if they lived in slums. The post features Donald Trump, Bill Gates, Mukesh Ambani, Mark Zuckerberg, Warren Buffett, Jeff Bezos, and Elon Musk. \n\n📸: @withgokul\n.\n.\n.\n#AI…",
                    "place": null,
                    "user": {
                        "screen_name": "TansuYegen",
                        "name": "Tansu YEĞEN",
                        "id": "94543804",
                        "description": "'Personal account' 🦋 Follow me for videos #technology #mobile #devops  #artificialIntelligence #viral #funny Author of the business book ‘Shine’",
                        "followers_count": 1331851
                    },
                    "retweet_count": 11
                },
                {
                    "id": "1646600183978033152",
                    "url": "https://twitter.com/i/web/status/1646600183978033152",
                    "created_at": "Thu Apr 13 19:44:10 +0000 2023",
                    "full_text": "BREAKING: In a desperate attempt to stop the exodus from Twitter to competitor Tribel, Elon Musk and Twitter permanently suspend @TribelOfficial, the official Twitter account of Tribel.\n\nA new analysis had just found that Tribel’s new app was the most promising Twitter…",
                    "text": "BREAKING: In a desperate attempt to stop the exodus from Twitter to competitor Tribel, Elon Musk and Twitter permanently suspend @TribelOfficial, the official Twitter account of Tribel.\n\nA new analysis had just found that Tribel’s new app was the most promising Twitter…",
                    "place": null,
                    "user": {
                        "screen_name": "OccupyDemocrats",
                        "name": "Occupy Democrats",
                        "id": "878284831",
                        "description": "Democratic political organization & news website. NY Times determined we dominated Trump on Facebook before his ban. Follow us on Tribel: https://t.co/PnDWCSckBD",
                        "followers_count": 537383
                    },
                    "retweet_count": 200
                },
                {
                    "id": "1646370651949907968",
                    "url": "https://twitter.com/i/web/status/1646370651949907968",
                    "created_at": "Thu Apr 13 04:32:06 +0000 2023",
                    "full_text": "Musk is going full Caligula over here https://t.co/v4TwkoAoV0",
                    "text": "Musk is going full Caligula over here",
                    "place": null,
                    "user": {
                        "screen_name": "CSMFHT",
                        "name": "Classical Studies Memes for Hellenistic Teens",
                        "id": "1230431996163178497",
                        "description": "We post memes from a variety of sources, related to Classics and the ancient world. Stick around and you might learn a thing or two! We ❤️ 🏳️‍🌈🏳️‍⚧️🤜🤛🏿🌍",
                        "followers_count": 480531
                    },
                    "retweet_count": 730
                },
                {
                    "id": "1646540527557308422",
                    "url": "https://twitter.com/i/web/status/1646540527557308422",
                    "created_at": "Thu Apr 13 15:47:07 +0000 2023",
                    "full_text": "Elon Musk Exposes Government-Funded Media’s Email After NPR And PBS Leave Twitter in a Huff\nhttps://t.co/31GmskB28b",
                    "text": "Elon Musk Exposes Government-Funded Media’s Email After NPR And PBS Leave Twitter in a Huff\nhttps://t.co/31GmskB28b",
                    "place": null,
                    "user": {
                        "screen_name": "gatewaypundit",
                        "name": "The Gateway Pundit",
                        "id": "19211550",
                        "description": "Where Hope Finally Made a Comeback",
                        "followers_count": 516942
                    },
                    "retweet_count": 708
                },
                {
                    "id": "1646522995832406023",
                    "url": "https://twitter.com/i/web/status/1646522995832406023",
                    "created_at": "Thu Apr 13 14:37:27 +0000 2023",
                    "full_text": "elon musk is building the ultimate one stop degen app 🤣 https://t.co/CmoupkpJgp",
                    "text": "elon musk is building the ultimate one stop degen app 🤣",
                    "place": null,
                    "user": {
                        "screen_name": "BillyM2k",
                        "name": "Shibetoshi Nakamoto",
                        "id": "30699048",
                        "description": "a sarcastic cartoon dog wearing glasses | substack: https://t.co/7vvN53C8Ii",
                        "followers_count": 2120239
                    },
                    "retweet_count": 382
                },
                {
                    "id": "1646573138929504262",
                    "url": "https://twitter.com/i/web/status/1646573138929504262",
                    "created_at": "Thu Apr 13 17:56:42 +0000 2023",
                    "full_text": "Elon Musk: “Look, COVID is no longer an issue,”.. “Does the BBC hold itself at all responsible for misinformation regarding masking and side-effects of vaccinations, and not reporting on that at all?” @elonmusk https://t.co/i0x0CjisdP",
                    "text": "Elon Musk: “Look, COVID is no longer an issue,”.. “Does the BBC hold itself at all responsible for misinformation regarding masking and side-effects of vaccinations, and not reporting on that at all?” @elonmusk https://t.co/i0x0CjisdP",
                    "place": null,
                    "user": {
                        "screen_name": "DrLoupis",
                        "name": "Dr. Anastasia Maria Loupis",
                        "id": "1446231057259433988",
                        "description": "1/2 Viking🇩🇰 1/2 Philosopher🇬🇷Doctor of Medicine (MD). Opinions are my own.",
                        "followers_count": 349518
                    },
                    "retweet_count": 1948
                },
                {
                    "id": "1646581314374565904",
                    "url": "https://twitter.com/i/web/status/1646581314374565904",
                    "created_at": "Thu Apr 13 18:29:12 +0000 2023",
                    "full_text": "Kennedy exposing Gates while Musk owns the platform to make sure he doesn’t get banned is what freedom looks like. https://t.co/6CXAXMNvp9",
                    "text": "Kennedy exposing Gates while Musk owns the platform to make sure he doesn’t get banned is what freedom looks like.",
                    "place": null,
                    "user": {
                        "screen_name": "realpeteyb123",
                        "name": "Petey B",
                        "id": "1503549194996527106",
                        "description": "🇺🇸 🇬🇷 Logical Human. Husband, Father of Triplets. Mind & Body Build, Business, Cook, Travel #bitcoin",
                        "followers_count": 46213
                    },
                    "retweet_count": 171
                },
                {
                    "id": "1646483251303796736",
                    "url": "https://twitter.com/i/web/status/1646483251303796736",
                    "created_at": "Thu Apr 13 11:59:31 +0000 2023",
                    "full_text": "In light of NPR leaving Twitter, I wanted to remind you that Elon Musk gets BILLIONS from U.S. taxpayers through SpaceX and Tesla. Calling NPR and PBS \"government-funded\" is wholly inaccurate. But calling Elon Musk \"government-funded\" is totally true.",
                    "text": "In light of NPR leaving Twitter, I wanted to remind you that Elon Musk gets BILLIONS from U.S. taxpayers through SpaceX and Tesla. Calling NPR and PBS \"government-funded\" is wholly inaccurate. But calling Elon Musk \"government-funded\" is totally true.",
                    "place": null,
                    "user": {
                        "screen_name": "EstherCinDC",
                        "name": "Esther Ciammachilli",
                        "id": "377108464",
                        "description": "“Euphorically, unapologetically gay” Morning Host/Anchor @wamu885 in D.C. 🇦🇸🇮🇹 She/Her. Some tweets are jokes and aren't meant to be taken seriously.",
                        "followers_count": 6848
                    },
                    "retweet_count": 253
                },
                {
                    "id": "1646591990568738816",
                    "url": "https://twitter.com/i/web/status/1646591990568738816",
                    "created_at": "Thu Apr 13 19:11:37 +0000 2023",
                    "full_text": "WOW! Elon Musk and Twitter just “permanently” suspended the Twitter account of my new Twitter competitor @TribelOfficial without any warning, explanation, or reason. \n\nHey @elonmusk, can you please explain to the Twitter community why you suspended Tribel’s account? You claim to…",
                    "text": "WOW! Elon Musk and Twitter just “permanently” suspended the Twitter account of my new Twitter competitor @TribelOfficial without any warning, explanation, or reason. \n\nHey @elonmusk, can you please explain to the Twitter community why you suspended Tribel’s account? You claim to…",
                    "place": null,
                    "user": {
                        "screen_name": "OmarRiverosays",
                        "name": "Omar Rivero",
                        "id": "1434023908370354177",
                        "description": "Founder of @OccupyDemocrats and @TribelOfficial. I make memes and tweets accompanied by my dog Simba 🐕. Follow me on Tribel: https://t.co/TFsLDsY9YO!",
                        "followers_count": 200776
                    },
                    "retweet_count": 692
                },
                {
                    "id": "1646550184946700294",
                    "url": "https://twitter.com/i/web/status/1646550184946700294",
                    "created_at": "Thu Apr 13 16:25:30 +0000 2023",
                    "full_text": "Turning AI-designed fashion into real clothing would be great",
                    "text": "Turning AI-designed fashion into real clothing would be great",
                    "place": null,
                    "user": {
                        "screen_name": "elonmusk",
                        "name": "Elon Musk",
                        "id": "44196397",
                        "description": "",
                        "followers_count": 134793009
                    },
                    "retweet_count": 4891
                },
                {
                    "id": "1646596647990820864",
                    "url": "https://twitter.com/i/web/status/1646596647990820864",
                    "created_at": "Thu Apr 13 19:30:07 +0000 2023",
                    "full_text": "NEW: Elon Musk didn’t pioneer the mass layoff or the celebrity CEO. Jack Welch did.\n\nThe CEO of General Electric is the reason companies off-shore jobs, do massive cost-cutting and layoffs, and pour all their profits into stock buybacks.\n\nHe invented the American CEO. https://t.co/WPUmudWe6R",
                    "text": "NEW: Elon Musk didn’t pioneer the mass layoff or the celebrity CEO. Jack Welch did.\n\nThe CEO of General Electric is the reason companies off-shore jobs, do massive cost-cutting and layoffs, and pour all their profits into stock buybacks.\n\nHe invented the American CEO.",
                    "place": null,
                    "user": {
                        "screen_name": "MorePerfectUS",
                        "name": "More Perfect Union",
                        "id": "1321935792416149505",
                        "description": "Media that builds power for working people. \n\nSend us stories/pitches: [email protected] \nVoicemail/text: 202-505-4556\nWork with us: [email protected]",
                        "followers_count": 206730
                    },
                    "retweet_count": 167
                }
            ],
            "cursor": "DAACCgACFtn66hQAJxAKAAMW2frqE__Y8AgABAAAAAELAAUAAADwRW1QQzZ3QUFBZlEvZ0dKTjB2R3AvQUFBQUJRV002L0JUVmZBQVJiWnI0WndsOEFDRnRueUdwaGFnQVlXMmQ2dy85cGdBQmJacitMVlZuQUdGdG00cTE2YUVBWVcyZmtuK1JlZ0FCYlp6Ni9LMTRBVUZ0bXNUbDhXY0FFVzJlWWtyUnFBQUJiWitsTG5WOUFDRnRuQ1ZsOWFrQUFXMlovdzZScEFCeGJaMVB0QkY0QVFGdGxjOVZBWHNBRVcyWHZMS3BmUUFCYlpPT3JzMm5BQkZ0a1ZZcFlhUUFBVzJlTHRZOWVBQUJiWnpZdkNsOUFHCAAGAAAAAAgABwAAAAAMAAgKAAEW2RVilhpAAAAAAA"
        }