/twitter/search/posts
curl --request POST \
--url https://api.anysite.io/api/twitter/search/posts \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"count": 123,
"timeout": 300,
"query": "",
"exact_phrase": "",
"any_of_these_words": [
"<string>"
],
"none_of_these_words": [
"<string>"
],
"these_hashtags": [
"<string>"
],
"from_these_accounts": [
"<string>"
],
"to_these_accounts": [
"<string>"
],
"mentioning_these_accounts": [
"<string>"
],
"min_replies": 123,
"min_likes": 123,
"min_retweets": 123,
"from_date": 1136073601,
"to_date": 1136073601,
"search_type": "Top",
"media_type": "any"
}
'import requests
url = "https://api.anysite.io/api/twitter/search/posts"
payload = {
"count": 123,
"timeout": 300,
"query": "",
"exact_phrase": "",
"any_of_these_words": ["<string>"],
"none_of_these_words": ["<string>"],
"these_hashtags": ["<string>"],
"from_these_accounts": ["<string>"],
"to_these_accounts": ["<string>"],
"mentioning_these_accounts": ["<string>"],
"min_replies": 123,
"min_likes": 123,
"min_retweets": 123,
"from_date": 1136073601,
"to_date": 1136073601,
"search_type": "Top",
"media_type": "any"
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
count: 123,
timeout: 300,
query: '',
exact_phrase: '',
any_of_these_words: ['<string>'],
none_of_these_words: ['<string>'],
these_hashtags: ['<string>'],
from_these_accounts: ['<string>'],
to_these_accounts: ['<string>'],
mentioning_these_accounts: ['<string>'],
min_replies: 123,
min_likes: 123,
min_retweets: 123,
from_date: 1136073601,
to_date: 1136073601,
search_type: 'Top',
media_type: 'any'
})
};
fetch('https://api.anysite.io/api/twitter/search/posts', 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.anysite.io/api/twitter/search/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'count' => 123,
'timeout' => 300,
'query' => '',
'exact_phrase' => '',
'any_of_these_words' => [
'<string>'
],
'none_of_these_words' => [
'<string>'
],
'these_hashtags' => [
'<string>'
],
'from_these_accounts' => [
'<string>'
],
'to_these_accounts' => [
'<string>'
],
'mentioning_these_accounts' => [
'<string>'
],
'min_replies' => 123,
'min_likes' => 123,
'min_retweets' => 123,
'from_date' => 1136073601,
'to_date' => 1136073601,
'search_type' => 'Top',
'media_type' => 'any'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/twitter/search/posts"
payload := strings.NewReader("{\n \"count\": 123,\n \"timeout\": 300,\n \"query\": \"\",\n \"exact_phrase\": \"\",\n \"any_of_these_words\": [\n \"<string>\"\n ],\n \"none_of_these_words\": [\n \"<string>\"\n ],\n \"these_hashtags\": [\n \"<string>\"\n ],\n \"from_these_accounts\": [\n \"<string>\"\n ],\n \"to_these_accounts\": [\n \"<string>\"\n ],\n \"mentioning_these_accounts\": [\n \"<string>\"\n ],\n \"min_replies\": 123,\n \"min_likes\": 123,\n \"min_retweets\": 123,\n \"from_date\": 1136073601,\n \"to_date\": 1136073601,\n \"search_type\": \"Top\",\n \"media_type\": \"any\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/twitter/search/posts")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"count\": 123,\n \"timeout\": 300,\n \"query\": \"\",\n \"exact_phrase\": \"\",\n \"any_of_these_words\": [\n \"<string>\"\n ],\n \"none_of_these_words\": [\n \"<string>\"\n ],\n \"these_hashtags\": [\n \"<string>\"\n ],\n \"from_these_accounts\": [\n \"<string>\"\n ],\n \"to_these_accounts\": [\n \"<string>\"\n ],\n \"mentioning_these_accounts\": [\n \"<string>\"\n ],\n \"min_replies\": 123,\n \"min_likes\": 123,\n \"min_retweets\": 123,\n \"from_date\": 1136073601,\n \"to_date\": 1136073601,\n \"search_type\": \"Top\",\n \"media_type\": \"any\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/twitter/search/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"count\": 123,\n \"timeout\": 300,\n \"query\": \"\",\n \"exact_phrase\": \"\",\n \"any_of_these_words\": [\n \"<string>\"\n ],\n \"none_of_these_words\": [\n \"<string>\"\n ],\n \"these_hashtags\": [\n \"<string>\"\n ],\n \"from_these_accounts\": [\n \"<string>\"\n ],\n \"to_these_accounts\": [\n \"<string>\"\n ],\n \"mentioning_these_accounts\": [\n \"<string>\"\n ],\n \"min_replies\": 123,\n \"min_likes\": 123,\n \"min_retweets\": 123,\n \"from_date\": 1136073601,\n \"to_date\": 1136073601,\n \"search_type\": \"Top\",\n \"media_type\": \"any\"\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"url": "<string>",
"text": "<string>",
"@type": "TwitterPost",
"created_at": 123,
"user": {
"rest_id": "<string>",
"name": "<string>",
"alias": "<string>",
"url": "<string>",
"@type": "TwitterPostUser",
"image": "<string>",
"verified": false,
"verified_type": "<string>",
"is_blue_verified": false
},
"retweet_count": 0,
"favorite_count": 0,
"reply_count": 0,
"quote_count": 0,
"view_count": "<string>",
"is_retweet": false,
"retweeted": null,
"is_quote": false,
"quoted": null,
"in_reply_to_status_id": "<string>",
"in_reply_to_user_id": "<string>",
"in_reply_to_screen_name": "<string>",
"lang": "<string>",
"source": "<string>",
"possibly_sensitive": false,
"medias": [],
"urls": [],
"hashtags": [],
"user_mentions": [],
"card": {
"@type": "TwitterCardInfo",
"domain": "<string>",
"vanity_url": "<string>",
"image_url": "<string>",
"url": "<string>",
"card_type": "<string>"
},
"poll": {
"@type": "TwitterPoll",
"choices": [],
"ended_at": 123,
"duration_minutes": 0,
"is_final": false,
"last_updated_at": 123
}
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Twitter Search
/twitter/search/posts
Twitter Search Tweets
Price: 1 credit per 20 results
POST
/
api
/
twitter
/
search
/
posts
/twitter/search/posts
curl --request POST \
--url https://api.anysite.io/api/twitter/search/posts \
--header 'Content-Type: application/json' \
--header 'access-token: <api-key>' \
--data '
{
"count": 123,
"timeout": 300,
"query": "",
"exact_phrase": "",
"any_of_these_words": [
"<string>"
],
"none_of_these_words": [
"<string>"
],
"these_hashtags": [
"<string>"
],
"from_these_accounts": [
"<string>"
],
"to_these_accounts": [
"<string>"
],
"mentioning_these_accounts": [
"<string>"
],
"min_replies": 123,
"min_likes": 123,
"min_retweets": 123,
"from_date": 1136073601,
"to_date": 1136073601,
"search_type": "Top",
"media_type": "any"
}
'import requests
url = "https://api.anysite.io/api/twitter/search/posts"
payload = {
"count": 123,
"timeout": 300,
"query": "",
"exact_phrase": "",
"any_of_these_words": ["<string>"],
"none_of_these_words": ["<string>"],
"these_hashtags": ["<string>"],
"from_these_accounts": ["<string>"],
"to_these_accounts": ["<string>"],
"mentioning_these_accounts": ["<string>"],
"min_replies": 123,
"min_likes": 123,
"min_retweets": 123,
"from_date": 1136073601,
"to_date": 1136073601,
"search_type": "Top",
"media_type": "any"
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
count: 123,
timeout: 300,
query: '',
exact_phrase: '',
any_of_these_words: ['<string>'],
none_of_these_words: ['<string>'],
these_hashtags: ['<string>'],
from_these_accounts: ['<string>'],
to_these_accounts: ['<string>'],
mentioning_these_accounts: ['<string>'],
min_replies: 123,
min_likes: 123,
min_retweets: 123,
from_date: 1136073601,
to_date: 1136073601,
search_type: 'Top',
media_type: 'any'
})
};
fetch('https://api.anysite.io/api/twitter/search/posts', 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.anysite.io/api/twitter/search/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'count' => 123,
'timeout' => 300,
'query' => '',
'exact_phrase' => '',
'any_of_these_words' => [
'<string>'
],
'none_of_these_words' => [
'<string>'
],
'these_hashtags' => [
'<string>'
],
'from_these_accounts' => [
'<string>'
],
'to_these_accounts' => [
'<string>'
],
'mentioning_these_accounts' => [
'<string>'
],
'min_replies' => 123,
'min_likes' => 123,
'min_retweets' => 123,
'from_date' => 1136073601,
'to_date' => 1136073601,
'search_type' => 'Top',
'media_type' => 'any'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.anysite.io/api/twitter/search/posts"
payload := strings.NewReader("{\n \"count\": 123,\n \"timeout\": 300,\n \"query\": \"\",\n \"exact_phrase\": \"\",\n \"any_of_these_words\": [\n \"<string>\"\n ],\n \"none_of_these_words\": [\n \"<string>\"\n ],\n \"these_hashtags\": [\n \"<string>\"\n ],\n \"from_these_accounts\": [\n \"<string>\"\n ],\n \"to_these_accounts\": [\n \"<string>\"\n ],\n \"mentioning_these_accounts\": [\n \"<string>\"\n ],\n \"min_replies\": 123,\n \"min_likes\": 123,\n \"min_retweets\": 123,\n \"from_date\": 1136073601,\n \"to_date\": 1136073601,\n \"search_type\": \"Top\",\n \"media_type\": \"any\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/twitter/search/posts")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"count\": 123,\n \"timeout\": 300,\n \"query\": \"\",\n \"exact_phrase\": \"\",\n \"any_of_these_words\": [\n \"<string>\"\n ],\n \"none_of_these_words\": [\n \"<string>\"\n ],\n \"these_hashtags\": [\n \"<string>\"\n ],\n \"from_these_accounts\": [\n \"<string>\"\n ],\n \"to_these_accounts\": [\n \"<string>\"\n ],\n \"mentioning_these_accounts\": [\n \"<string>\"\n ],\n \"min_replies\": 123,\n \"min_likes\": 123,\n \"min_retweets\": 123,\n \"from_date\": 1136073601,\n \"to_date\": 1136073601,\n \"search_type\": \"Top\",\n \"media_type\": \"any\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anysite.io/api/twitter/search/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"count\": 123,\n \"timeout\": 300,\n \"query\": \"\",\n \"exact_phrase\": \"\",\n \"any_of_these_words\": [\n \"<string>\"\n ],\n \"none_of_these_words\": [\n \"<string>\"\n ],\n \"these_hashtags\": [\n \"<string>\"\n ],\n \"from_these_accounts\": [\n \"<string>\"\n ],\n \"to_these_accounts\": [\n \"<string>\"\n ],\n \"mentioning_these_accounts\": [\n \"<string>\"\n ],\n \"min_replies\": 123,\n \"min_likes\": 123,\n \"min_retweets\": 123,\n \"from_date\": 1136073601,\n \"to_date\": 1136073601,\n \"search_type\": \"Top\",\n \"media_type\": \"any\"\n}"
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"url": "<string>",
"text": "<string>",
"@type": "TwitterPost",
"created_at": 123,
"user": {
"rest_id": "<string>",
"name": "<string>",
"alias": "<string>",
"url": "<string>",
"@type": "TwitterPostUser",
"image": "<string>",
"verified": false,
"verified_type": "<string>",
"is_blue_verified": false
},
"retweet_count": 0,
"favorite_count": 0,
"reply_count": 0,
"quote_count": 0,
"view_count": "<string>",
"is_retweet": false,
"retweeted": null,
"is_quote": false,
"quoted": null,
"in_reply_to_status_id": "<string>",
"in_reply_to_user_id": "<string>",
"in_reply_to_screen_name": "<string>",
"lang": "<string>",
"source": "<string>",
"possibly_sensitive": false,
"medias": [],
"urls": [],
"hashtags": [],
"user_mentions": [],
"card": {
"@type": "TwitterCardInfo",
"domain": "<string>",
"vanity_url": "<string>",
"image_url": "<string>",
"url": "<string>",
"card_type": "<string>"
},
"poll": {
"@type": "TwitterPoll",
"choices": [],
"ended_at": 123,
"duration_minutes": 0,
"is_final": false,
"last_updated_at": 123
}
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
API token from the dashboard
Headers
Body
application/json
Required range:
20 <= x <= 1500Available options:
Arabic, Arabic (Feminine), Bangla, Basque, Bulgarian, Catalan, Croatian, Czech, Danish, Dutch, English, Finnish, French, German, Greek, Gujarati, Hebrew, Hindi, Hungarian, Indonesian, Italian, Japanese, Kannada, Korean, Marathi, Norwegian, Persian, Polish, Portuguese, Romanian, Russian, Serbian, Simplified Chinese, Slovak, Spanish, Swedish, Tamil, Thai, Traditional Chinese, Turkish, Ukrainian, Urdu, Vietnamese Required range:
x > 1136073600Required range:
x > 1136073600Available options:
Top, Latest, Media Available options:
any, images, videos Response
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I