アナリティクス API
アナリティクス API を使用すると、接続された SNS アカウント全体のマルチチャネル・パフォーマンスデータ、フォロワー履歴、および投稿エンゲージメント指標へのプログラムによるアクセスが可能になります。
📌 エンドポイント
Section titled “📌 エンドポイント”| メソッド | パス | 説明 | 必要なスコープ |
|---|---|---|---|
GET | /v1/brand/analytics | 時間範囲、プラットフォーム、または接続による詳細な指標の照会 | analytics:read または * |
GET | /v1/brand/analytics/overview | 全ブランドチャネルにおける直近 30 日間のクイックサマリー | analytics:read または * |
📊 詳細アナリティクス (GET /v1/brand/analytics)
Section titled “📊 詳細アナリティクス (GET /v1/brand/analytics)”フィルタ条件に基づいて、集計された指標およびチャネルごとの指標を照会します。
クエリパラメータ
Section titled “クエリパラメータ”| パラメータ | 型 | 必須 | デフォルト | 説明 |
|---|---|---|---|---|
range | string | 任意 | 30d | 時間範囲 (7d, 14d, 30d, 90d, またはカスタム YYYY-MM-DD..YYYY-MM-DD) |
sns_type | string | 任意 | - | プラットフォームによるフィルタ (instagram, threads, bluesky など) |
connection_id | string | 任意 | - | 特定の接続 ID によるフィルタ |
リクエスト例
Section titled “リクエスト例”curl -X GET "https://api.ankk.app/v1/brand/analytics?range=30d&sns_type=instagram" \ -H "Authorization: Bearer spk_live_xxxxxxxx"レスポンス例 (200 OK)
Section titled “レスポンス例 (200 OK)”{ "range": { "start": "2026-07-17T00:00:00Z", "end": "2026-08-16T00:00:00Z", "preset": "30d" }, "totals": { "followers": 12500, "followers_change": 340, "published_posts": 28, "impressions": 84200, "reach": 61500, "engagement_rate": 4.8, "likes": 3210, "comments": 412, "shares": 180, "saves": 250 }, "by_channel": [ { "connection_id": "conn_01jm8x9k2example", "sns_type": "instagram", "username": "acme_official", "followers": 12500, "posts_count": 28, "metrics_status": "synced" } ]}📈 ブランド概要 (GET /v1/brand/analytics/overview)
Section titled “📈 ブランド概要 (GET /v1/brand/analytics/overview)”ダッシュボードウィジェットやデイリーダイジェストに適した、ハイレベルな 30 日間のサマリーを迅速に取得します。
リクエスト例
Section titled “リクエスト例”curl -X GET "https://api.ankk.app/v1/brand/analytics/overview" \ -H "Authorization: Bearer spk_live_xxxxxxxx"レスポンス例 (200 OK)
Section titled “レスポンス例 (200 OK)”{ "brand_ref": "brand_01jm8v4k9example", "active_connections": 4, "summary_30d": { "total_published": 54, "total_failed": 1, "total_followers": 28400, "total_impressions": 195000 }, "synced_at": "2026-08-16T03:00:00Z"}⚠️ 指標と制限に関する注意点
Section titled “⚠️ 指標と制限に関する注意点”- プラン制限: Free プランでは過去 30 日間の指標をサポートしています。Growth プラン以上では、延長保存 (90 日以上) が可能です。
0とnullの解釈:0: 実測値が 0 だったことを示します。null/unsupported: プラットフォーム API がこの指標をサポートしていないか、権限が確認されていないことを示します。