Skip to main content
POST
/
v1
/
twitter
/
stream
/
filter-rules
/
validate
Validate filter rule query
curl --request POST \
  --url https://scrapebadger.com/v1/twitter/stream/filter-rules/validate \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "query": "from:elonmusk min_faves:100"
}
'
{
  "valid": true,
  "query": "<string>",
  "error": "<string>"
}

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.

Body

application/json

Query to validate.

query
string
required

Twitter Advanced Search query to validate.

Example:

"from:elonmusk min_faves:100"

Response

Validation result.

valid
boolean

Whether the query syntax is valid.

query
string

The query that was validated.

error
string | null

Error message if the query is invalid.