Tweets
Search Tweets
Search tweets by query.
GET
/
twitter
/
v1
/
tweets
/
search
Search Tweets
curl --request GET \
--url https://api.openbits.ai/twitter/v1/tweets/search \
--header 'x-api-key: <api-key>'import requests
url = "https://api.openbits.ai/twitter/v1/tweets/search"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.openbits.ai/twitter/v1/tweets/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openbits.ai/twitter/v1/tweets/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.openbits.ai/twitter/v1/tweets/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.openbits.ai/twitter/v1/tweets/search")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openbits.ai/twitter/v1/tweets/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "1890000000000000001",
"text": "The future is electric",
"authorId": "44196397",
"createdAt": "2026-03-20T14:30:00.000Z",
"url": "https://x.com/elonmusk/status/1890000000000000001",
"language": "en",
"conversationId": "1890000000000000001",
"inReplyTo": null,
"metrics": {
"retweets": 15000,
"replies": 8000,
"likes": 120000,
"quotes": 3000,
"views": 50000000,
"bookmarks": 5000
},
"entities": {
"hashtags": [],
"urls": [],
"mentions": []
},
"media": [],
"quotedTweetId": null,
"retweetedTweetId": null
}
],
"hasNextPage": true,
"nextCursor": "DAADDAABCgABF...",
"requestId": "clxyz123abc",
"cached": false
}
Cost: 100 credits per call
Parameters
string
required
Search query. Example:
bitcoin.string
Pagination cursor from a previous response’s
nextCursor. Omit for the first page.number
Number of results per page (1-100, default 20).
Response
Tweet[]
Show Tweet
Show Tweet
string
Tweet ID.
string
Full tweet text.
string
ID of the tweet author.
string
Timestamp (ISO 8601).
string
Permalink URL to the tweet.
string | null
Detected language code.
string | null
ID of the conversation thread.
object | null
{ tweetId, userId } if this is a reply, otherwise null.object
object
array
string | null
ID of quoted tweet.
string | null
ID of retweeted tweet.
boolean
Whether more results are available.
string | null
Cursor for the next page. Pass as
cursor query param.string
Unique request identifier.
boolean
Whether the response was served from cache.
{
"items": [
{
"id": "1890000000000000001",
"text": "The future is electric",
"authorId": "44196397",
"createdAt": "2026-03-20T14:30:00.000Z",
"url": "https://x.com/elonmusk/status/1890000000000000001",
"language": "en",
"conversationId": "1890000000000000001",
"inReplyTo": null,
"metrics": {
"retweets": 15000,
"replies": 8000,
"likes": 120000,
"quotes": 3000,
"views": 50000000,
"bookmarks": 5000
},
"entities": {
"hashtags": [],
"urls": [],
"mentions": []
},
"media": [],
"quotedTweetId": null,
"retweetedTweetId": null
}
],
"hasNextPage": true,
"nextCursor": "DAADDAABCgABF...",
"requestId": "clxyz123abc",
"cached": false
}
Was this page helpful?
⌘I
Search Tweets
curl --request GET \
--url https://api.openbits.ai/twitter/v1/tweets/search \
--header 'x-api-key: <api-key>'import requests
url = "https://api.openbits.ai/twitter/v1/tweets/search"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.openbits.ai/twitter/v1/tweets/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.openbits.ai/twitter/v1/tweets/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.openbits.ai/twitter/v1/tweets/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.openbits.ai/twitter/v1/tweets/search")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openbits.ai/twitter/v1/tweets/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "1890000000000000001",
"text": "The future is electric",
"authorId": "44196397",
"createdAt": "2026-03-20T14:30:00.000Z",
"url": "https://x.com/elonmusk/status/1890000000000000001",
"language": "en",
"conversationId": "1890000000000000001",
"inReplyTo": null,
"metrics": {
"retweets": 15000,
"replies": 8000,
"likes": 120000,
"quotes": 3000,
"views": 50000000,
"bookmarks": 5000
},
"entities": {
"hashtags": [],
"urls": [],
"mentions": []
},
"media": [],
"quotedTweetId": null,
"retweetedTweetId": null
}
],
"hasNextPage": true,
"nextCursor": "DAADDAABCgABF...",
"requestId": "clxyz123abc",
"cached": false
}