This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves the number of published posts per month within a specified time range.
The time range is set using the rangeStart
and months
properties.
The time range always starts on the 1st day of the month set in rangeStart
and
includes the number of months
following rangeStart
.
For example, if rangeStart
is set to '2022-03-13'
and months
is set to 4
,
the time range will be from '2022-03-01'
until '2022-06-30'
. The time range always ends on the last day of the month.
Note: If there are no published posts in a month within the time range, that month is not included in the response. For example, let's say a blog has 0
posts dated in February 2022. If rangeStart
is set to '2022-01-01'
and months
is set to 3
, the response includes postCount
values for January and March, but not February.
Start of time range to return, in ISO 8601 date and time format.
Deprecated. Use months
instead.
This property will be removed on June 30, 2023.
Non-inclusive end of time range to return, in ISO 8601 date and time format.
Order of returned results.
OLDEST
: posts by date in ascending order.NEWEST
: posts by date in descending order.Default: OLDEST
Number of months to include in response.
Language filter.
2-or-4-letter language code in IETF BCP 47 language tag format. Pass a language to only receive the period post count for that specified language.
Time zone to use when calculating the start of the month.
UTC timezone offset format. For example, New York time zone is -05
.
List of published post counts by month.
curl --request POST 'http://social-blog.wix.com/_api/communities-blog-node-api/v2/stats/posts/count' \
--header 'Authorization: <AUTH> \
--header 'Content-Type: application/json' \
--data-raw '{
"rangeStart": "2018-11-01T00:00:00Z",
"order": "OLDEST",
"months": 3,
"language": "en"
}'
{
"stats": [
{
"periodStart": "2018-11-01T00:00:00.000Z",
"postCount": 1
},
{
"periodStart": "2018-12-01T00:00:00.000Z",
"postCount": 2
},
{
"periodStart": "2019-01-01T00:00:00.000Z",
"postCount": 2
}
]
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.