MCP tool
查詢廣告洞察數據
sosoapi_ads_insights_query明確指定日期、時區、貨幣、歸因時段及轉換動作,取得有數量上限的官方付費成效。缺失指標維持缺失。
閱讀 MarkdownProfiles 及連接方式
Profiles: full · Transports: stdio, http
Profile 只影響工具可見性,不會授予權限。HTTP 不提供本機檔案上傳。SOSOAPI_OUTPUT_SCHEMAS=1 會宣告輸出 schema;兩種模式均會回傳 structured results。
權限及改動
MCP annotations 只提供工具發現提示,並非存取控制保證;實際呼叫仍須通過登入、角色、資源及能力檢查。
{
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": true
}- /advertising-api/insights/query: agent:advertising_read · synchronous_http_response
輸入欄位
必填表示在所屬物件及所選分支內必須提供;子欄位必填不代表可選的父物件亦變成必填。以下欄位名稱及規則直接來自 contract。
| 欄位/分支 | 類型/必填 | 限制 |
|---|---|---|
$ | object父物件內必填 |
|
workspace_id | string父物件內必填 |
|
advertising_account_id | string父物件內必填 |
|
level | string父物件內必填 |
|
start_date | string父物件內必填 |
|
end_date | string父物件內必填 |
|
action_attribution_windows | array父物件內必填 |
|
action_attribution_windows[] | string可選/陣列項目 |
|
action_report_time | string父物件內必填 |
|
conversion_action_type | string父物件內必填 |
|
revenue_action_type | string父物件內必填 |
|
after | string可選/陣列項目 |
|
limit | integer可選/陣列項目 |
|
完整 JSON Schema
{
"type": "object",
"properties": {
"workspace_id": {
"type": "string",
"format": "uuid"
},
"advertising_account_id": {
"type": "string",
"format": "uuid"
},
"level": {
"type": "string",
"enum": [
"campaign",
"adset",
"ad"
]
},
"start_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"end_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"action_attribution_windows": {
"minItems": 1,
"maxItems": 1,
"type": "array",
"items": {
"type": "string",
"enum": [
"1d_click",
"7d_click",
"1d_view"
]
}
},
"action_report_time": {
"type": "string",
"enum": [
"impression",
"conversion"
]
},
"conversion_action_type": {
"type": "string",
"pattern": "^[a-z][a-z0-9_.]{0,99}$"
},
"revenue_action_type": {
"type": "string",
"pattern": "^[a-z][a-z0-9_.]{0,99}$"
},
"after": {
"type": "string",
"maxLength": 2048
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 50
}
},
"required": [
"workspace_id",
"advertising_account_id",
"level",
"start_date",
"end_date",
"action_attribution_windows",
"action_report_time",
"conversion_action_type",
"revenue_action_type"
],
"additionalProperties": false
}結構化輸出
此 schema 描述成功工具結果的 structuredContent。MCP envelope 亦包括 content,失敗時可能設定 isError;請勿將文字收據或已接受的請求視為平台終態。權限及重試規則請參閱對應的 API 操作。
必填表示在所屬物件及所選分支內必須提供;子欄位必填不代表可選的父物件亦變成必填。以下欄位名稱及規則直接來自 contract。
| 欄位/分支 | 類型/必填 | 限制 |
|---|---|---|
$ | object父物件內必填 |
|
contract_version | string父物件內必填 |
|
source_id | string父物件內必填 |
|
source_sha256 | string父物件內必填 |
|
identity_verification | string父物件內必填 |
|
currency | string父物件內必填 |
|
timezone | string父物件內必填 |
|
selection | object父物件內必填 |
|
selection.provider_api_version | string父物件內必填 |
|
selection.provider_account_id | string父物件內必填 |
|
selection.currency | string父物件內必填 |
|
selection.timezone | string父物件內必填 |
|
selection.level | string父物件內必填 |
|
selection.start_date | string父物件內必填 |
|
selection.end_date | string父物件內必填 |
|
selection.action_attribution_windows | array父物件內必填 |
|
selection.action_attribution_windows[] | string可選/陣列項目 |
|
selection.action_report_time | string父物件內必填 |
|
selection.conversion_action_type | string父物件內必填 |
|
selection.revenue_action_type | string父物件內必填 |
|
complete | boolean父物件內必填 | — |
rows | array父物件內必填 |
|
rows[] | object可選/陣列項目 |
|
rows[].row_id | string父物件內必填 |
|
rows[].metrics | object父物件內必填 |
|
rows[].metrics.spend | object父物件內必填 |
|
rows[].metrics.spend.value | string | null父物件內必填 | — |
rows[].metrics.spend.valueanyOf 1 | string父物件內必填 |
|
rows[].metrics.spend.valueanyOf 2 | null父物件內必填 | — |
rows[].metrics.spend.unit | string父物件內必填 |
|
rows[].metrics.spend.availability | string父物件內必填 |
|
rows[].metrics.spend.reason | string | null父物件內必填 | — |
rows[].metrics.spend.reasonanyOf 1 | string父物件內必填 |
|
rows[].metrics.spend.reasonanyOf 2 | null父物件內必填 | — |
rows[].metrics.spend.input_refs | array父物件內必填 |
|
rows[].metrics.spend.input_refs[] | string可選/陣列項目 |
|
rows[].metrics.clicks | object父物件內必填 |
|
rows[].metrics.clicks.value | string | null父物件內必填 | — |
rows[].metrics.clicks.valueanyOf 1 | string父物件內必填 |
|
rows[].metrics.clicks.valueanyOf 2 | null父物件內必填 | — |
rows[].metrics.clicks.unit | string父物件內必填 |
|
rows[].metrics.clicks.availability | string父物件內必填 |
|
rows[].metrics.clicks.reason | string | null父物件內必填 | — |
rows[].metrics.clicks.reasonanyOf 1 | string父物件內必填 |
|
rows[].metrics.clicks.reasonanyOf 2 | null父物件內必填 | — |
rows[].metrics.clicks.input_refs | array父物件內必填 |
|
rows[].metrics.clicks.input_refs[] | string可選/陣列項目 |
|
rows[].metrics.conversions | object父物件內必填 |
|
rows[].metrics.conversions.value | string | null父物件內必填 | — |
rows[].metrics.conversions.valueanyOf 1 | string父物件內必填 |
|
rows[].metrics.conversions.valueanyOf 2 | null父物件內必填 | — |
rows[].metrics.conversions.unit | string父物件內必填 |
|
rows[].metrics.conversions.availability | string父物件內必填 |
|
rows[].metrics.conversions.reason | string | null父物件內必填 | — |
rows[].metrics.conversions.reasonanyOf 1 | string父物件內必填 |
|
rows[].metrics.conversions.reasonanyOf 2 | null父物件內必填 | — |
rows[].metrics.conversions.input_refs | array父物件內必填 |
|
rows[].metrics.conversions.input_refs[] | string可選/陣列項目 |
|
rows[].metrics.attributed_revenue | object父物件內必填 |
|
rows[].metrics.attributed_revenue.value | string | null父物件內必填 | — |
rows[].metrics.attributed_revenue.valueanyOf 1 | string父物件內必填 |
|
rows[].metrics.attributed_revenue.valueanyOf 2 | null父物件內必填 | — |
rows[].metrics.attributed_revenue.unit | string父物件內必填 |
|
rows[].metrics.attributed_revenue.availability | string父物件內必填 |
|
rows[].metrics.attributed_revenue.reason | string | null父物件內必填 | — |
rows[].metrics.attributed_revenue.reasonanyOf 1 | string父物件內必填 |
|
rows[].metrics.attributed_revenue.reasonanyOf 2 | null父物件內必填 | — |
rows[].metrics.attributed_revenue.input_refs | array父物件內必填 |
|
rows[].metrics.attributed_revenue.input_refs[] | string可選/陣列項目 |
|
rows[].metrics.cpc | object父物件內必填 |
|
rows[].metrics.cpc.value | string | null父物件內必填 | — |
rows[].metrics.cpc.valueanyOf 1 | string父物件內必填 |
|
rows[].metrics.cpc.valueanyOf 2 | null父物件內必填 | — |
rows[].metrics.cpc.unit | string父物件內必填 |
|
rows[].metrics.cpc.availability | string父物件內必填 |
|
rows[].metrics.cpc.reason | string | null父物件內必填 | — |
rows[].metrics.cpc.reasonanyOf 1 | string父物件內必填 |
|
rows[].metrics.cpc.reasonanyOf 2 | null父物件內必填 | — |
rows[].metrics.cpc.input_refs | array父物件內必填 |
|
rows[].metrics.cpc.input_refs[] | string可選/陣列項目 |
|
rows[].metrics.cpa | object父物件內必填 |
|
rows[].metrics.cpa.value | string | null父物件內必填 | — |
rows[].metrics.cpa.valueanyOf 1 | string父物件內必填 |
|
rows[].metrics.cpa.valueanyOf 2 | null父物件內必填 | — |
rows[].metrics.cpa.unit | string父物件內必填 |
|
rows[].metrics.cpa.availability | string父物件內必填 |
|
rows[].metrics.cpa.reason | string | null父物件內必填 | — |
rows[].metrics.cpa.reasonanyOf 1 | string父物件內必填 |
|
rows[].metrics.cpa.reasonanyOf 2 | null父物件內必填 | — |
rows[].metrics.cpa.input_refs | array父物件內必填 |
|
rows[].metrics.cpa.input_refs[] | string可選/陣列項目 |
|
rows[].metrics.attributed_roas | object父物件內必填 |
|
rows[].metrics.attributed_roas.value | string | null父物件內必填 | — |
rows[].metrics.attributed_roas.valueanyOf 1 | string父物件內必填 |
|
rows[].metrics.attributed_roas.valueanyOf 2 | null父物件內必填 | — |
rows[].metrics.attributed_roas.unit | string父物件內必填 |
|
rows[].metrics.attributed_roas.availability | string父物件內必填 |
|
rows[].metrics.attributed_roas.reason | string | null父物件內必填 | — |
rows[].metrics.attributed_roas.reasonanyOf 1 | string父物件內必填 |
|
rows[].metrics.attributed_roas.reasonanyOf 2 | null父物件內必填 | — |
rows[].metrics.attributed_roas.input_refs | array父物件內必填 |
|
rows[].metrics.attributed_roas.input_refs[] | string可選/陣列項目 |
|
totals | object父物件內必填 |
|
totals.spend | object父物件內必填 |
|
totals.spend.value | string | null父物件內必填 | — |
totals.spend.valueanyOf 1 | string父物件內必填 |
|
totals.spend.valueanyOf 2 | null父物件內必填 | — |
totals.spend.unit | string父物件內必填 |
|
totals.spend.availability | string父物件內必填 |
|
totals.spend.reason | string | null父物件內必填 | — |
totals.spend.reasonanyOf 1 | string父物件內必填 |
|
totals.spend.reasonanyOf 2 | null父物件內必填 | — |
totals.spend.input_refs | array父物件內必填 |
|
totals.spend.input_refs[] | string可選/陣列項目 |
|
totals.clicks | object父物件內必填 |
|
totals.clicks.value | string | null父物件內必填 | — |
totals.clicks.valueanyOf 1 | string父物件內必填 |
|
totals.clicks.valueanyOf 2 | null父物件內必填 | — |
totals.clicks.unit | string父物件內必填 |
|
totals.clicks.availability | string父物件內必填 |
|
totals.clicks.reason | string | null父物件內必填 | — |
totals.clicks.reasonanyOf 1 | string父物件內必填 |
|
totals.clicks.reasonanyOf 2 | null父物件內必填 | — |
totals.clicks.input_refs | array父物件內必填 |
|
totals.clicks.input_refs[] | string可選/陣列項目 |
|
totals.conversions | object父物件內必填 |
|
totals.conversions.value | string | null父物件內必填 | — |
totals.conversions.valueanyOf 1 | string父物件內必填 |
|
totals.conversions.valueanyOf 2 | null父物件內必填 | — |
totals.conversions.unit | string父物件內必填 |
|
totals.conversions.availability | string父物件內必填 |
|
totals.conversions.reason | string | null父物件內必填 | — |
totals.conversions.reasonanyOf 1 | string父物件內必填 |
|
totals.conversions.reasonanyOf 2 | null父物件內必填 | — |
totals.conversions.input_refs | array父物件內必填 |
|
totals.conversions.input_refs[] | string可選/陣列項目 |
|
totals.attributed_revenue | object父物件內必填 |
|
totals.attributed_revenue.value | string | null父物件內必填 | — |
totals.attributed_revenue.valueanyOf 1 | string父物件內必填 |
|
totals.attributed_revenue.valueanyOf 2 | null父物件內必填 | — |
totals.attributed_revenue.unit | string父物件內必填 |
|
totals.attributed_revenue.availability | string父物件內必填 |
|
totals.attributed_revenue.reason | string | null父物件內必填 | — |
totals.attributed_revenue.reasonanyOf 1 | string父物件內必填 |
|
totals.attributed_revenue.reasonanyOf 2 | null父物件內必填 | — |
totals.attributed_revenue.input_refs | array父物件內必填 |
|
totals.attributed_revenue.input_refs[] | string可選/陣列項目 |
|
totals.cpc | object父物件內必填 |
|
totals.cpc.value | string | null父物件內必填 | — |
totals.cpc.valueanyOf 1 | string父物件內必填 |
|
totals.cpc.valueanyOf 2 | null父物件內必填 | — |
totals.cpc.unit | string父物件內必填 |
|
totals.cpc.availability | string父物件內必填 |
|
totals.cpc.reason | string | null父物件內必填 | — |
totals.cpc.reasonanyOf 1 | string父物件內必填 |
|
totals.cpc.reasonanyOf 2 | null父物件內必填 | — |
totals.cpc.input_refs | array父物件內必填 |
|
totals.cpc.input_refs[] | string可選/陣列項目 |
|
totals.cpa | object父物件內必填 |
|
totals.cpa.value | string | null父物件內必填 | — |
totals.cpa.valueanyOf 1 | string父物件內必填 |
|
totals.cpa.valueanyOf 2 | null父物件內必填 | — |
totals.cpa.unit | string父物件內必填 |
|
totals.cpa.availability | string父物件內必填 |
|
totals.cpa.reason | string | null父物件內必填 | — |
totals.cpa.reasonanyOf 1 | string父物件內必填 |
|
totals.cpa.reasonanyOf 2 | null父物件內必填 | — |
totals.cpa.input_refs | array父物件內必填 |
|
totals.cpa.input_refs[] | string可選/陣列項目 |
|
totals.attributed_roas | object父物件內必填 |
|
totals.attributed_roas.value | string | null父物件內必填 | — |
totals.attributed_roas.valueanyOf 1 | string父物件內必填 |
|
totals.attributed_roas.valueanyOf 2 | null父物件內必填 | — |
totals.attributed_roas.unit | string父物件內必填 |
|
totals.attributed_roas.availability | string父物件內必填 |
|
totals.attributed_roas.reason | string | null父物件內必填 | — |
totals.attributed_roas.reasonanyOf 1 | string父物件內必填 |
|
totals.attributed_roas.reasonanyOf 2 | null父物件內必填 | — |
totals.attributed_roas.input_refs | array父物件內必填 |
|
totals.attributed_roas.input_refs[] | string可選/陣列項目 |
|
gaps | array父物件內必填 |
|
gaps[] | string可選/陣列項目 |
|
suggestions | array父物件內必填 |
|
suggestions[] | object可選/陣列項目 |
|
suggestions[].rule_id | string父物件內必填 |
|
suggestions[].rule_version | number父物件內必填 |
|
suggestions[].proposal | string父物件內必填 |
|
suggestions[].input_refs | array父物件內必填 |
|
suggestions[].input_refs[] | string可選/陣列項目 |
|
suggestions[].limitations | string父物件內必填 |
|
advertising_account_id | string父物件內必填 |
|
next_cursor | string | null父物件內必填 | — |
next_cursoranyOf 1 | string父物件內必填 |
|
next_cursoranyOf 2 | null父物件內必填 | — |
完整 JSON Schema
{
"type": "object",
"properties": {
"contract_version": {
"type": "string",
"const": "ad-performance/v1"
},
"source_id": {
"type": "string",
"maxLength": 100
},
"source_sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"identity_verification": {
"type": "string",
"enum": [
"customer_supplied",
"accepted_provider_grant"
]
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"timezone": {
"type": "string",
"maxLength": 100
},
"selection": {
"type": "object",
"properties": {
"provider_api_version": {
"type": "string",
"const": "v26.0"
},
"provider_account_id": {
"type": "string",
"pattern": "^[1-9]\\d{1,24}$"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$"
},
"timezone": {
"type": "string",
"maxLength": 100
},
"level": {
"type": "string",
"enum": [
"campaign",
"adset",
"ad"
]
},
"start_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"end_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"action_attribution_windows": {
"minItems": 1,
"maxItems": 1,
"type": "array",
"items": {
"type": "string",
"enum": [
"1d_click",
"7d_click",
"1d_view"
]
}
},
"action_report_time": {
"type": "string",
"enum": [
"impression",
"conversion"
]
},
"conversion_action_type": {
"type": "string",
"maxLength": 100
},
"revenue_action_type": {
"type": "string",
"maxLength": 100
}
},
"required": [
"provider_api_version",
"provider_account_id",
"currency",
"timezone",
"level",
"start_date",
"end_date",
"action_attribution_windows",
"action_report_time",
"conversion_action_type",
"revenue_action_type"
],
"additionalProperties": false
},
"complete": {
"type": "boolean"
},
"rows": {
"maxItems": 500,
"type": "array",
"items": {
"type": "object",
"properties": {
"row_id": {
"type": "string",
"maxLength": 100
},
"metrics": {
"type": "object",
"properties": {
"spend": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"clicks": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"conversions": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"attributed_revenue": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"cpc": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"cpa": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"attributed_roas": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
}
},
"required": [
"spend",
"clicks",
"conversions",
"attributed_revenue",
"cpc",
"cpa",
"attributed_roas"
],
"additionalProperties": false
}
},
"required": [
"row_id",
"metrics"
],
"additionalProperties": false
}
},
"totals": {
"type": "object",
"properties": {
"spend": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"clicks": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"conversions": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"attributed_revenue": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"cpc": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"cpa": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
},
"attributed_roas": {
"type": "object",
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
},
{
"type": "null"
}
]
},
"unit": {
"type": "string",
"enum": [
"currency",
"count",
"currency_per_click",
"currency_per_conversion",
"ratio"
]
},
"availability": {
"type": "string",
"enum": [
"available",
"missing_input",
"zero_denominator",
"incompatible",
"partial"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 300
},
{
"type": "null"
}
]
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
}
},
"required": [
"value",
"unit",
"availability",
"reason",
"input_refs"
],
"additionalProperties": false
}
},
"required": [
"spend",
"clicks",
"conversions",
"attributed_revenue",
"cpc",
"cpa",
"attributed_roas"
],
"additionalProperties": false
},
"gaps": {
"maxItems": 1000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
},
"suggestions": {
"maxItems": 3,
"type": "array",
"items": {
"type": "object",
"properties": {
"rule_id": {
"type": "string",
"enum": [
"supply_revenue",
"review_comparable_creative_test",
"complete_coverage"
]
},
"rule_version": {
"type": "number",
"const": 1
},
"proposal": {
"type": "string",
"maxLength": 600
},
"input_refs": {
"maxItems": 2000,
"type": "array",
"items": {
"type": "string",
"maxLength": 300
}
},
"limitations": {
"type": "string",
"const": "Observational comparison only; no causal uplift or profitability claim. Human review required."
}
},
"required": [
"rule_id",
"rule_version",
"proposal",
"input_refs",
"limitations"
],
"additionalProperties": false
}
},
"advertising_account_id": {
"type": "string",
"format": "uuid"
},
"next_cursor": {
"anyOf": [
{
"type": "string",
"maxLength": 2048
},
{
"type": "null"
}
]
}
},
"required": [
"contract_version",
"source_id",
"source_sha256",
"identity_verification",
"currency",
"timezone",
"selection",
"complete",
"rows",
"totals",
"gaps",
"suggestions",
"advertising_account_id",
"next_cursor"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}工具呼叫範例
以下虛構值已按 contract 驗證,並非真實帳戶 ID、憑證或發佈紀錄。請以已授權範圍回傳的 ID、已準備完成的素材及已審核排程取代,並在寫入前核對平台資格。此頁不會呼叫 API。
{
"name": "sosoapi_ads_insights_query",
"arguments": {
"workspace_id": "11111111-1111-4111-8111-111111111111",
"advertising_account_id": "11111111-1111-4111-8111-111111111111",
"level": "campaign",
"start_date": "2099-01-15",
"end_date": "2099-01-15",
"action_attribution_windows": [
"1d_click"
],
"action_report_time": "impression",
"conversion_action_type": "example",
"revenue_action_type": "example"
}
}structuredContent
{
"contract_version": "ad-performance/v1",
"source_id": "example",
"source_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"identity_verification": "customer_supplied",
"currency": "USD",
"timezone": "UTC",
"selection": {
"provider_api_version": "v26.0",
"provider_account_id": "12345",
"currency": "USD",
"timezone": "UTC",
"level": "campaign",
"start_date": "2099-01-15",
"end_date": "2099-01-15",
"action_attribution_windows": [
"1d_click"
],
"action_report_time": "impression",
"conversion_action_type": "example",
"revenue_action_type": "example"
},
"complete": false,
"rows": [],
"totals": {
"spend": {
"value": null,
"unit": "currency",
"availability": "available",
"reason": null,
"input_refs": []
},
"clicks": {
"value": null,
"unit": "currency",
"availability": "available",
"reason": null,
"input_refs": []
},
"conversions": {
"value": null,
"unit": "currency",
"availability": "available",
"reason": null,
"input_refs": []
},
"attributed_revenue": {
"value": null,
"unit": "currency",
"availability": "available",
"reason": null,
"input_refs": []
},
"cpc": {
"value": null,
"unit": "currency",
"availability": "available",
"reason": null,
"input_refs": []
},
"cpa": {
"value": null,
"unit": "currency",
"availability": "available",
"reason": null,
"input_refs": []
},
"attributed_roas": {
"value": null,
"unit": "currency",
"availability": "available",
"reason": null,
"input_refs": []
}
},
"gaps": [],
"suggestions": [],
"advertising_account_id": "11111111-1111-4111-8111-111111111111",
"next_cursor": null
}