Skip to content

Create count

Endpoint: {{apiRoute}}/reports/twitter-count/:type

Parameters:

  • type: the type of the report to create. It can be:
    • 7-day: the report will give you the number of posts (tweets) of any given query in the last 7 days.
    • historical: the report will give you the number of posts (tweets) of any given query without time limit.

What it does: This endpoint will give you the number of posts (tweets) of any given query in the last 7 days.

Limit of posts: no limit.

Payload Example:

{
    "query":{
        "raw":"(Osasuna OR #Osasuna) -@RealMadrid lang:en"
    }
}
Check Creating a report to learn more about how to build a query

After you run the query and the count is generated you will get a "resourceId", to get the number of posts (tweets) you will need to execute the action "Get report stats" (check "Report Actions"). If you run the action too early, when the count is not generated yet, you will get an error.