Query Syntax
| Operator | Example | Description |
|---|---|---|
from: | from:NASA | Tweets from a user |
to: | to:NASA | Tweets replying to a user |
lang: | lang:es | Filter by language |
since: | since:2026-01-01 | Tweets after date |
until: | until:2026-02-01 | Tweets before date |
OR | cat OR dog | Either term |
- | cat -dog | Exclude term |
"" | "exact phrase" | Exact match |
min_faves: | min_faves:100 | Minimum likes |
filter:media | filter:media | Only with media |
-filter:retweets | Exclude retweets |
Error Handling
- Rate limit (429): Retries with exponential backoff
- Credits exhausted (402): Returns partial data with warning (W41)
- Timeout: Returns partial data with warning (W41)
Usage
The following example shows how the step can be used in a recipe.Examples
Examples
- Example 1
- Signature
Fetch tweets about climate change in English
Inputs & Outputs
The following are the inputs expected by the step and the outputs it produces. These are generally columns (ds.first_name), datasets (ds or ds[["first_name", "last_name"]]) or models (referenced
by name e.g. "churn-clf").
Inputs
Inputs
Outputs
Outputs
The dataset containing tweets from the search.
Configuration
The following parameters can be used to configure the behaviour of the step by including them in a json object as the last “input” to the step, i.e.step(..., {"param": "value", ...}) -> (output).
Parameters
Parameters
TwitterAPI.io Integration.
ID of your TwitterAPI.io integration containing the API key.
Search Query.
Twitter advanced search query. Supports operators: from:, to:, lang:,
since:YYYY-MM-DD, until:YYYY-MM-DD, OR, -, “exact phrase”,
min_replies:, min_faves:, filter:links, filter:media.
Reference: https://github.com/igorbrigadir/twitter-advanced-search.
Sort Order.
Sort order. “Latest” for chronological, “Top” for most relevant.Values must be one of the following:
LatestTop
Max Tweets.
Maximum number of tweets to fetch. Leave empty to fetch all matching tweets.
Cost: ~15 credits per tweet ($0.15 per 1,000 tweets).
Timeout.
Maximum seconds to wait for the search to complete.