Skip to content

Docs / All tools / Base tools

twitter.search_browser

Search posts using the connected X account.

2 credits. Per search. 0 when there is no result.

Example prompt

Send this to your AI app when Heelo is connected:

Search trending posts about AI agents on Twitter

Input fields

FieldTypeDescription
queryRequiredstringNatural-language search query for Twitter/X posts

Output fields

The fields in data when status is success.

FieldType
tweetsarray of object
total_foundinteger
search_querystring

Code

The call with the input fields that the tool needs. Set HEELO_API_KEY to your API key.

import os
import requests

response = requests.post(
    "https://toolsprimitives.uk/v1/tools/twitter.search_browser/invoke",
    headers={"Authorization": f"Bearer {os.environ['HEELO_API_KEY']}"},
    json={"input": {
        "query": "Search trending posts about AI agents on Twitter",
    }},
    timeout=120,
)
response.raise_for_status()
print(response.json())