Get a post's numbers
curl --request GET \
--url https://api.solaraai.com/api/v1/performance/posts/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.solaraai.com/api/v1/performance/posts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.solaraai.com/api/v1/performance/posts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"platforms": [
{
"fetched_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"made_with_solara": true,
"media_type": "video",
"platform": "youtube",
"published_at": "2023-11-07T05:31:56Z",
"snapshots": [
{
"captured_at": "2023-11-07T05:31:56Z",
"values": [
{
"metric": "views",
"value": 123,
"missing": "not_shared"
}
]
}
],
"status": "ok",
"values": [
{
"metric": "views",
"value": 123,
"missing": "not_shared"
}
],
"account_name": "<string>",
"caption": "<string>",
"content_missing": "deleted_by_rule",
"daily_views": [
{
"at": "2023-11-07T05:31:56Z",
"day": "2023-12-25",
"views": 123
}
],
"permalink": "<string>",
"post_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retention": {
"after_3s": 123,
"avg_view_ratio": 123,
"avg_view_s": 123,
"duration_s": 123,
"kind": "curve",
"skip_rate": 123,
"status": "ready",
"watched_to_end": 123,
"curve": {
"from": 123,
"points": [
123
]
}
},
"thumbnail_url": "<string>",
"video_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}{
"code": "invalid_credentials",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Performance
Get a post's numbers
Solara AI API: The post asked and the same post on its other platforms, each with its own metrics and every read (lifetime totals at each check). 404 for another workspace’s post; 403 post_analytics_withheld for a YouTube or Threads post.
Permission: Read (read).
GET
/
api
/
v1
/
performance
/
posts
/
{id}
Get a post's numbers
curl --request GET \
--url https://api.solaraai.com/api/v1/performance/posts/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.solaraai.com/api/v1/performance/posts/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.solaraai.com/api/v1/performance/posts/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"platforms": [
{
"fetched_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"made_with_solara": true,
"media_type": "video",
"platform": "youtube",
"published_at": "2023-11-07T05:31:56Z",
"snapshots": [
{
"captured_at": "2023-11-07T05:31:56Z",
"values": [
{
"metric": "views",
"value": 123,
"missing": "not_shared"
}
]
}
],
"status": "ok",
"values": [
{
"metric": "views",
"value": 123,
"missing": "not_shared"
}
],
"account_name": "<string>",
"caption": "<string>",
"content_missing": "deleted_by_rule",
"daily_views": [
{
"at": "2023-11-07T05:31:56Z",
"day": "2023-12-25",
"views": 123
}
],
"permalink": "<string>",
"post_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retention": {
"after_3s": 123,
"avg_view_ratio": 123,
"avg_view_s": 123,
"duration_s": 123,
"kind": "curve",
"skip_rate": 123,
"status": "ready",
"watched_to_end": 123,
"curve": {
"from": 123,
"points": [
123
]
}
},
"thumbnail_url": "<string>",
"video_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}{
"code": "invalid_credentials",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}