跳转到主要内容
GET
Get Facebook Page insights

请求规范

  • 方法与路径: GET /apis/v1/social/analytics/facebook/page-insights
  • 可用状态: enabled
  • 请求 URL 模板: https://api.aisa.one/apis/v1/social/analytics/facebook/page-insights
  • accountId: query; 必填
  • metrics: query; 可选
  • fromDate: query; 可选
  • toDate: query; 可选
  • since: query; 可选
  • until: query; 可选
  • metricType: query; 可选
  • Runtime 事实版本: 99acb5bddbedc8d3352e7c4fef86c3e6d8852c14772bcd18dbcf415237a642bd
完整 OpenAPI 定义 有效请求与价格声明(包括认证和引用的 schema):

费用与请求规则

当前未提供请求参考价格;请使用接口支持的报价功能确认费用。 最终费用以账户适用价格及实际结算为准。 公开参考值不是你的账户报价或最终扣费。对于支持 X-AISA-Cost-Mode: quote 的接口,执行前请针对完整请求获取免费报价;执行后通过响应费用元数据和 Usage Logs 核对结算费用。1 USD 等于 1,000,000 个整数 micro-USD。

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

查询参数

accountId
string
必填

One of your social accounts (acc_...).

Pattern: ^acc_[0-9A-Za-z]{22}$
metrics
string

Comma-separated list of metrics. Defaults to "page_media_view,page_post_engagements,page_follows,followers_gained,followers_lost".

Live Meta metrics (current names, post-Nov-2025):

  • page_media_view (replaces deprecated page_impressions)
  • page_views_total
  • page_post_engagements
  • page_video_views
  • page_video_view_time
  • page_follows (replaces deprecated page_fans)

AIsa-synthesized from daily follower snapshots (filling the Nov-2025 gap left by the page_fan_adds / page_fan_removes deprecation):

  • followers_gained
  • followers_lost

Monetization (opt-in, not in the defaults):

  • content_monetization_earnings: an object per day, always with unit "micro_amount" and an ISO 4217 "currency".
  • monetization_approximate_earnings: a bare number per day; unit is always "unspecified" and "currency" always null.

Each monetization metric costs its own Graph call, so requesting both adds two calls. Values are approximate and Meta restates them later. The two are on different scales and not comparable. Both keep daily "values" on every metricType and are never rescaled by AIsa.

Earnings are Page-level daily buckets and "total" is their sum. Meta does not document whether a bucket is that day's earnings or a running total, and every Page measured so far earned exactly 0.

Reconcile "total" against the Page's Meta export before relying on it (daily "values" are always returned for this).

Per-post lifetime earnings: GET /apis/v1/social/analytics/facebook/post-earnings.

A Page not enrolled in monetization, or that earned nothing, returns normal daily buckets of 0 in "metrics" (Meta does not distinguish them), so a 0 total does NOT mean the Page is enrolled.

"unavailableMetrics" covers the narrower case where Meta returned no bucket at all ("no_data") or rejected the request; the metric is then omitted from "metrics" rather than reported as 0.

fromDate
string<date>

Start date (YYYY-MM-DD). Defaults to 30 days ago.

toDate
string<date>

End date (YYYY-MM-DD). Defaults to today.

since
string<date>

Alias of fromDate, kept for existing callers

until
string<date>

Alias of toDate, kept for existing callers

metricType
enum<string>
默认值:total_value

"total_value" (default) returns aggregated totals only. "time_series" returns daily values in the "values" array.

可用选项:
time_series,
total_value

响应

Page insights data

Shared account-insights response envelope used by every platform-level analytics endpoint (/apis/v1/social/analytics/{facebook|instagram|youtube|linkedin|tiktok}/*). The name is historical - the shape was first shipped for Instagram and every new platform endpoint reuses it for response-shape consistency. The platform field echoes back which platform served the response.

accountId
string

One of your social accounts (acc_...).

Pattern: ^acc_[0-9A-Za-z]{22}$
breakdown
string

Breakdown dimension used (only present when breakdown was requested)

dataDelay
string
dateRange
object
metricType
enum<string>
可用选项:
time_series,
total_value
metrics
object

Object keyed by metric name.

  • For time_series: each metric has "total" (number) and "values" (array of {date, value}).
  • For total_value: each metric has "total" (number) and optionally "breakdowns" (array of {dimension, value}).

Monetary metrics also carry "unit" and "currency". AIsa never rescales money: "total" and every "values[].value" are the platform's raw numbers in the stated unit.

Monetary metrics keep "values" even on metricType=total_value, because their "total" is the sum of the daily buckets the platform returned over the range. Keep the series to reconcile that sum against the platform's own reporting before invoicing on it.

A metric that could not be served is absent from this object and listed in "unavailableMetrics" instead, so an unavailable metric is never reported as a zero.

platform
enum<string>

Platform that served this response.

可用选项:
facebook,
instagram,
youtube,
linkedin,
tiktok
success
boolean
unavailableMetrics
object[]

Requested metrics that could not be served. Present only when at least one metric is unavailable, absent otherwise.

Each listed metric is OMITTED from "metrics" rather than reported as 0, which is how an unavailable metric is distinguished from a genuine zero. The request itself still succeeds with HTTP 200.