Appearance
post/count
Counts posts matching a filter set.
Authentication
Authentication is required. See Authentication.
Permissions
Authentication is required.
Method and path
POST /post/count
Request headers
| Header | Required | Description |
|---|---|---|
X-Api-Key or X_API_KEY | yes | API key. |
Content-Type | yes | application/json. |
Request body
Uses the same filter model as post/search.
| Field | Type | Required | Description |
|---|---|---|---|
project_id | integer | yes | Project identifier. |
starttimestamp | integer | string | no |
endtimestamp | integer | string | no |
date.start / date.end | string | no | Date shortcut (YYYY-MM-DD). |
interval | integer | no | Relative date window in days. |
platform | string | array<string> | no |
sentiment | string | no | Sentiment filter. |
priority | integer | array<integer> | no |
text_search | string | no | Full text query. |
tags / tags_operator | array<mixed>/string | no | Tag filter and operator. |
jobs / jobs_operator | array<mixed>/string | no | Job filter and operator. |
orderBy | string | no | Accepted but not relevant for count semantics. |
orderDir | string | no | Accepted but not relevant for count semantics. |
Example request
bash
curl -X POST "$SIGNAL_API_BASE_URL/post/count" \
-H "X-Api-Key: $SIGNAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"project_id": 123,
"starttimestamp": 1715385600,
"endtimestamp": 1715472000
}'json
{
"project_id": 123,
"starttimestamp": 1715385600,
"endtimestamp": 1715472000
}Example response
json
{
"total": "<total_matches>"
}Response fields
| Field | Type | Description |
|---|---|---|
total | integer | Total number of matching posts. |