curl --request GET \
--url https://beta.creatorcore.co/api/v2/posts/{id}/history \
--header 'Authorization: Bearer <token>' \
--header 'X-CreatorCore-Organization-Id: <api-key>'const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'X-CreatorCore-Organization-Id': '<api-key>'}
};
fetch('https://beta.creatorcore.co/api/v2/posts/{id}/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://beta.creatorcore.co/api/v2/posts/{id}/history"
headers = {
"Authorization": "Bearer <token>",
"X-CreatorCore-Organization-Id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text){
"success": true,
"history": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"postId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"linkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from": "<string>",
"to": "<string>",
"granularity": "15m",
"metrics": [
"views"
],
"points": [
{
"time": "<string>",
"views": 123,
"likes": 123,
"comments": 123,
"shares": 123,
"saves": 123
}
]
}
}Get a post's metric history
Returns views, likes, comments, shares, and saves over time for a post linked to your organization, one point per bucket. The id may be the post id or your organization’s link id. Returns 404 if the post isn’t linked to your organization. Granularity is the finest bucket width available, not a measurement per bucket: posts are measured on their refresh schedule, so many points carry the previous value forward. Returns 400 if the granularity isn’t available for how old from is (the error names the earliest from it accepts and the granularities that work), or if the request would return more than 10,000 points. Returns 503 (query_timeout) if the read takes too long; retry later with a smaller request.
curl --request GET \
--url https://beta.creatorcore.co/api/v2/posts/{id}/history \
--header 'Authorization: Bearer <token>' \
--header 'X-CreatorCore-Organization-Id: <api-key>'const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'X-CreatorCore-Organization-Id': '<api-key>'}
};
fetch('https://beta.creatorcore.co/api/v2/posts/{id}/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://beta.creatorcore.co/api/v2/posts/{id}/history"
headers = {
"Authorization": "Bearer <token>",
"X-CreatorCore-Organization-Id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text){
"success": true,
"history": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"postId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"linkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from": "<string>",
"to": "<string>",
"granularity": "15m",
"metrics": [
"views"
],
"points": [
{
"time": "<string>",
"views": 123,
"likes": 123,
"comments": 123,
"shares": 123,
"saves": 123
}
]
}
}Authorizations
Query Parameters
Bucket width: the finest detail you can ask for, not a promise of a new measurement in every bucket. Posts are measured on their own refresh schedule (every 48 hours is common) and older history is thinned, so many points carry the previous value forward. Which values are available depends on how long ago from is, because finer history is kept for a limited time: up to 15m when from is within the last day; up to 1h, 6h, 12h within 21 days; up to 24h, 3d, 6d, 7d, 14d, 15d within 180 days; 30d within 1095 days. A value that isn't available for from returns 400 with the earliest from it accepts and the granularities that work. Buckets are capped at 10,000 per request; an explicit granularity over the cap returns 400. Defaults to the finest available granularity that fits the cap.
15m, 1h, 6h, 12h, 24h, 3d, 6d, 7d, 14d, 15d, 30d Was this page helpful?