配置与传输方式
配置: full · 传输方式: stdio、http
选择 core 或 full 以控制客户端显示的工具;这不会变更权限。本地文件上传需要 stdio,无法通过 HTTP 使用。设置 SOSOAPI_OUTPUT_SCHEMAS=1 可在探索结果加入输出schema。无论是否启用此设置,工具皆会返回结构化结果。
权限与副作用
注解帮助客户端描述工具。每次调用仍会检查用户身份验证、角色、资源访问和能力授权。
{
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": true
}- /advertising-api/insights/query:agent:advertising_read · synchronous_http_response
输入字段
「必填」是指在其父对象及所选分支内必填。必填子字段不会使可选父对象变成必填。下列规则与字段名称均复制自契约。
| 字段 / 分支 | 类型 / 必填 | 约束 |
|---|---|---|
$ | 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 响应也包含 content,并可能在调用失败时设置 isError。对于发布,请读取帖子的最终结果,不要把获接受的请求或文字响应当作确认。链接的 API 操作说明了权限和重试规则。
「必填」是指在其父对象及所选分支内必填。必填子字段不会使可选父对象变成必填。下列规则与字段名称均复制自契约。
| 字段 / 分支 | 类型 / 必填 | 约束 |
|---|---|---|
$ | 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
}工具调用示例
这些示例使用已依schema检查的虚构值。请将 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
}