Skip to main content
GET
/
v1
/
twitter
/
stream
/
filter-rules
/
{rule_id}
Get filter rule
curl --request GET \
  --url https://scrapebadger.com/v1/twitter/stream/filter-rules/{rule_id} \
  --header 'x-api-key: <api-key>'
{
  "id": "<string>",
  "tag": "AI news tracker",
  "query": "(\"artificial intelligence\" OR \"machine learning\") min_faves:100 lang:en",
  "interval_seconds": 60,
  "max_results_per_poll": 20,
  "status": "active",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "status_reason": "<string>",
  "webhook_url": "<string>",
  "webhook_secret_set": true,
  "credits_per_rule_per_day": 123,
  "pricing_tier": "1-minute"
}

Authorizations

x-api-key
string
header
required

Your ScrapeBadger API key. You can find this in your dashboard at https://scrapebadger.com/dashboard/api-keys.

Path Parameters

rule_id
string
required

The unique ID of the filter rule.

Response

Successfully retrieved filter rule.

Filter rule configuration and status.

id
string
required

Unique filter rule identifier.

tag
string
required

Human-readable label for the rule.

Example:

"AI news tracker"

query
string
required

Twitter Advanced Search query.

Example:

"(\"artificial intelligence\" OR \"machine learning\") min_faves:100 lang:en"

interval_seconds
number
required

Polling interval in seconds.

Example:

60

max_results_per_poll
integer
required

Maximum number of tweets returned per poll cycle.

Example:

20

status
enum<string>
required

Current status of the rule. Suspended indicates the rule was auto-paused due to insufficient credits.

Available options:
active,
paused,
suspended
created_at
string<date-time>
required

Timestamp when the rule was created.

updated_at
string<date-time>
required

Timestamp when the rule was last updated.

status_reason
string | null

Reason for the current status, if applicable.

webhook_url
string | null

HTTPS URL receiving webhook deliveries.

webhook_secret_set
boolean

Whether a webhook secret is configured. The actual secret is never returned.

credits_per_rule_per_day
number

Credit cost per day for this rule at the current interval.

pricing_tier
string

Current pricing tier label based on interval.

Example:

"1-minute"