Skip to main content
PATCH
Update filter rule

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.

Body

application/json

Fields to update on the filter rule.

tag
string

Updated label for the filter rule.

Required string length: 1 - 100
query
string

Updated Twitter Advanced Search query.

Required string length: 1 - 1024
interval_seconds
number

Updated polling interval in seconds.

Required range: 0.1 <= x <= 86400
max_results_per_poll
integer

Updated maximum results per poll cycle.

Required range: 1 <= x <= 100
status
enum<string>

Set rule status. Use "paused" to stop polling and "active" to resume.

Available options:
active,
paused
webhook_url
string | null

Updated webhook URL. Set to null to remove webhook delivery.

webhook_secret
string | null

Updated webhook secret. Set to null to remove.

Response

Filter rule updated successfully.

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"