{ "action": "ads", "status": "error", "code": 400, "message": "The ad is not found or not authorized."}
Lấy hiệu suất quảng cáo Facebook theo thời gian thực, mỗi ngày một hàng, cho các chiến dịch, nhóm quảng cáo hoặc quảng cáo của bạn.
Chọn các chỉ số bạn muốn, phân tách chúng theo độ tuổi, giới tính, quốc gia hoặc vị trí hiển thị, và phân trang qua các khoảng thời gian dài.
Số liệu được đọc từ Meta tại thời điểm bạn gọi, không phải từ bản sao được tạo mỗi đêm.
Sử dụng Lịch sử cho bản ghi chi phí hằng ngày. Sử dụng Insights cho báo cáo và phân tích.
Tất cả các giá trị tiền tệ đều tính theo đơn vị tiền tệ của tài khoản quảng cáo, được trả về trong currency trên mỗi hàng.
Các chiến dịch phải được tạo thông qua Ayrshare cho profile này, và các nhóm quảng cáo phải nằm trong
một chiến dịch như vậy. Một quảng cáo được tạo thông qua
Ayrshare cho một profile khác sẽ bị từ chối. Các ad id khác được đọc bằng tài khoản Meta được liên kết
với profile này, vì vậy Meta chỉ trả về những quảng cáo mà tài khoản đó có thể xem.
Mỗi request chỉ bao gồm một tài khoản quảng cáo. Các id từ nhiều tài khoản quảng cáo sẽ trả về mã 101, và điều tương tự
cũng xảy ra với nhiều ad id mà Ayrshare không có bản ghi. Hãy yêu cầu từng id một.
Tham số Header
Tham số Query
string
bắt buộc
Đối tượng mà mỗi hàng báo cáo: campaign, adSet hoặc ad.
string
Các campaign id, ad set id hoặc ad id phân tách bằng dấu phẩy, tối đa 50. Bắt buộc với level=campaign và
level=adSet.Với level=ad, bạn có thể bỏ qua ids và gửi accountId thay thế. Khi đó báo cáo sẽ bao gồm các quảng cáo
bạn đã tạo thông qua Ayrshare cho profile này trong tài khoản quảng cáo đó, chứ không phải mọi quảng cáo trong tài khoản. Cách này hoạt động
với tối đa 50 quảng cáo như vậy. Nếu nhiều hơn, hãy gửi id của chúng hoặc báo cáo theo chiến dịch. Nếu không tìm thấy quảng cáo nào,
báo cáo sẽ trống.
string
ID tài khoản quảng cáo, có hoặc không có tiền tố act_ (1234567890 hoặc act_1234567890).Bắt buộc với level=ad khi bỏ qua ids.
string
Các chỉ số cần trả về, phân tách bằng dấu phẩy. Bỏ qua tham số này để nhận tất cả. Xem Chỉ số.
string
Các breakdown phân tách bằng dấu phẩy: age, gender, country, placement. Khi đó mỗi ngày sẽ có một hàng cho mỗi
giá trị, hoặc cho mỗi tổ hợp khi dùng age,gender. Hãy gửi từng breakdown một, hoặc age,gender; Meta
từ chối các kết hợp khác (chẳng hạn age,country), vì vậy chúng sẽ trả về mã 101.
string
mặc định:"30 ngày trước"
Ngày đầu tiên, theo định dạng YYYY-MM-DD. Có thể lùi xa tối đa 37 tháng.
string
mặc định:"hôm nay"
Ngày cuối cùng, theo định dạng YYYY-MM-DD.
string
Giá trị meta.pagination.next từ phản hồi trước đó, để lấy trang tiếp theo.
Chỉ số
Chỉ số
Kiểu
Ý nghĩa
spend
number
Số tiền đã chi
impressions
number
Số lần quảng cáo được hiển thị
reach
number
Số người đã xem quảng cáo ít nhất một lần
clicks
number
Số lượt nhấp
cpm
number hoặc null
Chi phí cho mỗi 1.000 lượt hiển thị
cpc
number hoặc null
Chi phí cho mỗi lượt nhấp. null vào ngày không có lượt nhấp
ctr
number hoặc null
Tỷ lệ nhấp, tính theo phần trăm
actions
array
Mỗi loại hành động mà Meta đã ghi nhận, kèm theo số lượng
conversionValue
number
Tổng giá trị các giao dịch mua
Facebook báo cáo mọi chỉ số trong bảng này. Một ngoại lệ: Meta không báo cáo reach cho báo cáo có
breakdowns bắt đầu từ hơn 13 tháng trước, vì vậy reach bị bỏ khỏi các hàng đó. Trên các mạng không báo cáo một chỉ số, chỉ số đó sẽ bị bỏ
khỏi các hàng thay vì được trả về là 0, và việc yêu cầu chỉ số đó sẽ trả về mã 101.
Meta ghi nhận một số hành động dưới nhiều loại, vì vậy đừng cộng dồn các giá trị actions. Ví
dụ, omni_purchase đã bao gồm purchase. conversionValue chỉ tính mỗi giao dịch mua một lần.
Phân trang
Mỗi phản hồi trả về tối đa 500 hàng. Nếu còn nhiều hơn, meta.pagination.hasMore là true và meta.pagination.next sẽ được đặt. Gửi lại cùng request đó
với next được đặt thành giá trị này để lấy trang tiếp theo. Ở trang cuối cùng, hasMore là false và không có next. Một giá trị next
chỉ hoạt động với các tham số mà nó được tạo ra: với tham số khác, request sẽ trả về code: 101.
Lỗi
Mã
Khi nào
101
Thiếu tham số hoặc tham số sai, breakdown hoặc chỉ số không được hỗ trợ, startDate cách đây hơn 37 tháng, gửi hơn 50 id, các id thuộc nhiều tài khoản quảng cáo, hoặc Meta từ chối kết hợp breakdown
400
Chiến dịch, nhóm quảng cáo hoặc quảng cáo không thuộc về bạn, hoặc accountId không phải là tài khoản quảng cáo mà Ayrshare ghi nhận cho các id bạn đã gửi. Đối với nhóm quảng cáo, accountId cũng phải là tài khoản quảng cáo mà Meta báo cáo cho nhóm quảng cáo đó. Đối với quảng cáo không có bản ghi trong Ayrshare, accountId không được kiểm tra và quảng cáo được đọc riêng
370
Meta không thể trả về insights. Hãy thử lại
curl \-H "Authorization: Bearer API_KEY" \-X GET "https://api.ayrshare.com/api/ads/facebook/insights?level=campaign&ids=120200000000000001&startDate=2026-09-01&endDate=2026-09-02"
{ "action": "ads", "status": "error", "code": 400, "message": "The ad is not found or not authorized."}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Ayrshare Docs","colors":{"primary":"#2266C2","light":"#4985D8","dark":"#1A4E9A"},"logo":{"light":"https://mintcdn.com/ayrshare-docs/7bWzjvNjeuvs-M3N/images/logos/ayrshare-docs-logo-light.svg?fit=max\u0026auto=format\u0026n=7bWzjvNjeuvs-M3N\u0026q=85\u0026s=8d23367f493d06599eecbbfa2b6325cf","dark":"https://mintcdn.com/ayrshare-docs/7bWzjvNjeuvs-M3N/images/logos/ayrshare-docs-logo-dark.svg?fit=max\u0026auto=format\u0026n=7bWzjvNjeuvs-M3N\u0026q=85\u0026s=77590acef2781d2fec9a1b14b6e09b73","href":"https://www.ayrshare.com/docs"},"favicon":"https://mintcdn.com/ayrshare-docs/dKBti0xVDJrOZ19f/images/logos/icon-docs.png?fit=max\u0026auto=format\u0026n=dKBti0xVDJrOZ19f\u0026q=85\u0026s=9704762afaad78a9cfdd90a20cb1d253","api":{"playground":{"display":"simple"},"examples":{"languages":["bash","javascript","python","php","go","java"]},"mdx":{"auth":{"method":"bearer"},"server":"https://api.ayrshare.com/api"}},"appearance":{"default":"dark"},"background":{"decoration":"gradient"},"navbar":{"links":[{"href":"https://www.ayrshare.com/blog","label":"Blog"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.ayrshare.com"}},"footer":{"socials":{"github":"https://github.com/ayrshare","x":"https://x.com/ayrshare","bluesky":"https://bsky.app/profile/ayrshare.com","facebook":"https://www.facebook.com/Ayrshare","linkedin":"https://www.linkedin.com/company/ayrshare","youtube":"https://www.youtube.com/@ayrshare"}},"seo":{"indexing":"navigable"},"styling":{"codeblocks":"system","latex":true},"integrations":{"gtm":{"tagId":"GTM-P23WG8W"},"plausible":{"domain":"docs.ayrshare.com"}},"contextual":{"options":["copy","chatgpt","claude","perplexity","cursor","vscode"],"display":"header"},"navigation":{"languages":[{"language":"en","href":"introduction"},{"language":"es","href":"es/introduction"},{"language":"cn","hidden":true,"href":"cn/introduction"},{"language":"zh","hidden":true,"href":"zh/introduction"},{"language":"pt-BR","href":"pt-BR/introduction"},{"language":"fr","href":"fr/introduction"},{"language":"de","href":"de/introduction"},{"language":"vi","href":"vi/introduction"},{"language":"ja","href":"ja/introduction"},{"language":"uk","href":"uk/introduction"},{"language":"hi","href":"hi/introduction"},{"language":"ar","href":"ar/introduction"},{"language":"zh-Hans","href":"zh-Hans/introduction"},{"language":"zh-Hant","href":"zh-Hant/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"ayrshare-docs","hasAudioNarration":false,"actualSubdomain":"ayrshare-docs","customDomains":["www.ayrshare.com"],"gitSource":{"type":"github","owner":"ayrshare","repo":"ayrshare_3","deployBranch":"docs-prod","contentDirectory":"apps/mintlify","isPrivate":true,"mountPath":"","label":"","_id":"6aec8a4b6de9d64b11a45855"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b098ef4e61e2696e7016ed3","clientVersion":"0.0.4344","searchFilterCounts":[{"language":"en","tag":"Documentation","count":262},{"language":"ar","tag":"Documentation","count":262},{"language":"de","tag":"Documentation","count":262},{"language":"es","tag":"Documentation","count":262},{"language":"fr","tag":"Documentation","count":262},{"language":"hi","tag":"Documentation","count":262},{"language":"ja","tag":"Documentation","count":262},{"language":"pt-BR","tag":"Documentation","count":262},{"language":"uk","tag":"Documentation","count":262},{"language":"vi","tag":"Documentation","count":262},{"language":"zh-Hans","tag":"Documentation","count":262},{"language":"zh-Hant","tag":"Documentation","count":262},{"language":"en","tag":"API Endpoints","count":183},{"language":"ar","tag":"API Endpoints","count":183},{"language":"de","tag":"API Endpoints","count":183},{"language":"es","tag":"API Endpoints","count":183},{"language":"fr","tag":"API Endpoints","count":183},{"language":"hi","tag":"API Endpoints","count":183},{"language":"ja","tag":"API Endpoints","count":183},{"language":"pt-BR","tag":"API Endpoints","count":183},{"language":"uk","tag":"API Endpoints","count":183},{"language":"vi","tag":"API Endpoints","count":183},{"language":"zh-Hans","tag":"API Endpoints","count":183},{"language":"zh-Hant","tag":"API Endpoints","count":183},{"language":"en","tag":"Help Center","count":126},{"language":"ar","tag":"Help Center","count":126},{"language":"de","tag":"Help Center","count":126},{"language":"es","tag":"Help Center","count":126},{"language":"fr","tag":"Help Center","count":126},{"language":"hi","tag":"Help Center","count":126},{"language":"ja","tag":"Help Center","count":126},{"language":"pt-BR","tag":"Help Center","count":126},{"language":"uk","tag":"Help Center","count":126},{"language":"vi","tag":"Help Center","count":126},{"language":"zh-Hans","tag":"Help Center","count":126},{"language":"zh-Hant","tag":"Help Center","count":126},{"language":"en","tag":"Ads","count":43},{"language":"ar","tag":"Ads","count":43},{"language":"de","tag":"Ads","count":43},{"language":"es","tag":"Ads","count":43},{"language":"fr","tag":"Ads","count":43},{"language":"hi","tag":"Ads","count":43},{"language":"ja","tag":"Ads","count":43},{"language":"pt-BR","tag":"Ads","count":43},{"language":"uk","tag":"Ads","count":43},{"language":"vi","tag":"Ads","count":43},{"language":"zh-Hans","tag":"Ads","count":43},{"language":"zh-Hant","tag":"Ads","count":43},{"language":"en","tag":"Additional","count":41},{"language":"ar","tag":"Additional","count":41},{"language":"de","tag":"Additional","count":41},{"language":"es","tag":"Additional","count":41},{"language":"fr","tag":"Additional","count":41},{"language":"hi","tag":"Additional","count":41},{"language":"ja","tag":"Additional","count":41},{"language":"pt-BR","tag":"Additional","count":41},{"language":"uk","tag":"Additional","count":41},{"language":"vi","tag":"Additional","count":41},{"language":"zh-Hans","tag":"Additional","count":41},{"language":"zh-Hant","tag":"Additional","count":41},{"language":"en","tag":"Technical Support","count":40},{"language":"ar","tag":"Technical Support","count":40},{"language":"de","tag":"Technical Support","count":40},{"language":"es","tag":"Technical Support","count":40},{"language":"fr","tag":"Technical Support","count":40},{"language":"hi","tag":"Technical Support","count":40},{"language":"ja","tag":"Technical Support","count":40},{"language":"pt-BR","tag":"Technical Support","count":40},{"language":"uk","tag":"Technical Support","count":40},{"language":"vi","tag":"Technical Support","count":40},{"language":"zh-Hans","tag":"Technical Support","count":40},{"language":"zh-Hant","tag":"Technical Support","count":40},{"language":"en","tag":"Post","count":22},{"language":"ar","tag":"Post","count":22},{"language":"de","tag":"Post","count":22},{"language":"es","tag":"Post","count":22},{"language":"fr","tag":"Post","count":22},{"language":"hi","tag":"Post","count":22},{"language":"ja","tag":"Post","count":22},{"language":"pt-BR","tag":"Post","count":22},{"language":"uk","tag":"Post","count":22},{"language":"vi","tag":"Post","count":22},{"language":"zh-Hans","tag":"Post","count":22},{"language":"zh-Hant","tag":"Post","count":22},{"language":"en","tag":"Dashboard","count":21},{"language":"ar","tag":"Dashboard","count":21},{"language":"de","tag":"Dashboard","count":21},{"language":"es","tag":"Dashboard","count":21},{"language":"fr","tag":"Dashboard","count":21},{"language":"hi","tag":"Dashboard","count":21},{"language":"ja","tag":"Dashboard","count":21},{"language":"pt-BR","tag":"Dashboard","count":21},{"language":"uk","tag":"Dashboard","count":21},{"language":"vi","tag":"Dashboard","count":21},{"language":"zh-Hans","tag":"Dashboard","count":21},{"language":"zh-Hant","tag":"Dashboard","count":21},{"language":"en","tag":"Product","count":16},{"language":"ar","tag":"Product","count":16},{"language":"de","tag":"Product","count":16},{"language":"es","tag":"Product","count":16},{"language":"fr","tag":"Product","count":16},{"language":"hi","tag":"Product","count":16},{"language":"ja","tag":"Product","count":16},{"language":"pt-BR","tag":"Product","count":16},{"language":"uk","tag":"Product","count":16},{"language":"vi","tag":"Product","count":16},{"language":"zh-Hans","tag":"Product","count":16},{"language":"zh-Hant","tag":"Product","count":16},{"language":"en","tag":"Facebook Ads","count":15},{"language":"ar","tag":"Facebook Ads","count":15},{"language":"de","tag":"Facebook Ads","count":15},{"language":"es","tag":"Facebook Ads","count":15},{"language":"fr","tag":"Facebook Ads","count":15},{"language":"hi","tag":"Facebook Ads","count":15},{"language":"ja","tag":"Facebook Ads","count":15},{"language":"pt-BR","tag":"Facebook Ads","count":15},{"language":"uk","tag":"Facebook Ads","count":15},{"language":"vi","tag":"Facebook Ads","count":15},{"language":"zh-Hans","tag":"Facebook Ads","count":15},{"language":"zh-Hant","tag":"Facebook Ads","count":15}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".center{display:block;margin-left:auto;margin-right:auto;max-width:100%;height:auto}.welcome-banner{margin-left:auto;margin-right:auto;max-width:100%;height:auto;border-radius:12px}.custom-bullets{padding-left:0}.custom-bullets li{position:relative;padding-left:1.5em;margin-bottom:0.75em;list-style-type:none;line-height:1.4}.custom-bullets li::before{content:\"\\2022\";color:#2266c2;position:absolute;left:0.5em;top:0}.custom-bullets li:last-child{margin-bottom:0}.custom-bullets li>*{margin-top:0;margin-bottom:0}ul ul{margin-left:20px}.custom-bullets li::after,.custom-bullets li::before{border:none!important;background:none!important}.button{background-color:#2266c2;color:#fff;padding:16px 24px;border-radius:8px;border:none;transition-duration:0.2s;margin-top:100px}.button:hover{background-color:#133e76;color:white}.button2{background-color:#fff;color:#2266c2;padding:16px 24px;border-radius:8px;border:1px solid #2266c2;transition-duration:0.2s}.button2:hover{background-color:#133e76;color:white}.video-container{width:100%;max-width:560px;margin:0 auto}.video-container iframe{width:100%;height:auto;aspect-ratio:16 / 9}.plan-tag-light{font-family:\"JetBrains Mono\", monospace;display:inline-block;padding:2px 6px;border-radius:4px;font-size:12px;color:#ffffff;background-color:#16171b;margin-right:10px}.plan-tag-dark{font-family:\"JetBrains Mono\", monospace;display:inline-block;padding:2px 6px;border-radius:4px;font-size:12px;color:#3f4144;background-color:#b7b9bb;margin-right:10px}@media (min-width: 768px){.video-container{display:flex;justify-content:center;align-items:center}}code{font-size:0.96em;line-height:1.7em}dialog.ayr-playground{padding:0;border:none;background:transparent;width:min(1100px, calc(100vw - 32px));max-width:none;max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px);margin:auto;overflow-y:auto}dialog.ayr-playground::backdrop{background:rgb(3 7 18 / 0.6);backdrop-filter:blur(2px)}.ayr-playground-card{--ayr-border: rgb(3 7 18 / 0.1);--ayr-muted-bg: rgb(3 7 18 / 0.03);border:1px solid var(--ayr-border);border-radius:16px;background:rgb(var(--background-light));box-shadow:0 24px 48px -12px rgb(0 0 0 / 0.35)}.dark .ayr-playground-card{--ayr-border: rgb(255 255 255 / 0.1);--ayr-muted-bg: rgb(255 255 255 / 0.04);background:rgb(var(--background-dark))}.ayr-playground-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:1rem 1rem 0.75rem 1.25rem}.ayr-playground-close{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:8px;color:rgb(107 114 128)}.ayr-playground-close:hover{background:var(--ayr-muted-bg);color:inherit}.ayr-playground-request{display:flex;align-items:stretch;gap:0.75rem;padding:0 1.25rem 1rem;border-bottom:1px solid var(--ayr-border)}.ayr-playground-url{display:flex;flex:1;min-width:0;align-items:center;gap:0.75rem;min-height:44px;padding:0 0.875rem;border:1px solid var(--ayr-border);border-radius:10px;background:var(--ayr-muted-bg)}.ayr-playground-send{flex-shrink:0;padding:0 1.25rem;border-radius:10px}.ayr-playground-url code{padding:0;border:none;background:none}.ayr-playground-method{flex-shrink:0;padding:0.125rem 0.5rem;border-radius:6px;background:rgb(34 197 94 / 0.15);color:rgb(21 128 61);font-size:0.75rem;font-weight:700}.dark .ayr-playground-method{color:rgb(74 222 128)}.ayr-playground-body{display:grid;gap:1.75rem;padding:1.25rem}@media (min-width: 768px){.ayr-playground-body{grid-template-columns:minmax(0, 5fr) minmax(0, 7fr)}}.ayr-playground-fields,.ayr-playground-output{display:flex;flex-direction:column;gap:1.5rem;min-width:0}.ayr-playground-section-title{display:flex;align-items:center;gap:0.5rem;margin-bottom:0.75rem;font-size:0.75rem;font-weight:600;letter-spacing:0.05em;text-transform:uppercase;color:rgb(107 114 128)}.ayr-playground-output .code-block,.ayr-playground-output .code-group{margin-top:0;margin-bottom:0}.ayr-playground-status{padding:0.0625rem 0.5rem;border-radius:9999px;font-size:0.75rem;letter-spacing:normal;text-transform:none}.ayr-playground-status.is-ok{background:rgb(34 197 94 / 0.15);color:rgb(21 128 61)}.ayr-playground-status.is-error{background:rgb(239 68 68 / 0.15);color:rgb(185 28 28)}.dark .ayr-playground-status.is-ok{color:rgb(74 222 128)}.dark .ayr-playground-status.is-error{color:rgb(248 113 113)}.ayr-playground-empty{padding:1.5rem 1rem;border:1px dashed var(--ayr-border);border-radius:12px;text-align:center;font-size:0.875rem;color:rgb(107 114 128)}.ayr-playground-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.dark .ayr-playground-section-title,.dark .ayr-playground-empty,.dark .ayr-playground-close{color:rgb(156 163 175)}.dark .ayr-playground-close:hover{color:inherit}"}]}
{"page":{"pagePath":"vi/apis/ads/facebook/get-ad-insights","slug":"/vi/apis/ads/facebook/get-ad-insights","pageMetadata":{"title":"Insights","description":"Lấy chỉ số quảng cáo Facebook hàng ngày cho chiến dịch, nhóm quảng cáo hoặc quảng cáo, phân tách theo tuổi, giới tính, quốc gia hoặc vị trí.","api":"GET /ads/facebook/insights","href":"/vi/apis/ads/facebook/get-ad-insights"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Lấy chỉ số quảng cáo Facebook hàng ngày cho chiến dịch, nhóm quảng cáo hoặc quảng cáo, phân tách theo tuổi, giới tính, quốc gia hoặc vị trí.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const PlansAvailable=({plans=[],maxPackRequired})=>{const{Note}=_provideComponents()||{};if(!Note)_missingMdxReference(`Note`,true);let displayPlans=plans;if(plans\u0026\u0026plans.length===1){const lowerCasePlan=plans[0].toLowerCase();if(lowerCasePlan===`business`){displayPlans=[`Launch`,`Business`,`Enterprise`]}else if(lowerCasePlan===`premium`){displayPlans=[`Premium`,`Launch`,`Business`,`Enterprise`]}}return _jsxs(Note,{children:[`Available on `,displayPlans.length===1?`the `:``,displayPlans.join(`, `).replace(/\\b\\w/g,l=>l.toUpperCase()),` `,displayPlans.length>1?`plans`:`plan`,`.`,maxPackRequired\u0026\u0026_jsx(`span`,{onClick:()=>window.open(`https://www.ayrshare.com/docs/additional/maxpack`,`_self`),className:`mint-flex mint-items-center mint-mt-2 mint-cursor-pointer`,children:_jsx(`span`,{className:`mint-px-1.5 mint-py-0.5 mint-rounded mint-text-sm`,style:{backgroundColor:`#C264B6`,color:`white`,fontSize:`12px`},children:`Max Pack required`})})]})};const HeaderAPI=({noProfileKey,profileKeyRequired})=>{const _components={a:`a`,..._provideComponents()},{ParamField}=_components;if(!ParamField)_missingMdxReference(`ParamField`,true);return _jsxs(_Fragment,{children:[_jsxs(ParamField,{header:`Authorization`,type:`string`,required:true,children:[_jsx(_components.a,{href:`/apis/overview#authorization`,children:`API Key`}),` of the Primary Profile.`,_jsx(`br`,{}),_jsx(`br`,{}),`Format: `,_jsx(`code`,{children:`Authorization: Bearer API_KEY`})]}),!noProfileKey\u0026\u0026(profileKeyRequired?_jsxs(ParamField,{header:`Profile-Key`,type:`string`,required:true,children:[_jsx(_components.a,{href:`/apis/overview#profile-key-format`,children:`Profile Key`}),` of a User Profile.`,_jsx(`br`,{}),_jsx(`br`,{}),`Format: `,_jsx(`code`,{children:`Profile-Key: PROFILE_KEY`})]}):_jsxs(ParamField,{header:`Profile-Key`,type:`string`,children:[_jsx(_components.a,{href:`/apis/overview#profile-key-format`,children:`Profile Key`}),` of a User Profile.`,_jsx(`br`,{}),_jsx(`br`,{}),`Format: `,_jsx(`code`,{children:`Profile-Key: PROFILE_KEY`})]}))]})};function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Heading,Note,ParamField,Table,_MdxComponentBoundary}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(_MdxComponentBoundary,{name:`PlansAvailable`,children:_jsx(PlansAvailable,{plans:[`business`],maxPackRequired:false})}),`\n`,_jsx(_components.p,{children:`Lấy hiệu suất quảng cáo Facebook theo thời gian thực, mỗi ngày một hàng, cho các chiến dịch, nhóm quảng cáo hoặc quảng cáo của bạn.\nChọn các chỉ số bạn muốn, phân tách chúng theo độ tuổi, giới tính, quốc gia hoặc vị trí hiển thị, và phân trang qua các khoảng thời gian dài.`}),`\n`,_jsxs(`ul`,{className:`custom-bullets`,children:[_jsx(`li`,{children:`Số liệu được đọc từ Meta tại thời điểm bạn gọi, không phải từ bản sao được tạo mỗi đêm.`}),_jsx(`li`,{children:_jsxs(_components.p,{children:[`Sử dụng `,_jsx(_components.a,{href:`/apis/ads/facebook/get-ad-history`,children:`Lịch sử`}),` cho bản ghi chi phí hằng ngày. Sử dụng Insights cho báo cáo và phân tích.`]})}),_jsxs(`li`,{children:[`Tất cả các giá trị tiền tệ đều tính theo đơn vị tiền tệ của tài khoản quảng cáo, được trả về trong `,_jsx(_components.code,{children:`currency`}),` trên mỗi hàng.`]}),_jsx(`li`,{children:_jsx(_components.p,{children:`Các chiến dịch phải được tạo thông qua Ayrshare cho profile này, và các nhóm quảng cáo phải nằm trong\nmột chiến dịch như vậy. Một quảng cáo được tạo thông qua\nAyrshare cho một profile khác sẽ bị từ chối. Các ad id khác được đọc bằng tài khoản Meta được liên kết\nvới profile này, vì vậy Meta chỉ trả về những quảng cáo mà tài khoản đó có thể xem.`})}),_jsx(`li`,{children:_jsxs(_components.p,{children:[`Mỗi request chỉ bao gồm một tài khoản quảng cáo. Các id từ nhiều tài khoản quảng cáo sẽ trả về mã `,_jsx(_components.code,{children:`101`}),`, và điều tương tự\ncũng xảy ra với nhiều ad id mà Ayrshare không có bản ghi. Hãy yêu cầu từng id một.`]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`tham-số-header`,children:`Tham số Header`}),`\n`,_jsx(_MdxComponentBoundary,{name:`HeaderAPI`,children:_jsx(HeaderAPI,{})}),`\n`,_jsx(Heading,{level:`2`,id:`tham-số-query`,children:`Tham số Query`}),`\n`,_jsx(ParamField,{query:`level`,type:`string`,required:true,id:`param-level`,children:_jsxs(_components.p,{children:[`Đối tượng mà mỗi hàng báo cáo: `,_jsx(_components.code,{children:`campaign`}),`, `,_jsx(_components.code,{children:`adSet`}),` hoặc `,_jsx(_components.code,{children:`ad`}),`.`]})}),`\n`,_jsxs(ParamField,{query:`ids`,type:`string`,id:`param-ids`,children:[_jsxs(_components.p,{children:[`Các campaign id, ad set id hoặc ad id phân tách bằng dấu phẩy, tối đa 50. Bắt buộc với `,_jsx(_components.code,{children:`level=campaign`}),` và\n`,_jsx(_components.code,{children:`level=adSet`}),`.`]}),_jsxs(_components.p,{children:[`Với `,_jsx(_components.code,{children:`level=ad`}),`, bạn có thể bỏ qua `,_jsx(_components.code,{children:`ids`}),` và gửi `,_jsx(_components.code,{children:`accountId`}),` thay thế. Khi đó báo cáo sẽ bao gồm các quảng cáo\nbạn đã tạo thông qua Ayrshare cho profile này trong tài khoản quảng cáo đó, chứ không phải mọi quảng cáo trong tài khoản. Cách này hoạt động\nvới tối đa 50 quảng cáo như vậy. Nếu nhiều hơn, hãy gửi id của chúng hoặc báo cáo theo chiến dịch. Nếu không tìm thấy quảng cáo nào,\nbáo cáo sẽ trống.`]})]}),`\n`,_jsxs(ParamField,{query:`accountId`,type:`string`,id:`param-account-id`,children:[_jsxs(_components.p,{children:[`ID tài khoản quảng cáo, có hoặc không có tiền tố `,_jsx(_components.code,{children:`act_`}),` (`,_jsx(_components.code,{children:`1234567890`}),` hoặc `,_jsx(_components.code,{children:`act_1234567890`}),`).`]}),_jsxs(_components.p,{children:[`Bắt buộc với `,_jsx(_components.code,{children:`level=ad`}),` khi bỏ qua `,_jsx(_components.code,{children:`ids`}),`.`]})]}),`\n`,_jsx(ParamField,{query:`metrics`,type:`string`,id:`param-metrics`,children:_jsxs(_components.p,{children:[`Các chỉ số cần trả về, phân tách bằng dấu phẩy. Bỏ qua tham số này để nhận tất cả. Xem `,_jsx(_components.a,{href:`#metrics`,children:`Chỉ số`}),`.`]})}),`\n`,_jsx(ParamField,{query:`breakdowns`,type:`string`,id:`param-breakdowns`,children:_jsxs(_components.p,{children:[`Các breakdown phân tách bằng dấu phẩy: `,_jsx(_components.code,{children:`age`}),`, `,_jsx(_components.code,{children:`gender`}),`, `,_jsx(_components.code,{children:`country`}),`, `,_jsx(_components.code,{children:`placement`}),`. Khi đó mỗi ngày sẽ có một hàng cho mỗi\ngiá trị, hoặc cho mỗi tổ hợp khi dùng `,_jsx(_components.code,{children:`age,gender`}),`. Hãy gửi từng breakdown một, hoặc `,_jsx(_components.code,{children:`age,gender`}),`; Meta\ntừ chối các kết hợp khác (chẳng hạn `,_jsx(_components.code,{children:`age,country`}),`), vì vậy chúng sẽ trả về mã `,_jsx(_components.code,{children:`101`}),`.`]})}),`\n`,_jsx(ParamField,{query:`startDate`,type:`string`,default:`30 ngày trước`,id:`param-start-date`,children:_jsxs(_components.p,{children:[`Ngày đầu tiên, theo định dạng `,_jsx(_components.code,{children:`YYYY-MM-DD`}),`. Có thể lùi xa tối đa 37 tháng.`]})}),`\n`,_jsx(ParamField,{query:`endDate`,type:`string`,default:`hôm nay`,id:`param-end-date`,children:_jsxs(_components.p,{children:[`Ngày cuối cùng, theo định dạng `,_jsx(_components.code,{children:`YYYY-MM-DD`}),`.`]})}),`\n`,_jsx(ParamField,{query:`next`,type:`string`,id:`param-next`,children:_jsxs(_components.p,{children:[`Giá trị `,_jsx(_components.code,{children:`meta.pagination.next`}),` từ phản hồi trước đó, để lấy trang tiếp theo.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`metrics`,children:`Chỉ số`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Chỉ số`}),_jsx(_components.th,{children:`Kiểu`}),_jsx(_components.th,{children:`Ý nghĩa`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`spend`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Số tiền đã chi`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`impressions`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Số lần quảng cáo được hiển thị`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`reach`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Số người đã xem quảng cáo ít nhất một lần`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`clicks`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Số lượt nhấp`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`cpm`})}),_jsxs(_components.td,{children:[`number hoặc `,_jsx(_components.code,{children:`null`})]}),_jsx(_components.td,{children:`Chi phí cho mỗi 1.000 lượt hiển thị`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`cpc`})}),_jsxs(_components.td,{children:[`number hoặc `,_jsx(_components.code,{children:`null`})]}),_jsxs(_components.td,{children:[`Chi phí cho mỗi lượt nhấp. `,_jsx(_components.code,{children:`null`}),` vào ngày không có lượt nhấp`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ctr`})}),_jsxs(_components.td,{children:[`number hoặc `,_jsx(_components.code,{children:`null`})]}),_jsx(_components.td,{children:`Tỷ lệ nhấp, tính theo phần trăm`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`actions`})}),_jsx(_components.td,{children:`array`}),_jsx(_components.td,{children:`Mỗi loại hành động mà Meta đã ghi nhận, kèm theo số lượng`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`conversionValue`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Tổng giá trị các giao dịch mua`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Facebook báo cáo mọi chỉ số trong bảng này. Một ngoại lệ: Meta không báo cáo `,_jsx(_components.code,{children:`reach`}),` cho báo cáo có\n`,_jsx(_components.code,{children:`breakdowns`}),` bắt đầu từ hơn 13 tháng trước, vì vậy `,_jsx(_components.code,{children:`reach`}),` bị bỏ khỏi các hàng đó. Trên các mạng không báo cáo một chỉ số, chỉ số đó sẽ bị bỏ\nkhỏi các hàng thay vì được trả về là `,_jsx(_components.code,{children:`0`}),`, và việc yêu cầu chỉ số đó sẽ trả về mã `,_jsx(_components.code,{children:`101`}),`.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Meta ghi nhận một số hành động dưới nhiều loại, vì vậy đừng cộng dồn các giá trị `,_jsx(_components.code,{children:`actions`}),`. Ví\ndụ, `,_jsx(_components.code,{children:`omni_purchase`}),` đã bao gồm `,_jsx(_components.code,{children:`purchase`}),`. `,_jsx(_components.code,{children:`conversionValue`}),` chỉ tính mỗi giao dịch mua một lần.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`paging`,children:`Phân trang`}),`\n`,_jsxs(_components.p,{children:[`Mỗi phản hồi trả về tối đa 500 hàng. Nếu còn nhiều hơn, `,_jsx(_components.code,{children:`meta.pagination.hasMore`}),` là `,_jsx(_components.code,{children:`true`}),` và `,_jsx(_components.code,{children:`meta.pagination.next`}),` sẽ được đặt. Gửi lại cùng request đó\nvới `,_jsx(_components.code,{children:`next`}),` được đặt thành giá trị này để lấy trang tiếp theo. Ở trang cuối cùng, `,_jsx(_components.code,{children:`hasMore`}),` là `,_jsx(_components.code,{children:`false`}),` và không có `,_jsx(_components.code,{children:`next`}),`. Một giá trị `,_jsx(_components.code,{children:`next`}),`\nchỉ hoạt động với các tham số mà nó được tạo ra: với tham số khác, request sẽ trả về `,_jsx(_components.code,{children:`code: 101`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Lỗi`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Mã`}),_jsx(_components.th,{children:`Khi nào`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`101`})}),_jsxs(_components.td,{children:[`Thiếu tham số hoặc tham số sai, breakdown hoặc chỉ số không được hỗ trợ, `,_jsx(_components.code,{children:`startDate`}),` cách đây hơn 37 tháng, gửi hơn 50 id, các id thuộc nhiều tài khoản quảng cáo, hoặc Meta từ chối kết hợp breakdown`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsxs(_components.td,{children:[`Chiến dịch, nhóm quảng cáo hoặc quảng cáo không thuộc về bạn, hoặc `,_jsx(_components.code,{children:`accountId`}),` không phải là tài khoản quảng cáo mà Ayrshare ghi nhận cho các id bạn đã gửi. Đối với nhóm quảng cáo, `,_jsx(_components.code,{children:`accountId`}),` cũng phải là tài khoản quảng cáo mà Meta báo cáo cho nhóm quảng cáo đó. Đối với quảng cáo không có bản ghi trong Ayrshare, `,_jsx(_components.code,{children:`accountId`}),` không được kiểm tra và quảng cáo được đọc riêng`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`370`})}),_jsx(_components.td,{children:`Meta không thể trả về insights. Hãy thử lại`})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{PlansAvailable,HeaderAPI,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Insights","description":"Lấy chỉ số quảng cáo Facebook hàng ngày cho chiến dịch, nhóm quảng cáo hoặc quảng cáo, phân tách theo tuổi, giới tính, quốc gia hoặc vị trí.","api":"GET /ads/facebook/insights","href":"/vi/apis/ads/facebook/get-ad-insights"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const PlansAvailable=()=>null;const HeaderAPI=()=>null;function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,ParamField,RequestExample,ResponseExample,Table,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!Table)_missingMdxReference(`Table`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(_MdxComponentBoundary,{name:`PlansAvailable`,children:_jsx(PlansAvailable,{plans:[`business`],maxPackRequired:false})}),`\n`,_jsx(_components.p,{children:`Lấy hiệu suất quảng cáo Facebook theo thời gian thực, mỗi ngày một hàng, cho các chiến dịch, nhóm quảng cáo hoặc quảng cáo của bạn.\nChọn các chỉ số bạn muốn, phân tách chúng theo độ tuổi, giới tính, quốc gia hoặc vị trí hiển thị, và phân trang qua các khoảng thời gian dài.`}),`\n`,_jsxs(`ul`,{className:`custom-bullets`,children:[_jsx(`li`,{children:`Số liệu được đọc từ Meta tại thời điểm bạn gọi, không phải từ bản sao được tạo mỗi đêm.`}),_jsx(`li`,{children:_jsxs(_components.p,{children:[`Sử dụng `,_jsx(_components.a,{href:`/apis/ads/facebook/get-ad-history`,children:`Lịch sử`}),` cho bản ghi chi phí hằng ngày. Sử dụng Insights cho báo cáo và phân tích.`]})}),_jsxs(`li`,{children:[`Tất cả các giá trị tiền tệ đều tính theo đơn vị tiền tệ của tài khoản quảng cáo, được trả về trong `,_jsx(_components.code,{children:`currency`}),` trên mỗi hàng.`]}),_jsx(`li`,{children:_jsx(_components.p,{children:`Các chiến dịch phải được tạo thông qua Ayrshare cho profile này, và các nhóm quảng cáo phải nằm trong\nmột chiến dịch như vậy. Một quảng cáo được tạo thông qua\nAyrshare cho một profile khác sẽ bị từ chối. Các ad id khác được đọc bằng tài khoản Meta được liên kết\nvới profile này, vì vậy Meta chỉ trả về những quảng cáo mà tài khoản đó có thể xem.`})}),_jsx(`li`,{children:_jsxs(_components.p,{children:[`Mỗi request chỉ bao gồm một tài khoản quảng cáo. Các id từ nhiều tài khoản quảng cáo sẽ trả về mã `,_jsx(_components.code,{children:`101`}),`, và điều tương tự\ncũng xảy ra với nhiều ad id mà Ayrshare không có bản ghi. Hãy yêu cầu từng id một.`]})})]}),`\n`,_jsx(Heading,{level:`2`,id:`tham-số-header`,children:`Tham số Header`}),`\n`,_jsx(_MdxComponentBoundary,{name:`HeaderAPI`,children:_jsx(HeaderAPI,{})}),`\n`,_jsx(Heading,{level:`2`,id:`tham-số-query`,children:`Tham số Query`}),`\n`,_jsx(ParamField,{query:`level`,type:`string`,required:true,id:`param-level`,children:_jsxs(_components.p,{children:[`Đối tượng mà mỗi hàng báo cáo: `,_jsx(_components.code,{children:`campaign`}),`, `,_jsx(_components.code,{children:`adSet`}),` hoặc `,_jsx(_components.code,{children:`ad`}),`.`]})}),`\n`,_jsxs(ParamField,{query:`ids`,type:`string`,id:`param-ids`,children:[_jsxs(_components.p,{children:[`Các campaign id, ad set id hoặc ad id phân tách bằng dấu phẩy, tối đa 50. Bắt buộc với `,_jsx(_components.code,{children:`level=campaign`}),` và\n`,_jsx(_components.code,{children:`level=adSet`}),`.`]}),_jsxs(_components.p,{children:[`Với `,_jsx(_components.code,{children:`level=ad`}),`, bạn có thể bỏ qua `,_jsx(_components.code,{children:`ids`}),` và gửi `,_jsx(_components.code,{children:`accountId`}),` thay thế. Khi đó báo cáo sẽ bao gồm các quảng cáo\nbạn đã tạo thông qua Ayrshare cho profile này trong tài khoản quảng cáo đó, chứ không phải mọi quảng cáo trong tài khoản. Cách này hoạt động\nvới tối đa 50 quảng cáo như vậy. Nếu nhiều hơn, hãy gửi id của chúng hoặc báo cáo theo chiến dịch. Nếu không tìm thấy quảng cáo nào,\nbáo cáo sẽ trống.`]})]}),`\n`,_jsxs(ParamField,{query:`accountId`,type:`string`,id:`param-account-id`,children:[_jsxs(_components.p,{children:[`ID tài khoản quảng cáo, có hoặc không có tiền tố `,_jsx(_components.code,{children:`act_`}),` (`,_jsx(_components.code,{children:`1234567890`}),` hoặc `,_jsx(_components.code,{children:`act_1234567890`}),`).`]}),_jsxs(_components.p,{children:[`Bắt buộc với `,_jsx(_components.code,{children:`level=ad`}),` khi bỏ qua `,_jsx(_components.code,{children:`ids`}),`.`]})]}),`\n`,_jsx(ParamField,{query:`metrics`,type:`string`,id:`param-metrics`,children:_jsxs(_components.p,{children:[`Các chỉ số cần trả về, phân tách bằng dấu phẩy. Bỏ qua tham số này để nhận tất cả. Xem `,_jsx(_components.a,{href:`#metrics`,children:`Chỉ số`}),`.`]})}),`\n`,_jsx(ParamField,{query:`breakdowns`,type:`string`,id:`param-breakdowns`,children:_jsxs(_components.p,{children:[`Các breakdown phân tách bằng dấu phẩy: `,_jsx(_components.code,{children:`age`}),`, `,_jsx(_components.code,{children:`gender`}),`, `,_jsx(_components.code,{children:`country`}),`, `,_jsx(_components.code,{children:`placement`}),`. Khi đó mỗi ngày sẽ có một hàng cho mỗi\ngiá trị, hoặc cho mỗi tổ hợp khi dùng `,_jsx(_components.code,{children:`age,gender`}),`. Hãy gửi từng breakdown một, hoặc `,_jsx(_components.code,{children:`age,gender`}),`; Meta\ntừ chối các kết hợp khác (chẳng hạn `,_jsx(_components.code,{children:`age,country`}),`), vì vậy chúng sẽ trả về mã `,_jsx(_components.code,{children:`101`}),`.`]})}),`\n`,_jsx(ParamField,{query:`startDate`,type:`string`,default:`30 ngày trước`,id:`param-start-date`,children:_jsxs(_components.p,{children:[`Ngày đầu tiên, theo định dạng `,_jsx(_components.code,{children:`YYYY-MM-DD`}),`. Có thể lùi xa tối đa 37 tháng.`]})}),`\n`,_jsx(ParamField,{query:`endDate`,type:`string`,default:`hôm nay`,id:`param-end-date`,children:_jsxs(_components.p,{children:[`Ngày cuối cùng, theo định dạng `,_jsx(_components.code,{children:`YYYY-MM-DD`}),`.`]})}),`\n`,_jsx(ParamField,{query:`next`,type:`string`,id:`param-next`,children:_jsxs(_components.p,{children:[`Giá trị `,_jsx(_components.code,{children:`meta.pagination.next`}),` từ phản hồi trước đó, để lấy trang tiếp theo.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`metrics`,children:`Chỉ số`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Chỉ số`}),_jsx(_components.th,{children:`Kiểu`}),_jsx(_components.th,{children:`Ý nghĩa`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`spend`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Số tiền đã chi`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`impressions`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Số lần quảng cáo được hiển thị`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`reach`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Số người đã xem quảng cáo ít nhất một lần`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`clicks`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Số lượt nhấp`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`cpm`})}),_jsxs(_components.td,{children:[`number hoặc `,_jsx(_components.code,{children:`null`})]}),_jsx(_components.td,{children:`Chi phí cho mỗi 1.000 lượt hiển thị`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`cpc`})}),_jsxs(_components.td,{children:[`number hoặc `,_jsx(_components.code,{children:`null`})]}),_jsxs(_components.td,{children:[`Chi phí cho mỗi lượt nhấp. `,_jsx(_components.code,{children:`null`}),` vào ngày không có lượt nhấp`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ctr`})}),_jsxs(_components.td,{children:[`number hoặc `,_jsx(_components.code,{children:`null`})]}),_jsx(_components.td,{children:`Tỷ lệ nhấp, tính theo phần trăm`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`actions`})}),_jsx(_components.td,{children:`array`}),_jsx(_components.td,{children:`Mỗi loại hành động mà Meta đã ghi nhận, kèm theo số lượng`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`conversionValue`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Tổng giá trị các giao dịch mua`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Facebook báo cáo mọi chỉ số trong bảng này. Một ngoại lệ: Meta không báo cáo `,_jsx(_components.code,{children:`reach`}),` cho báo cáo có\n`,_jsx(_components.code,{children:`breakdowns`}),` bắt đầu từ hơn 13 tháng trước, vì vậy `,_jsx(_components.code,{children:`reach`}),` bị bỏ khỏi các hàng đó. Trên các mạng không báo cáo một chỉ số, chỉ số đó sẽ bị bỏ\nkhỏi các hàng thay vì được trả về là `,_jsx(_components.code,{children:`0`}),`, và việc yêu cầu chỉ số đó sẽ trả về mã `,_jsx(_components.code,{children:`101`}),`.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Meta ghi nhận một số hành động dưới nhiều loại, vì vậy đừng cộng dồn các giá trị `,_jsx(_components.code,{children:`actions`}),`. Ví\ndụ, `,_jsx(_components.code,{children:`omni_purchase`}),` đã bao gồm `,_jsx(_components.code,{children:`purchase`}),`. `,_jsx(_components.code,{children:`conversionValue`}),` chỉ tính mỗi giao dịch mua một lần.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`paging`,children:`Phân trang`}),`\n`,_jsxs(_components.p,{children:[`Mỗi phản hồi trả về tối đa 500 hàng. Nếu còn nhiều hơn, `,_jsx(_components.code,{children:`meta.pagination.hasMore`}),` là `,_jsx(_components.code,{children:`true`}),` và `,_jsx(_components.code,{children:`meta.pagination.next`}),` sẽ được đặt. Gửi lại cùng request đó\nvới `,_jsx(_components.code,{children:`next`}),` được đặt thành giá trị này để lấy trang tiếp theo. Ở trang cuối cùng, `,_jsx(_components.code,{children:`hasMore`}),` là `,_jsx(_components.code,{children:`false`}),` và không có `,_jsx(_components.code,{children:`next`}),`. Một giá trị `,_jsx(_components.code,{children:`next`}),`\nchỉ hoạt động với các tham số mà nó được tạo ra: với tham số khác, request sẽ trả về `,_jsx(_components.code,{children:`code: 101`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Lỗi`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Mã`}),_jsx(_components.th,{children:`Khi nào`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`101`})}),_jsxs(_components.td,{children:[`Thiếu tham số hoặc tham số sai, breakdown hoặc chỉ số không được hỗ trợ, `,_jsx(_components.code,{children:`startDate`}),` cách đây hơn 37 tháng, gửi hơn 50 id, các id thuộc nhiều tài khoản quảng cáo, hoặc Meta từ chối kết hợp breakdown`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsxs(_components.td,{children:[`Chiến dịch, nhóm quảng cáo hoặc quảng cáo không thuộc về bạn, hoặc `,_jsx(_components.code,{children:`accountId`}),` không phải là tài khoản quảng cáo mà Ayrshare ghi nhận cho các id bạn đã gửi. Đối với nhóm quảng cáo, `,_jsx(_components.code,{children:`accountId`}),` cũng phải là tài khoản quảng cáo mà Meta báo cáo cho nhóm quảng cáo đó. Đối với quảng cáo không có bản ghi trong Ayrshare, `,_jsx(_components.code,{children:`accountId`}),` không được kiểm tra và quảng cáo được đọc riêng`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`370`})}),_jsx(_components.td,{children:`Meta không thể trả về insights. Hãy thử lại`})]})]})]}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`-H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization: Bearer API_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`-X `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`GET`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.ayrshare.com/api/ads/facebook/insights?level=campaign\u0026ids=120200000000000001\u0026startDate=2026-09-01\u0026endDate=2026-09-02\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`15`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` params`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` URLSearchParams`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` level:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"campaign\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ids:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"120200000000000001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` startDate:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"2026-09-01\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` endDate:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"2026-09-02\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`https://api.ayrshare.com/api/ads/facebook/insights?\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`params`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"GET\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `Bearer \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`then`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`())`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`then`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`13`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`headers `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Bearer API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`params `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'level'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'campaign'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'ids'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'120200000000000001'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'startDate'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2026-09-01'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'endDate'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'2026-09-02'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`r `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://api.ayrshare.com/api/ads/facebook/insights'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`headers, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`params`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`params)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(r.json())`})]}),`\n`]})})})]}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`200: Success`,numberOfLines:`29`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`29`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"platform\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"facebook\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"level\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"campaign\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"startDate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-01\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"endDate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-02\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"insights\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"date\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-01\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"level\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"campaign\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"120200000000000001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"USD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"spend\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`12.34`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"impressions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"reach\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3100`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"clicks\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`80`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cpm\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3.085`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cpc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.15425`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"ctr\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"actions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"link_click\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"value\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`75`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"omni_purchase\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"value\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"conversionValue\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`89.97`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"meta\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"pagination\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"hasMore\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`200: Breakdowns`,numberOfLines:`31`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`31`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"platform\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"facebook\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"level\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ad\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"startDate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-01\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"endDate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-01\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"insights\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"date\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-01\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"level\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ad\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"120210000000000001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"age\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"25-34\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"gender\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"female\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"EUR\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"spend\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1.5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"impressions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`300`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"date\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-01\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"level\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ad\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"120210000000000001\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"age\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"25-34\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"gender\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"male\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"EUR\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"spend\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"impressions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"meta\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"pagination\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"hasMore\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`400: Not Yours`,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"action\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ads\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`400`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The ad is not found or not authorized.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{PlansAvailable,HeaderAPI,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Insights","description":"Lấy chỉ số quảng cáo Facebook hàng ngày cho chiến dịch, nhóm quảng cáo hoặc quảng cáo, phân tách theo tuổi, giới tính, quốc gia hoặc vị trí.","api":"GET /ads/facebook/insights","href":"/vi/apis/ads/facebook/get-ad-insights"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Tham số Header","slug":"tham-số-header","depth":2,"children":[]},{"title":"Tham số Query","slug":"tham-số-query","depth":2,"children":[]},{"title":"Chỉ số","slug":"metrics","depth":2,"children":[]},{"title":"Phân trang","slug":"paging","depth":2,"children":[]},{"title":"Lỗi","slug":"errors","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"3\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">-H \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Authorization: Bearer API_KEY\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">-X \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">GET\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://api.ayrshare.com/api/ads/facebook/insights?level=campaign\u0026#x26;ids=120200000000000001\u0026#x26;startDate=2026-09-01\u0026#x26;endDate=2026-09-02\"\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"JavaScript","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"15\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> API_KEY\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"API_KEY\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">;\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> params\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\"> new\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> URLSearchParams\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">({\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> level:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"campaign\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> ids:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"120200000000000001\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> startDate:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"2026-09-01\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> endDate:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"2026-09-02\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">});\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">fetch\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">`https://api.ayrshare.com/api/ads/facebook/insights?\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">${\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">params\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">`\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> method:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"GET\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> headers:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">Authorization:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> `Bearer \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">${\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\">API_KEY\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">`\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">})\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> .\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">then\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">((\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">res\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">) \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">=>\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> res\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">json\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">())\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> .\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">then\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">((\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">json\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">) \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">=>\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> console\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">log\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">json\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">))\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> .\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">catch\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">console\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">error\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"13\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">headers \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'Authorization'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'Bearer API_KEY'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">params \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'level'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'campaign'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'ids'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'120200000000000001'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'startDate'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'2026-09-01'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'endDate'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'2026-09-02'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">r \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests.get(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'https://api.ayrshare.com/api/ads/facebook/insights'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">headers\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">headers, \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">params\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">params)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\">print\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(r.json())\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200: Success","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"29\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"platform\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"facebook\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"level\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"campaign\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"startDate\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-09-01\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"endDate\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-09-02\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"insights\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"date\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-09-01\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"level\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"campaign\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"120200000000000001\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"currency\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"USD\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"spend\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">12.34\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"impressions\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">4000\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"reach\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">3100\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"clicks\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">80\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"cpm\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">3.085\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"cpc\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0.15425\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"ctr\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">2\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"actions\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"link_click\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"value\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">75\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"omni_purchase\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"value\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">3\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"conversionValue\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">89.97\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"count\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"meta\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: { \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"pagination\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: { \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"hasMore\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> } }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"200: Breakdowns","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"31\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"platform\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"facebook\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"level\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"ad\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"startDate\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-09-01\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"endDate\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-09-01\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"insights\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"date\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-09-01\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"level\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"ad\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"120210000000000001\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"age\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"25-34\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"gender\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"female\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"currency\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"EUR\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"spend\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1.5\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"impressions\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">300\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"date\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-09-01\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"level\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"ad\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"120210000000000001\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"age\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"25-34\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"gender\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"male\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"currency\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"EUR\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"spend\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"impressions\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">200\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"count\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">2\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"meta\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: { \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"pagination\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: { \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"hasMore\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> } }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"400: Not Yours","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"6\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"action\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"ads\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">400\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"The ad is not found or not authorized.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Insights","path":"/ads/facebook/insights","servers":[{"url":"https://api.ayrshare.com/api"}],"method":"get","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{"level":{"schema":[{"type":"string","description":"Đối tượng mà mỗi hàng báo cáo: `campaign` , `adSet` hoặc `ad` .","required":true}]},"ids":{"schema":[{"type":"string","description":"Các campaign id, ad set id hoặc ad id phân tách bằng dấu phẩy, tối đa 50. Bắt buộc với `level=campaign` và `level=adSet` . Với `level=ad` , bạn có thể bỏ qua `ids` và gửi `accountId` thay thế. Khi đó báo cáo sẽ bao gồm các quảng cáo bạn đã tạo thông qua Ayrshare cho profile này trong tài khoản quảng cáo đó, chứ không phải mọi quảng cáo trong tài khoản. Cách này hoạt động với tối đa 50 quảng cáo như vậy. Nếu nhiều hơn, hãy gửi id của chúng hoặc báo cáo theo chiến dịch. Nếu không tìm thấy quảng cáo nào, báo cáo sẽ trống."}]},"accountId":{"schema":[{"type":"string","description":"ID tài khoản quảng cáo, có hoặc không có tiền tố `act_` ( `1234567890` hoặc `act_1234567890` ). Bắt buộc với `level=ad` khi bỏ qua `ids` ."}]},"metrics":{"schema":[{"type":"string","description":"Các chỉ số cần trả về, phân tách bằng dấu phẩy. Bỏ qua tham số này để nhận tất cả. Xem Chỉ số ."}]},"breakdowns":{"schema":[{"type":"string","description":"Các breakdown phân tách bằng dấu phẩy: `age` , `gender` , `country` , `placement` . Khi đó mỗi ngày sẽ có một hàng cho mỗi giá trị, hoặc cho mỗi tổ hợp khi dùng `age,gender` . Hãy gửi từng breakdown một, hoặc `age,gender` ; Meta từ chối các kết hợp khác (chẳng hạn `age,country` ), vì vậy chúng sẽ trả về mã `101` ."}]},"startDate":{"schema":[{"type":"string","description":"Ngày đầu tiên, theo định dạng `YYYY-MM-DD` . Có thể lùi xa tối đa 37 tháng."}]},"endDate":{"schema":[{"type":"string","description":"Ngày cuối cùng, theo định dạng `YYYY-MM-DD` ."}]},"next":{"schema":[{"type":"string","description":"Giá trị `meta.pagination.next` từ phản hồi trước đó, để lấy trang tiếp theo."}]}},"header":{},"cookie":{},"path":{}},"body":{}},"response":{},"deprecated":false}},"jsLinks":["/docs/_mintlify/custom/ayrshare-docs/80ea29d8530ebaa2/script.js","/docs/_mintlify/custom/ayrshare-docs/3e93073b19ca64e9/tools/maintainScroll.js"],"dynamicCss":".mint-mt-2 {\n margin-top: 0.5rem\n}\n.mint-flex {\n display: flex\n}\n.mint-cursor-pointer {\n cursor: pointer\n}\n.mint-items-center {\n align-items: center\n}\n.mint-rounded {\n border-radius: 0.25rem\n}\n.mint-px-1\\.5 {\n padding-left: 0.375rem;\n padding-right: 0.375rem\n}\n.mint-py-0\\.5 {\n padding-top: 0.125rem;\n padding-bottom: 0.125rem\n}\n.mint-text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem\n}","subdomain":"ayrshare-docs","siteName":"Ayrshare Docs","title":"Insights - Ayrshare Docs","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/apis/ads/facebook/get-ad-insights","matchLevel":1},"es":{"href":"/es/apis/ads/facebook/get-ad-insights","matchLevel":1},"cn":{"href":"/cn/apis/ads/facebook/get-ad-insights","matchLevel":1,"hidden":true},"zh":{"href":"/zh/apis/ads/facebook/get-ad-insights","matchLevel":1,"hidden":true},"pt-BR":{"href":"/pt-BR/apis/ads/facebook/get-ad-insights","matchLevel":1},"fr":{"href":"/fr/apis/ads/facebook/get-ad-insights","matchLevel":1},"de":{"href":"/de/apis/ads/facebook/get-ad-insights","matchLevel":1},"vi":{"href":"/vi/apis/ads/facebook/get-ad-insights","matchLevel":0},"ja":{"href":"/ja/apis/ads/facebook/get-ad-insights","matchLevel":1},"uk":{"href":"/uk/apis/ads/facebook/get-ad-insights","matchLevel":1},"hi":{"href":"/hi/apis/ads/facebook/get-ad-insights","matchLevel":1},"ar":{"href":"/ar/apis/ads/facebook/get-ad-insights","matchLevel":1},"zh-Hans":{"href":"/zh-Hans/apis/ads/facebook/get-ad-insights","matchLevel":1},"zh-Hant":{"href":"/zh-Hant/apis/ads/facebook/get-ad-insights","matchLevel":1}}},"lastModified":"2026-11-24T17:49:35.664Z","originalFileLocation":"vi/apis/ads/facebook/get-ad-insights.mdx","locale":"vi"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Lấy chỉ số quảng cáo Facebook hàng ngày cho chiến dịch, nhóm quảng cáo hoặc quảng cáo, phân tách theo tuổi, giới tính, quốc gia hoặc vị trí.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Ayrshare Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/ayrshare-docs/tc_XJFteIEk_1d3D/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/ayrshare-docs/tc_XJFteIEk_1d3D/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/ayrshare-docs/tc_XJFteIEk_1d3D/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/ayrshare-docs/tc_XJFteIEk_1d3D/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/ayrshare-docs/tc_XJFteIEk_1d3D/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/ayrshare-docs/tc_XJFteIEk_1d3D/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/ayrshare-docs/tc_XJFteIEk_1d3D/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/ayrshare-docs/tc_XJFteIEk_1d3D/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/ayrshare-docs/tc_XJFteIEk_1d3D/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Insights - Ayrshare Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Lấy chỉ số quảng cáo Facebook hàng ngày cho chiến dịch, nhóm quảng cáo hoặc quảng cáo, phân tách theo tuổi, giới tính, quốc gia hoặc vị trí.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Ayrshare Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.ayrshare.com/docs/vi/apis/ads/facebook/get-ad-insights\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://ayrshare-docs.mintlify.site/docs/_mintlify/api/og/v2?division=Facebook+Ads\u0026amp;title=Insights\u0026amp;description=L%E1%BA%A5y+ch%E1%BB%89+s%E1%BB%91+qu%E1%BA%A3ng+c%C3%A1o+Facebook+h%C3%A0ng+ng%C3%A0y+cho+chi%E1%BA%BFn+d%E1%BB%8Bch%2C+nh%C3%B3m+qu%E1%BA%A3ng+c%C3%A1o+ho%E1%BA%B7c+qu%E1%BA%A3ng+c%C3%A1o%2C+ph%C3%A2n+t%C3%A1ch+theo+tu%E1%BB%95i%2C+gi%E1%BB%9Bi+t%C3%ADnh%2C+qu%E1%BB%91c+gia+ho%E1%BA%B7c+v%E1%BB%8B+tr%C3%AD.\u0026amp;theme=722a7095c53b95fd5a0669f2\u0026amp;signature=fa30efe2ea9fc7e849335f3e09d9a3333a149564c14be1cad82db1f73a175fc4\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Insights - Ayrshare Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Lấy chỉ số quảng cáo Facebook hàng ngày cho chiến dịch, nhóm quảng cáo hoặc quảng cáo, phân tách theo tuổi, giới tính, quốc gia hoặc vị trí.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://ayrshare-docs.mintlify.site/docs/_mintlify/api/og/v2?division=Facebook+Ads\u0026amp;title=Insights\u0026amp;description=L%E1%BA%A5y+ch%E1%BB%89+s%E1%BB%91+qu%E1%BA%A3ng+c%C3%A1o+Facebook+h%C3%A0ng+ng%C3%A0y+cho+chi%E1%BA%BFn+d%E1%BB%8Bch%2C+nh%C3%B3m+qu%E1%BA%A3ng+c%C3%A1o+ho%E1%BA%B7c+qu%E1%BA%A3ng+c%C3%A1o%2C+ph%C3%A2n+t%C3%A1ch+theo+tu%E1%BB%95i%2C+gi%E1%BB%9Bi+t%C3%ADnh%2C+qu%E1%BB%91c+gia+ho%E1%BA%B7c+v%E1%BB%8B+tr%C3%AD.\u0026amp;theme=722a7095c53b95fd5a0669f2\u0026amp;signature=fa30efe2ea9fc7e849335f3e09d9a3333a149564c14be1cad82db1f73a175fc4\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/ayrshare-docs/tc_XJFteIEk_1d3D/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Ayrshare Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2266C2\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.ayrshare.com/docs/vi/apis/ads/facebook/get-ad-insights\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/vi/apis/ads/facebook/get-ad-insights.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"vi\" href=\"https://www.ayrshare.com/docs/vi/apis/ads/facebook/get-ad-insights\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://www.ayrshare.com/docs/apis/ads/facebook/get-ad-insights\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://www.ayrshare.com/docs/es/apis/ads/facebook/get-ad-insights\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt-BR\" href=\"https://www.ayrshare.com/docs/pt-BR/apis/ads/facebook/get-ad-insights\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"fr\" href=\"https://www.ayrshare.com/docs/fr/apis/ads/facebook/get-ad-insights\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"de\" href=\"https://www.ayrshare.com/docs/de/apis/ads/facebook/get-ad-insights\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ja\" href=\"https://www.ayrshare.com/docs/ja/apis/ads/facebook/get-ad-insights\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"uk\" href=\"https://www.ayrshare.com/docs/uk/apis/ads/facebook/get-ad-insights\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"hi\" href=\"https://www.ayrshare.com/docs/hi/apis/ads/facebook/get-ad-insights\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ar\" href=\"https://www.ayrshare.com/docs/ar/apis/ads/facebook/get-ad-insights\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hans\" href=\"https://www.ayrshare.com/docs/zh-Hans/apis/ads/facebook/get-ad-insights\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hant\" href=\"https://www.ayrshare.com/docs/zh-Hant/apis/ads/facebook/get-ad-insights\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://www.ayrshare.com/docs/apis/ads/facebook/get-ad-insights\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.ayrshare.com/#organization\",\"name\":\"Ayrshare Docs\",\"url\":\"https://www.ayrshare.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/ayrshare-docs/7bWzjvNjeuvs-M3N/images/logos/ayrshare-docs-logo-light.svg?fit=max\u0026auto=format\u0026n=7bWzjvNjeuvs-M3N\u0026q=85\u0026s=8d23367f493d06599eecbbfa2b6325cf\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.ayrshare.com/docs#website\",\"name\":\"Ayrshare Docs\",\"url\":\"https://www.ayrshare.com/docs\",\"publisher\":{\"@id\":\"https://www.ayrshare.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.ayrshare.com/docs/vi/apis/ads/facebook/get-ad-insights#webpage\",\"url\":\"https://www.ayrshare.com/docs/vi/apis/ads/facebook/get-ad-insights\",\"name\":\"Insights\",\"description\":\"Lấy chỉ số quảng cáo Facebook hàng ngày cho chiến dịch, nhóm quảng cáo hoặc quảng cáo, phân tách theo tuổi, giới tính, quốc gia hoặc vị trí.\",\"dateModified\":\"2026-11-24T17:49:35.664Z\",\"isPartOf\":{\"@id\":\"https://www.ayrshare.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://www.ayrshare.com/docs/vi/apis/ads/facebook/get-ad-insights#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.ayrshare.com/docs/vi/apis/ads/facebook/get-ad-insights#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Endpoints\",\"item\":\"https://www.ayrshare.com/docs/vi/apis/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ads\",\"item\":\"https://www.ayrshare.com/docs/vi/apis/ads/overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Facebook Ads\",\"item\":\"https://www.ayrshare.com/docs/vi/apis/ads/facebook/get-ad-accounts\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Insights\",\"item\":\"https://www.ayrshare.com/docs/vi/apis/ads/facebook/get-ad-insights\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://www.ayrshare.com/docs/vi/apis/ads/facebook/get-ad-insights#apireference\",\"headline\":\"Insights\",\"name\":\"Insights\",\"description\":\"Lấy chỉ số quảng cáo Facebook hàng ngày cho chiến dịch, nhóm quảng cáo hoặc quảng cáo, phân tách theo tuổi, giới tính, quốc gia hoặc vị trí.\",\"url\":\"https://www.ayrshare.com/docs/vi/apis/ads/facebook/get-ad-insights\",\"mainEntityOfPage\":{\"@id\":\"https://www.ayrshare.com/docs/vi/apis/ads/facebook/get-ad-insights#webpage\"},\"dateModified\":\"2026-11-24T17:49:35.664Z\",\"publisher\":{\"@id\":\"https://www.ayrshare.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.ayrshare.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Ayrshare Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Ayrshare Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/vi/apis/ads/facebook/get-ad-insights.md","siteName":"Ayrshare Docs","nav":{"global":null,"languages":[{"language":"en","pages":[{"title":"en","href":"/apis/ads/facebook/get-ad-insights"}]},{"language":"es","pages":[{"title":"es","href":"/es/apis/ads/facebook/get-ad-insights"}]},{"language":"cn","hidden":true,"pages":[{"title":"cn","href":"/cn/apis/ads/facebook/get-ad-insights","hidden":true}]},{"language":"zh","hidden":true,"pages":[{"title":"zh","href":"/zh/apis/ads/facebook/get-ad-insights","hidden":true}]},{"language":"pt-BR","pages":[{"title":"pt-BR","href":"/pt-BR/apis/ads/facebook/get-ad-insights"}]},{"language":"fr","pages":[{"title":"fr","href":"/fr/apis/ads/facebook/get-ad-insights"}]},{"language":"de","pages":[{"title":"de","href":"/de/apis/ads/facebook/get-ad-insights"}]},{"language":"vi","anchors":[{"anchor":"Documentation","icon":"code","groups":[{"group":"Get Started","pages":[{"title":"Ayrshare Social Media API","href":"/vi/introduction"},{"title":"Hướng dẫn Quick Start","href":"/vi/quickstart"},{"group":"MCP Server","pages":[{"title":"Ayrshare MCP Server: Điều khiển API bằng AI agent","sidebarTitle":"Tổng quan","icon":"robot","href":"/vi/additional/mcp-action-server"},{"title":"Kết nối tới MCP Server","sidebarTitle":"Kết nối \u0026 Thiết lập","icon":"plug","href":"/vi/additional/mcp-action-connect"},{"title":"Danh mục Công cụ MCP","sidebarTitle":"Danh mục Công cụ","icon":"list","href":"/vi/additional/mcp-action-tools"},{"title":"Plugin Claude Code","icon":"terminal","href":"/vi/additional/mcp-claude-code-plugin"},{"title":"n8n","icon":"diagram-project","href":"/vi/additional/mcp-n8n"},{"title":"Đưa các tài khoản mạng xã hội của khách hàng vào hệ thống","sidebarTitle":"Client Onboarding","icon":"user-plus","href":"/vi/additional/mcp-client-onboarding"},{"title":"Documentation MCP","sidebarTitle":"Documentation MCP","icon":"magnifying-glass","href":"/vi/additional/mcp-server"}]}]},{"group":"API Endpoints","pages":[{"title":"Tổng quan Ayrshare API","href":"/vi/apis/overview"},{"group":"GraphQL","pages":[{"title":"Tổng quan GraphQL API","href":"/vi/apis/graphql/overview"},{"title":"Sử dụng GraphQL API","href":"/vi/apis/graphql/using-the-api"},{"title":"Lỗi GraphQL","href":"/vi/apis/graphql/errors"},{"title":"Giới hạn và Tính phí GraphQL","href":"/vi/apis/graphql/limits"},{"title":"Quảng cáo","href":"/vi/apis/graphql/ads"}]},{"group":"Ads","pages":[{"title":"Ads API: Quảng bá bài đăng Meta và quản lý Google Ads","sidebarTitle":"Tổng quan về Ads API","href":"/vi/apis/ads/overview"},{"title":"Chiến dịch Quảng cáo","href":"/vi/apis/ads/campaigns"},{"group":"Facebook Ads","pages":[{"title":"Tài khoản","api":"GET /ads/facebook/accounts","href":"/vi/apis/ads/facebook/get-ad-accounts"},{"title":"Chiến dịch","api":"GET /ads/facebook/campaigns","href":"/vi/apis/ads/facebook/get-ad-campaigns"},{"title":"Boost Bài đăng","api":"POST /ads/facebook/boost","href":"/vi/apis/ads/facebook/boost-post"},{"title":"Quảng cáo đã Boost","api":"GET /ads/facebook/ads","href":"/vi/apis/ads/facebook/get-boosted-ads"},{"title":"Lịch sử","description":"Lấy chi phí và chỉ số hiệu suất hàng ngày của quảng cáo Facebook được tạo bằng Boost Post, kèm kết quả theo mục tiêu, tổng số tổng hợp và bộ lọc ngày.","api":"GET /ads/facebook/history","href":"/vi/apis/ads/facebook/get-ad-history"},{"title":"Insights","api":"GET /ads/facebook/insights","href":"/vi/apis/ads/facebook/get-ad-insights"},{"title":"Sở thích","description":"Tìm sở thích nhắm mục tiêu quảng cáo Facebook theo từ khóa để lấy ID sở thích và ước tính quy mô đối tượng cho endpoint Boost Post.","api":"GET /ads/facebook/interests","href":"/vi/apis/ads/facebook/get-ad-interests"},{"title":"Khu vực","api":"GET /ads/facebook/regions","href":"/vi/apis/ads/facebook/get-ad-regions"},{"title":"Thành phố","api":"GET /ads/facebook/cities","href":"/vi/apis/ads/facebook/get-ad-cities"},{"title":"Đề xuất DSA","api":"GET /ads/facebook/dsaRecommendations","href":"/vi/apis/ads/facebook/get-dsa-recommendations"},{"title":"Cập nhật Quảng cáo","api":"PUT /ads/facebook/ads","href":"/vi/apis/ads/facebook/put-ad-update"},{"title":"Đối tượng","api":"GET /ads/facebook/audiences","href":"/vi/apis/ads/facebook/get-audiences"},{"title":"Tạo đối tượng","api":"POST /ads/facebook/audiences","href":"/vi/apis/ads/facebook/create-audience"},{"title":"Xóa đối tượng","api":"DELETE /ads/facebook/audiences/{id}","href":"/vi/apis/ads/facebook/delete-audience"},{"title":"Thành viên đối tượng","api":"POST /ads/facebook/audiences/{id}/users","href":"/vi/apis/ads/facebook/audience-members"}]},{"group":"Instagram Ads","pages":[{"title":"Tài khoản","api":"GET /ads/instagram/accounts","href":"/vi/apis/ads/instagram/get-ad-accounts"},{"title":"Chiến dịch","api":"GET /ads/instagram/campaigns","href":"/vi/apis/ads/instagram/get-ad-campaigns"},{"title":"Khu vực","api":"GET /ads/instagram/regions","href":"/vi/apis/ads/instagram/get-ad-regions"},{"title":"Cities","api":"GET /ads/instagram/cities","href":"/vi/apis/ads/instagram/get-ad-cities"},{"title":"Đề xuất DSA","api":"GET /ads/instagram/dsaRecommendations","href":"/vi/apis/ads/instagram/get-dsa-recommendations"},{"title":"Boost Bài đăng","api":"POST /ads/instagram/boost","href":"/vi/apis/ads/instagram/boost-post"},{"title":"Quảng cáo đã Boost","api":"GET /ads/instagram/ads","href":"/vi/apis/ads/instagram/get-boosted-ads"},{"title":"Lịch sử","api":"GET /ads/instagram/history","href":"/vi/apis/ads/instagram/get-ad-history"},{"title":"Insights","api":"GET /ads/instagram/insights","href":"/vi/apis/ads/instagram/get-ad-insights"},{"title":"Sở thích","api":"GET /ads/instagram/interests","href":"/vi/apis/ads/instagram/get-ad-interests"},{"title":"Cập nhật Quảng cáo","api":"PUT /ads/instagram/ads","href":"/vi/apis/ads/instagram/put-ad-update"},{"title":"Đối tượng","api":"GET /ads/instagram/audiences","href":"/vi/apis/ads/instagram/get-audiences"},{"title":"Tạo đối tượng","api":"POST /ads/instagram/audiences","href":"/vi/apis/ads/instagram/create-audience"},{"title":"Xóa đối tượng","api":"DELETE /ads/instagram/audiences/{id}","href":"/vi/apis/ads/instagram/delete-audience"},{"title":"Thành viên đối tượng","api":"POST /ads/instagram/audiences/{id}/users","href":"/vi/apis/ads/instagram/audience-members"}]},{"group":"Google Ads","pages":[{"title":"Tài khoản","api":"GET /ads/google/accounts","href":"/vi/apis/ads/google/get-ad-accounts"},{"title":"Chiến dịch Google Search","sidebarTitle":"Chiến dịch Search","api":"POST /ads/google/campaigns","href":"/vi/apis/ads/google/search-campaigns"},{"title":"Chiến dịch Google Performance Max","sidebarTitle":"Chiến dịch Performance Max","api":"POST /ads/google/campaigns","href":"/vi/apis/ads/google/performance-max-campaigns"},{"title":"Lấy Chiến dịch","api":"GET /ads/google/campaigns/{id}","href":"/vi/apis/ads/google/get-campaign"},{"title":"Cập nhật Chiến dịch","api":"PUT /ads/google/campaigns/{id}","href":"/vi/apis/ads/google/update-campaign"},{"title":"Insights","api":"GET /ads/google/insights","href":"/vi/apis/ads/google/get-ad-insights"}]},{"group":"TikTok Ads","pages":[{"title":"Boost Bài đăng","api":"POST /ads/tiktok/boost","href":"/vi/apis/ads/tiktok/boost"}]},{"group":"Boost on Behalf","pages":[{"title":"Boost bài đăng của nhóm bạn","href":"/vi/apis/ads/delegations/boost-on-behalf"},{"title":"Tạo Ủy quyền Boost","api":"POST /ads/delegations","href":"/vi/apis/ads/delegations/create-delegations"},{"title":"Lấy Ủy quyền Boost","api":"GET /ads/delegations","href":"/vi/apis/ads/delegations/get-delegations"},{"title":"Thu hồi Ủy quyền Boost","api":"DELETE /ads/delegations/:id","href":"/vi/apis/ads/delegations/delete-delegation"}]}]},{"group":"Analytics","pages":[{"title":"Analytics API: Số liệu bài đăng, tài khoản và liên kết","sidebarTitle":"Tổng quan về Analytics API","href":"/vi/apis/analytics/overview"},{"title":"Phân tích một Bài đăng","api":"POST /analytics/post","href":"/vi/apis/analytics/post"},{"title":"Phân tích Bài đăng theo Social ID","api":"POST /analytics/post","href":"/vi/apis/analytics/social-by-id"},{"title":"Phân tích một Mạng xã hội","api":"POST /analytics/social","href":"/vi/apis/analytics/social"},{"title":"YouTube Playlists","api":"GET /analytics/youTubePlaylists","href":"/vi/apis/analytics/youtube-playlists"},{"title":"Số lượng Người theo dõi Instagram đang Trực tuyến","api":"GET /analytics/getInstagramOnlineFollowers","href":"/vi/apis/analytics/instagram-follower-count"}]},{"group":"Auto Schedule","pages":[{"title":"Tổng quan về Auto Schedule","href":"/vi/apis/auto-schedule/overview"},{"title":"Đặt Auto Schedule","api":"POST /auto-schedule/set","href":"/vi/apis/auto-schedule/set-schedule"},{"title":"Xóa Auto Schedule","api":"DELETE /auto-schedule/delete","href":"/vi/apis/auto-schedule/delete-schedule"},{"title":"Liệt kê Auto Schedule","api":"GET /auto-schedule/list","href":"/vi/apis/auto-schedule/list-schedule"},{"title":"Lấy Bài đăng Auto Schedule Đang Chờ","api":"GET /auto-schedule/pending","href":"/vi/apis/auto-schedule/pending-auto-schedule"}]},{"group":"Automations","tag":"BETA","pages":[{"title":"Tổng quan về Automations API","href":"/vi/apis/automations/overview"},{"title":"Tạo Automation","api":"POST /automations","href":"/vi/apis/automations/create-automation"},{"title":"Liệt kê Automation","api":"GET /automations","href":"/vi/apis/automations/list-automations"},{"title":"Lấy Automation","api":"GET /automations/:id","href":"/vi/apis/automations/get-automation"},{"title":"Cập nhật Automation","api":"PUT /automations/:id","href":"/vi/apis/automations/update-automation"},{"title":"Xóa Automation","api":"DELETE /automations/:id","href":"/vi/apis/automations/delete-automation"},{"title":"Lấy Activity của Automation","api":"GET /automations/:id/activity","href":"/vi/apis/automations/get-activity"}]},{"group":"Brand","pages":[{"title":"Brand API: Dữ liệu Tài khoản Công khai \u0026 Đối thủ Cạnh tranh","href":"/vi/apis/brand/overview"}]},{"group":"Comments","pages":[{"title":"Tổng quan về Comments API","href":"/vi/apis/comments/overview"},{"title":"Đăng một Bình luận","api":"POST /comments","href":"/vi/apis/comments/post-comment"},{"title":"Lấy Bình luận","api":"GET /comments/:id","href":"/vi/apis/comments/get-comments"},{"title":"Xóa Bình luận","api":"DELETE /comments/:id","href":"/vi/apis/comments/delete-comments"},{"title":"Trả lời một Bình luận","api":"POST /comments/reply/:commentId","href":"/vi/apis/comments/reply-to-comment"}]},{"group":"Feed","pages":[{"title":"Tổng quan về RSS Feeds","href":"/vi/apis/feeds/overview"},{"title":"Thêm RSS Feed","api":"POST /feed","href":"/vi/apis/feeds/add-feed"},{"title":"Xóa RSS Feed","api":"DELETE /feed","href":"/vi/apis/feeds/delete-feed"},{"title":"Lấy danh sách RSS Feeds","api":"GET /feed","href":"/vi/apis/feeds/get-feeds"},{"title":"Cập nhật RSS Feed","api":"PUT /feed","href":"/vi/apis/feeds/update-feed"}]},{"group":"Generate","pages":[{"title":"Tổng quan về Generate API","href":"/vi/apis/generate/overview"},{"title":"Tạo nội dung bài đăng","api":"POST /generate/post","href":"/vi/apis/generate/post-text"},{"title":"Viết lại bài đăng","api":"POST /generate/rewrite","href":"/vi/apis/generate/rewrite-post"},{"title":"Phiên âm video","api":"POST /generate/transcription","href":"/vi/apis/generate/transcribe-video"},{"title":"Dịch bài đăng","api":"POST /generate/translate","href":"/vi/apis/generate/translate-post"},{"title":"Tạo Alt Text","api":"POST /generate/altText","href":"/vi/apis/generate/image-alt-text"},{"title":"Phân tích cảm xúc","api":"POST /generate/sentiment","href":"/vi/apis/generate/sentiment"}]},{"group":"Hashtags","pages":[{"title":"Tổng quan về Hashtags API","href":"/vi/apis/hashtags/overview"},{"title":"Auto Hashtags","api":"POST /hashtags/auto","href":"/vi/apis/hashtags/auto-hashtags"},{"title":"Kiểm tra Hashtag bị cấm","api":"GET /hashtags/banned","href":"/vi/apis/hashtags/check-hashtags"},{"title":"Đề xuất Hashtag","api":"GET /hashtags/recommend","href":"/vi/apis/hashtags/recommend-hashtags"},{"title":"Tìm kiếm Hashtag","api":"GET /hashtags/search","href":"/vi/apis/hashtags/search-hashtags"}]},{"group":"History","pages":[{"title":"Tổng quan về History API","href":"/vi/apis/history/overview"},{"title":"Lịch sử bài đăng","api":"GET /history","href":"/vi/apis/history/get-history"},{"title":"Lịch sử bài đăng theo ID","api":"GET /history/:id","href":"/vi/apis/history/get-history-id"},{"title":"Lấy lịch sử bài đăng cho một nền tảng mạng xã hội","api":"GET /history/:platform","href":"/vi/apis/history/history-platform"},{"title":"Lịch sử bài đăng theo Social ID","api":"GET /history/:socialId","href":"/vi/apis/history/history-social-id"}]},{"group":"Links","pages":[{"title":"Tổng quan về Links API","href":"/vi/apis/links/overview"},{"title":"Tạo Short Link","api":"POST /links","href":"/vi/apis/links/create-short-link"},{"title":"Cập nhật Short Link","api":"PUT /links/:id","href":"/vi/apis/links/update-short-link"},{"title":"Phân tích liên kết","api":"GET /links/:id","href":"/vi/apis/links/link-analytics"}]},{"group":"Listening","pages":[{"title":"Listen API: Giám sát Mạng xã hội \u0026 Đề cập","href":"/vi/apis/listen/overview"},{"title":"Lấy Dữ liệu Thương hiệu","api":"GET /brand/byUser","href":"/vi/apis/listen/brand-user"},{"group":"Search","pages":[{"title":"Tìm kiếm Facebook Pages","api":"GET /brand/search/facebook","href":"/vi/apis/listen/search/fb-page-search"},{"title":"Tìm kiếm LinkedIn","api":"GET /brand/search/linkedin","href":"/vi/apis/listen/search/linkedin-search"}]},{"group":"Keyword","pages":[{"title":"Tìm kiếm Tweets theo Từ khóa","api":"GET /listen/keyword","href":"/vi/apis/listen/keyword/search-tweets"}]}]},{"group":"Media","pages":[{"title":"Tổng quan về Media API","href":"/vi/apis/media/overview"},{"title":"Tải lên Hình ảnh hoặc Video","api":"POST /media/upload","href":"/vi/apis/media/upload-media"},{"title":"Tải lên Tệp Media Lớn","api":"GET /media/uploadUrl","href":"/vi/apis/media/upload-large-media"},{"title":"Xác minh URL Media Tồn tại","api":"POST /media/urlExists","href":"/vi/apis/media/verify-media-url"},{"title":"Lấy Tất cả Media trong Gallery","api":"GET /media","href":"/vi/apis/media/get-media-in-gallery"},{"title":"Thay đổi kích thước Hình ảnh","api":"POST /media/resize","href":"/vi/apis/media/resize"},{"title":"Metadata của một tệp media","api":"GET /media/meta","href":"/vi/apis/media/get-media-metadata"},{"title":"Tìm kiếm audio Instagram","api":"GET /media/instagram/audio/search","href":"/vi/apis/media/search-instagram-audio"},{"title":"Lấy metadata audio Instagram","api":"GET /media/instagram/audio/{audioId}","href":"/vi/apis/media/get-instagram-audio"}]},{"group":"Messages","pages":[{"title":"Tổng quan về Messages API","href":"/vi/apis/messages/overview"},{"title":"Gửi Tin nhắn","api":"POST /messages/:platform","href":"/vi/apis/messages/send-message"},{"title":"Lấy Tin nhắn","api":"GET /messages/:platform","href":"/vi/apis/messages/get-messages"},{"title":"Cập nhật Tin nhắn","api":"PUT /messages/:platform/:conversationId","href":"/vi/apis/messages/update-messages"},{"title":"Đặt Phản hồi Tự động","api":"POST /messages/autoresponse","href":"/vi/apis/messages/set-auto-response"},{"title":"Lấy Phản hồi Tự động","api":"GET /messages/autoresponse","href":"/vi/apis/messages/get-auto-response"}]},{"group":"Post","pages":[{"title":"Tổng quan Post API","href":"/vi/apis/post/overview"},{"title":"Publish a Post API: Đăng bài lên bất kỳ mạng xã hội nào","api":"POST /post","href":"/vi/apis/post/post"},{"title":"Get a Post","api":"GET /post/:id","href":"/vi/apis/post/get-post"},{"title":"Delete a Post","api":"DELETE /post","href":"/vi/apis/post/delete-post"},{"title":"Update a Post","api":"PATCH /post","href":"/vi/apis/post/update-post"},{"title":"Retry a Post","api":"PUT /post/retry","href":"/vi/apis/post/retry-post"},{"title":"Copy a Post","api":"POST /post/copy","href":"/vi/apis/post/copy-post"},{"title":"Bulk Post","api":"POST /post/bulk","href":"/vi/apis/post/bulk-post"},{"group":"Social Networks","pages":[{"title":"Các mạng xã hội được hỗ trợ","href":"/vi/apis/post/social-networks/overview"},{"title":"Bluesky API","icon":"bluesky","href":"/vi/apis/post/social-networks/bluesky"},{"title":"Facebook Page API","icon":"facebook","href":"/vi/apis/post/social-networks/facebook"},{"title":"Google Business Profile API","icon":"google","href":"/vi/apis/post/social-networks/google"},{"title":"Instagram API","icon":"instagram","href":"/vi/apis/post/social-networks/instagram"},{"title":"LinkedIn API","icon":"linkedin","href":"/vi/apis/post/social-networks/linkedin"},{"title":"Pinterest API","icon":"pinterest","href":"/vi/apis/post/social-networks/pinterest"},{"title":"Reddit API","icon":"reddit","href":"/vi/apis/post/social-networks/reddit"},{"title":"Snapchat API","icon":"snapchat","href":"/vi/apis/post/social-networks/snapchat"},{"title":"Telegram API","icon":"telegram","href":"/vi/apis/post/social-networks/telegram"},{"title":"Threads API","icon":"threads","href":"/vi/apis/post/social-networks/threads"},{"title":"TikTok API","icon":"tiktok","href":"/vi/apis/post/social-networks/tiktok"},{"title":"X API","icon":"x-twitter","href":"/vi/apis/post/social-networks/x-twitter"},{"title":"YouTube API","icon":"youtube","href":"/vi/apis/post/social-networks/youtube"}]}]},{"group":"Profiles","pages":[{"title":"Tổng quan API Profiles","href":"/vi/apis/profiles/overview"},{"title":"Tạo User Profile","api":"POST /profiles","href":"/vi/apis/profiles/create-profile"},{"title":"Xóa User Profile","api":"DELETE /profiles","href":"/vi/apis/profiles/delete-profile"},{"title":"Cập nhật User Profile","api":"PATCH /profiles","href":"/vi/apis/profiles/update-profile"},{"title":"Lấy danh sách User Profile","api":"GET /profiles","href":"/vi/apis/profiles/get-profiles"},{"title":"Hủy liên kết mạng xã hội","api":"DELETE /profiles/social","href":"/vi/apis/profiles/unlink-social-network"},{"title":"Tổng quan Liên kết Mạng xã hội","href":"/vi/apis/profiles/social-linking-overview"},{"title":"Tạo một Link Session","api":"POST /profiles/link-sessions","href":"/vi/apis/profiles/create-link-session"},{"title":"Lấy một Link Session","api":"GET /profiles/link-sessions/{sessionId}","href":"/vi/apis/profiles/get-link-session"},{"title":"Thu hồi một Link Session","api":"DELETE /profiles/link-sessions/{sessionId}","href":"/vi/apis/profiles/revoke-link-session"},{"title":"Tạo URL liên kết (generateJWT)","api":"POST /profiles/generateJWT","deprecated":true,"href":"/vi/apis/profiles/generate-jwt"}]},{"group":"Reviews","pages":[{"title":"Tổng quan API Reviews","href":"/vi/apis/reviews/overview"},{"title":"Lấy tất cả đánh giá","api":"GET /reviews","href":"/vi/apis/reviews/get-reviews"},{"title":"Lấy một đánh giá","api":"GET /reviews/:id","href":"/vi/apis/reviews/get-one-review"},{"title":"Trả lời đánh giá","api":"POST /reviews","href":"/vi/apis/reviews/reply-review"},{"title":"Xóa phản hồi đánh giá","api":"DELETE /reviews","href":"/vi/apis/reviews/delete-review-reply"}]},{"group":"User","pages":[{"title":"Tổng quan API User Profile","href":"/vi/apis/user/overview"},{"title":"Chi tiết User Profile","api":"GET /user","href":"/vi/apis/user/profile-details"},{"title":"Pinterest Boards","api":"GET /user/details/pinterest","href":"/vi/apis/user/pinterest-board"},{"title":"Cập nhật người dùng","api":"PATCH /user/:platform","href":"/vi/apis/user/update-user"},{"title":"Hồ sơ doanh nghiệp WhatsApp","api":"GET /user/details/whatsapp","href":"/vi/apis/user/whatsapp-profile"},{"title":"Lấy hàng loạt tất cả","api":"GET /user/batch","href":"/vi/apis/user/batch-all-users"}]},{"group":"Utils","pages":[{"title":"Trạng thái yêu cầu cộng tác","api":"GET /post/collaborators/:id","href":"/vi/apis/utils/instagram-get-collaborator"},{"title":"Reddit Flair","api":"GET /post/redditFlair/:subreddit","href":"/vi/apis/utils/reddit-get-flair"},{"title":"Tra cứu người dùng","api":"GET /user/lookups","href":"/vi/apis/utils/user-lookups"},{"group":"YouTube","pages":[{"title":"Danh mục YouTube","api":"GET /post/youtubeCategories/:region","href":"/vi/apis/utils/youtube-categories"},{"title":"Đặt YouTube Watermark","api":"POST /post/youTubeWatermark","href":"/vi/apis/utils/set-youtube-watermark"},{"title":"Xóa YouTube Watermark","api":"DELETE /post/youTubeWatermark","href":"/vi/apis/utils/remove-youtube-watermark"}]}]},{"group":"Validate","pages":[{"title":"Tổng quan API Validate","href":"/vi/apis/validate/overview"},{"title":"Xác thực phương tiện","href":"/vi/apis/validate/validate-media"},{"title":"Kiểm tra độ dài bài đăng","api":"POST /validate/postLength","href":"/vi/apis/validate/check-post-length"},{"title":"Kiểm tra subreddit tồn tại","api":"GET /validate/redditExists/:subreddit","href":"/vi/apis/validate/check-subreddit"},{"title":"Kiểm duyệt nội dung","api":"POST /validate/moderation","href":"/vi/apis/validate/moderation"},{"title":"Xác thực JSON","api":"POST /validate/json","href":"/vi/apis/validate/validate-json"},{"title":"Xác thực bài đăng","api":"POST /validate/post","href":"/vi/apis/validate/validate-post"}]},{"group":"Webhooks","pages":[{"title":"Tổng quan Webhooks","href":"/vi/apis/webhooks/overview"},{"title":"Webhook Actions","href":"/vi/apis/webhooks/actions"},{"title":"Đăng ký Webhook","api":"POST /hook/webhook","href":"/vi/apis/webhooks/register"},{"title":"Hủy đăng ký Webhook","api":"DELETE /hook/webhook","href":"/vi/apis/webhooks/unregister"},{"title":"Xoay Signing Secret","api":"POST /hook/webhook/secret","href":"/vi/apis/webhooks/rotate-signing-secret"},{"title":"Liệt kê Webhook đã đăng ký","api":"GET /hook/webhook","href":"/vi/apis/webhooks/list"},{"title":"Lịch sử Webhook","api":"GET /hook/history","href":"/vi/apis/webhooks/history"}]}]},{"group":"Multiple Users","pages":[{"title":"Launch Plan: gói Business đa người dùng cấp nhập môn","href":"/vi/multiple-users/business-launch-overview"},{"title":"Tổng quan Gói Business","href":"/vi/multiple-users/business-plan-overview"},{"title":"Tích hợp Người dùng","href":"/vi/multiple-users/user-integration"},{"title":"Tích hợp API cho Doanh nghiệp","href":"/vi/multiple-users/api-integration-business"},{"title":"Widget Ayrshare Connect","href":"/vi/multiple-users/connect-widget"},{"title":"Tự Xây dựng Cửa sổ Bật lên Liên kết","href":"/vi/multiple-users/connect-direct-mode"},{"title":"Sự kiện Hoàn tất Liên kết","href":"/vi/multiple-users/link-completion-events"},{"title":"Quản lý nhiều Profile Người dùng","href":"/vi/multiple-users/manage-user-profiles"}]},{"group":"Dashboard","pages":[{"title":"Tổng quan Ayrshare Dashboard: Quản lý đăng bài mạng xã hội","href":"/vi/dashboard/overview"},{"group":"Connect Social Accounts","pages":[{"title":"Kết nối tài khoản mạng xã hội của bạn","href":"/vi/dashboard/connect-social-accounts/overview"},{"title":"Liên kết Bluesky","icon":"bluesky","href":"/vi/dashboard/connect-social-accounts/bluesky"},{"title":"Liên kết Facebook","icon":"facebook","href":"/vi/dashboard/connect-social-accounts/facebook"},{"title":"Liên kết Google Business Profile","icon":"google","href":"/vi/dashboard/connect-social-accounts/google-business"},{"title":"Liên kết Instagram","icon":"instagram","href":"/vi/dashboard/connect-social-accounts/instagram"},{"title":"Liên kết LinkedIn","icon":"linkedin","href":"/vi/dashboard/connect-social-accounts/linkedin"},{"title":"Liên kết Pinterest","icon":"pinterest","href":"/vi/dashboard/connect-social-accounts/pinterest"},{"title":"Liên kết Reddit","icon":"reddit","href":"/vi/dashboard/connect-social-accounts/reddit"},{"title":"Liên kết Snapchat","icon":"snapchat","href":"/vi/dashboard/connect-social-accounts/snapchat"},{"title":"Liên kết nhóm hoặc kênh Telegram với Ayrshare","icon":"telegram","href":"/vi/dashboard/connect-social-accounts/telegram"},{"title":"Liên kết Threads","icon":"threads","href":"/vi/dashboard/connect-social-accounts/threads"},{"title":"Liên kết TikTok","icon":"tiktok","href":"/vi/dashboard/connect-social-accounts/tiktok"},{"title":"Thiết lập X API Key của riêng bạn","icon":"x-twitter","href":"/vi/dashboard/connect-social-accounts/x-twitter-byo-keys"},{"title":"Liên kết X","icon":"x-twitter","href":"/vi/dashboard/connect-social-accounts/x-twitter"},{"title":"Liên kết YouTube","icon":"youtube","href":"/vi/dashboard/connect-social-accounts/youtube"}]},{"title":"Cách đăng bài mạng xã hội","href":"/vi/dashboard/publish-post"},{"title":"Xem JSON","href":"/vi/dashboard/view-json"},{"title":"Thu hồi quyền truy cập mạng xã hội","href":"/vi/dashboard/revoke-access"},{"group":"RSS","pages":[{"title":"Nguồn cấp RSS, Substack và YouTube","href":"/vi/dashboard/automated-rss-feeds"},{"title":"Tìm URL nguồn cấp RSS","href":"/vi/dashboard/find-rss"}]}]},{"group":"Additional","pages":[{"group":"What's New At Ayrshare","pages":[{"title":"Cập nhật Mới nhất","href":"/vi/whatsnew/latest"},{"title":"Kho lưu trữ Cập nhật","href":"/vi/whatsnew/archive"},{"title":"Các thay đổi API sắp tới","mode":"wide","href":"/vi/whatsnew/upcoming-api-changes"}]},{"group":"Errors","pages":[{"title":"Tổng quan về lỗi","href":"/vi/errors/overview"},{"title":"Mã trạng thái HTTP","href":"/vi/errors/errors-http"},{"title":"Mã lỗi Ayrshare","href":"/vi/errors/errors-ayrshare"}]},{"title":"Max Pack","mode":"wide","href":"/vi/additional/maxpack"},{"group":"Media Guidelines","pages":[{"title":"Yêu cầu Hình ảnh \u0026 Video Mạng xã hội","href":"/vi/media-guidelines/overview"},{"title":"Bluesky","icon":"bluesky","href":"/vi/media-guidelines/bluesky"},{"title":"Trang Facebook","icon":"facebook","href":"/vi/media-guidelines/facebook-pages"},{"title":"Google Business Profile","icon":"google","href":"/vi/media-guidelines/google-business-profile"},{"title":"Instagram","icon":"instagram","href":"/vi/media-guidelines/instagram"},{"title":"LinkedIn","icon":"linkedin","href":"/vi/media-guidelines/linkedin"},{"title":"Pinterest","icon":"pinterest","href":"/vi/media-guidelines/pinterest"},{"title":"Reddit","icon":"reddit","href":"/vi/media-guidelines/reddit"},{"title":"Snapchat","icon":"snapchat","href":"/vi/media-guidelines/snapchat"},{"title":"Telegram","icon":"telegram","href":"/vi/media-guidelines/telegram"},{"title":"Threads","icon":"threads","href":"/vi/media-guidelines/threads"},{"title":"TikTok","icon":"tiktok","href":"/vi/media-guidelines/tiktok"},{"title":"WhatsApp","icon":"whatsapp","href":"/vi/media-guidelines/whatsapp"},{"title":"X","icon":"x-twitter","href":"/vi/media-guidelines/x-twitter"},{"title":"YouTube","icon":"youtube","href":"/vi/media-guidelines/youtube"}]},{"group":"Packages \u0026 Guides","pages":[{"title":"Tổng quan SDK \u0026 Hướng dẫn Tích hợp Ayrshare","mode":"wide","href":"/vi/packages-guides/overview"},{"title":"Airtable","href":"/vi/packages-guides/airtable"},{"title":"Bubble.io","href":"/vi/packages-guides/bubble"},{"title":"Flutter","href":"/vi/packages-guides/flutter"},{"title":"FlutterFlow","href":"/vi/packages-guides/flutterflow"},{"title":"Make","href":"/vi/packages-guides/make"},{"title":"n8n","href":"/vi/packages-guides/n8n"},{"title":"Node.js NPM","href":"/vi/packages-guides/nodejs"},{"title":"Notion","href":"/vi/packages-guides/notion"},{"title":"Python PyPI","href":"/vi/packages-guides/python"},{"title":"Retool","href":"/vi/packages-guides/retool"}]},{"title":"Trạng thái hệ thống","href":"/vi/additional/status"},{"group":"Testing \u0026 Verification","pages":[{"title":"Hurl","href":"/vi/testing/hurl"},{"title":"Điểm cuối Xác thực","href":"/vi/testing/validation-endpoints"},{"title":"Postman","href":"/vi/testing/postman"},{"title":"Xác minh Bài đăng","href":"/vi/testing/post-verification"},{"title":"Kiểm tra trước khi đăng","href":"/vi/testing/pre-publish-checks"}]},{"group":"ISO Codes","pages":[{"title":"Mã quốc gia","href":"/vi/iso-codes/country"},{"title":"Mã ngôn ngữ","href":"/vi/iso-codes/language"}]}]}]},{"anchor":"Help Center","icon":"lightbulb","pages":[{"title":"Help Center","href":"/vi/help-center/overview"}]}]},{"language":"ja","pages":[{"title":"ja","href":"/ja/apis/ads/facebook/get-ad-insights"}]},{"language":"uk","pages":[{"title":"uk","href":"/uk/apis/ads/facebook/get-ad-insights"}]},{"language":"hi","pages":[{"title":"hi","href":"/hi/apis/ads/facebook/get-ad-insights"}]},{"language":"ar","pages":[{"title":"ar","href":"/ar/apis/ads/facebook/get-ad-insights"}]},{"language":"zh-Hans","pages":[{"title":"zh-Hans","href":"/zh-Hans/apis/ads/facebook/get-ad-insights"}]},{"language":"zh-Hant","pages":[{"title":"zh-Hant","href":"/zh-Hant/apis/ads/facebook/get-ad-insights"}]}]},"basePath":"","title":"Insights - Ayrshare Docs","deploymentId":"dpl_3L1FNBg9Mynx3haQDgU9Rf9VMnSS","buildId":"dpl_3L1FNBg9Mynx3haQDgU9Rf9VMnSS","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-xpGnaaul.js","snippetPresets-DFnopzEm.js","utils-DRMdof0K.js","style-to-object-BY3JEAdk.js","utils-LcT9fS-Z.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-CXVfE-bZ.js","conditional-requirements-CFM0id0Q.js","cloneDeep-B2-8Fada.js","_Uint8Array-BtVUbcAp.js","isObject-FP1Yky1u.js","ApiExamples-DISA6aQu.js","usePlaygroundInputsStore-W_CSvcax.js","shallow-MVXkJ5Lc.js","isEqual-CvE11Zg6.js","CodeSnippets-OONN_OC8.js","CodeSnippet-DRJWrppX.js","use-playground-group-access-51n0EtA1.js","Page-DECsw0Dj.js","api-description-markdown-CYGMisve.js","DynamicMarkdown-DfMYIWKY.js","SectionHeading-BahhTpYu.js","MethodPill-CPp8SQYS.js","getPastedJson-C-RUqx8h.js","Check2Icon-q3AGc5VC.js","axios-CsQoIw0U.js"]}