跳转到主要内容
POST
Meta ad

授权

Authorization
string
header
必填

Your API key, sent as Authorization: Bearer <key>.

请求头

Prefer
string

wait=<seconds> holds the request at most that long, up to 290. wait=0 answers with the task id at once and queues the task when every concurrency slot is taken.

示例:

"wait=120"

请求体

application/json
libraryId
string
必填

ad: the ID of the ad to open, as a search returns it: digits on meta_ad_library (up to 20), linkedin_ad_library (up to 15), tiktok_ad_library and tiktok_creative_center (up to 20), and CR followed by 20 digits on google_ads_transparency.

Minimum string length: 1
Pattern: ^[0-9]{1,20}$
country
string

The country whose ads the library lists, as an ISO 3166-1 alpha-2 code. meta_ad_library: ALL for every country; US by default on search and advertisers, ALL on ad and advertiser, where it picks the reach and targeting the library shows. google_ads_transparency and linkedin_ad_library: ALL for every country, which is the default; search only. tiktok_ad_library: required, one of the 34 regions of the library on every action. tiktok_creative_center: required on search, one of 28 countries.

idempotencyKey
string

Optional. A repeat of the key within at least 30 days answers with the task that holds it, so a caller that hung up can ask again.

priority
integer
默认值:1

Compatibility field; does not guarantee execution order. Values outside 1–10 are clamped, not rejected.

必填范围: 1 <= x <= 10
webhook
object

Optional. Omit to collect the result by polling instead.

响应

The task ended: the body GET /v1/async/task/{id} returns, with the result in response or the reason in error.

success
boolean
必填
task
object
必填
credits
object
必填

Credits, with up to two decimals (for example 1.25). The submit response always shows 0: nothing is charged yet, and the task's price is held from your balance when it starts. Polling shows 0 until the task is terminal, then the settled charge: the task's price for COMPLETED, 0 for FAILED. A task webhook reports the same charge in creditsCharged; on a FAILED task it reports the task's price in creditsToCharge and 0 in creditsCharged. CITATION_ANALYSIS, GOOGLE_PLACES and GOOGLE_NEWS are charged by usage, up to the hold placed when the task starts.

response
object

The engine-specific result. Absent until the task is terminal. See the Engines guide for per-engine shapes. NAVER_AI_TAB preserves the original text, markdown, sources and cards when Naver returns HTTP success, a valid stream ending in done, and nonempty answer text with unknown_error. It includes upstreamError and returns immediately without retrying or rephrasing, even with retryQuery. COMPLETED means collection finished; the answer may still be incomplete. Empty, cut-off or malformed streams still fail. Policy refusals complete with a policy_declined notice. rawContent is returned only with include.rawResponse. With include.citationAnalysis, answer results also carry citationAnalysis (see Include). CITATION_ANALYSIS returns CitationAnalysisResult; see the Citation Analysis guide. PROMPT_RESEARCH returns PromptResearchResult; see the Prompt Research guide. GEO_SCORE returns GeoScoreResult; see the GEO Score guide. Answer engines with include.analysis add analysis (AnswerAnalysis).

error
string

Present when task.status is FAILED. A plain string, not the {code, message, timestamp} object used by request-level errors.