Use Case
- Export all chat messages collected by Flare in the last 6 hours that match the
fraudkeyword. - Save our last page cursor so that we can resume fetching results in a future execution.
Body Parameters
To achieve the desired results, the following body parameters will be used:| Parameter | Value | Justification |
|---|---|---|
| query.query_string | fraud | The keyword we are looking for. |
| filter.types | chat_message | Retrieve only the chat_message events. |
| order | asc | Retrieve results in ascending order so that we can resume fetching in the future. |
| filter.estimated_created_at.gte | <from_date> | Replace <from_date> with a timestamp that corresponds to 6 hours that we can fetch all results until the current time. |
Query string examples
Global search supports the Lucene Query Syntax, which supports, among other things, boolean operators and regexes. Here are some common example queries.| Description | Example |
|---|---|
| Search for a telegram channel named “Best Telegram Source” | conversation_name:“Best Telegram Source” |
Paging
The search endpoint uses parameters that match the Flare standard paging pattern .Fetching new results in future executions
It is possible to save thenext in a database and use it to resume fetching new results in the future.
However, it is important that future requests use the same parameters for everything else but next. Even the time filter.
End-to-End Examples
These are end-to-end examples in various programming languages.Python SDK Example
Python SDK Example