{ "status": "success", "ads": [ { "postId": "DE6gpw8kxlonHy6eb721", "ad": { "accountId": "274948331", "adId": "6683876017501", "budgetRemaining": 0, "created": "2025-03-30T10:11:34-0700", "creativeId": "1033490148629541", "dailyBudget": 0, "deliveryStatus": "ACTIVE", "endDate": "2025-04-03T22:30:00.000Z", "fbPostId": "106638148652329_672633202087922", "goal": { "title": "Get More Engagement", "description": "This goal seeks to increase engagement while ensuring that the ad reaches the maximum number of unique users. It balances visibility with engagement, showing the ad to as many different people as possible who may interact with it.", "type": "engagement" }, "isComplete": false, "lifetimeBudget": 0, "metrics": { "spend": 9.21, "impressions": 6495, "reach": 6272, "clicks": 3, "ctr": 0.046189, "cpm": 1.418014, "cpp": 1.468431, "frequency": 1.035555, "uniqueClicks": 3, "uniqueCtr": 0.047832, "costPerUniqueClick": 3.07, "inlineLinkClicks": 0, "costPerInlineLinkClick": 0, "outboundClicks": 0, "costPerOutboundClick": 0, "websiteCtr": [], "accountCurrency": "USD", "accountName": "John Doe", "accountId": "274948331" }, "name": "API Post - DE6gpw8kxlonHy6eb7L1 - 2025-03-30T17:11:26", "previewLink": "https://fb.me/22Cn31wXlzhxOC1", "review": { "reasons": [], "status": "approved" }, "spend": 9.21, "startDate": "2025-03-30T17:11:32.000Z", "status": "ACTIVE", "targeting": { "ageMax": 65, "ageMin": 18, "geoLocations": { "countries": [ "US" ], "locationTypes": [ "home", "recent" ] }, "interests": [ { "id": "6003195554098", "name": "Rhythm and blues music" } ] } } } ], "count": 1}
{ "status": "success", "ads": [ { "postId": "DE6gpw8kxlonHy6eb7Lo", "ad": { "accountId": "274948331", "adId": "6683876017501", "budgetRemaining": 0, "created": "2025-03-30T10:11:34-0700", "creativeId": "1033490148629541", "dailyBudget": 0, "deliveryStatus": "ACTIVE", "endDate": "2025-04-03T22:30:00.000Z", "fbPostId": "106638148652329_672633202087921", "goal": { "title": "Get More Engagement", "description": "This goal seeks to increase engagement while ensuring that the ad reaches the maximum number of unique users. It balances visibility with engagement, showing the ad to as many different people as possible who may interact with it.", "type": "engagement" }, "isComplete": false, "lifetimeBudget": 0, "metrics": { "spend": 9.21, "impressions": 6495, "reach": 6272, "clicks": 3, "ctr": 0.046189, "cpm": 1.418014, "cpp": 1.468431, "frequency": 1.035555, "uniqueClicks": 3, "uniqueCtr": 0.047832, "costPerUniqueClick": 3.07, "inlineLinkClicks": 0, "costPerInlineLinkClick": 0, "outboundClicks": 0, "costPerOutboundClick": 0, "websiteCtr": [], "accountCurrency": "USD", "accountName": "John Doe", "accountId": "274948331" }, "name": "API Post - DE6gpw8kxlonHy6eb7Lo - 2025-03-30T17:11:26", "previewLink": "https://fb.me/22Cn31wXlzhxOC1", "review": { "reasons": [], "status": "approved" }, "spend": 9.21, "startDate": "2025-03-30T17:11:32.000Z", "status": "ACTIVE", "targeting": { "ageMax": 65, "ageMin": 18, "geoLocations": { "countries": ["US"], "locationTypes": ["home", "recent"] }, "interests": [ { "id": "6003195554098", "name": "Rhythm and blues music" } ] } } }, { "ad": { "accountId": "274948331", "adId": "6685225314301", "budgetRemaining": 0, "created": "2025-03-30T18:36:39-0700", "creativeId": "628434386637341", "dailyBudget": 0, "deliveryStatus": "PAUSED", "endDate": "2025-04-03T22:30:00.000Z", "fbPostId": "106638148652329_672633202087921", "goal": { "title": "Get More Engagement", "description": "This goal seeks to increase engagement while ensuring that the ad reaches the maximum number of unique users. It balances visibility with engagement, showing the ad to as many different people as possible who may interact with it.", "type": "engagement" }, "isComplete": false, "lifetimeBudget": 0, "metrics": {}, "name": "API Post 14 - 106638148652329_672633202087926 - 2025-03-31T01:36:32", "previewLink": "https://fb.me/2nPlTIZEpzrCnY1", "review": null, "spend": 0, "startDate": "2025-03-31T01:36:37.000Z", "status": "PAUSED", "targeting": { "ageMax": 65, "ageMin": 18, "geoLocations": { "countries": ["US"], "locationTypes": ["home", "recent"] }, "interests": [ { "id": "6003195554098", "name": "Rhythm and blues music" } ] } } } ], "count": 2}
{ "action": "get ads", "status": "error", "code": 370, "message": "Error getting ads. Please try again or contact us if the issue persists."}
Facebook Ads
Beworbene Anzeigen
Rufen Sie beworbene Facebook-Anzeigen nach Konto-, Anzeigen- oder Beitrags-ID ab, mit Status, Metas Prüfung, Ausgaben, Live-Kennzahlen und Vorschau-Links.
GET
/
ads
/
facebook
/
ads
curl \-H "Authorization: Bearer API_KEY" \-X GET https://api.ayrshare.com/api/ads/facebook/ads?adId=1234567890
{ "status": "success", "ads": [ { "postId": "DE6gpw8kxlonHy6eb721", "ad": { "accountId": "274948331", "adId": "6683876017501", "budgetRemaining": 0, "created": "2025-03-30T10:11:34-0700", "creativeId": "1033490148629541", "dailyBudget": 0, "deliveryStatus": "ACTIVE", "endDate": "2025-04-03T22:30:00.000Z", "fbPostId": "106638148652329_672633202087922", "goal": { "title": "Get More Engagement", "description": "This goal seeks to increase engagement while ensuring that the ad reaches the maximum number of unique users. It balances visibility with engagement, showing the ad to as many different people as possible who may interact with it.", "type": "engagement" }, "isComplete": false, "lifetimeBudget": 0, "metrics": { "spend": 9.21, "impressions": 6495, "reach": 6272, "clicks": 3, "ctr": 0.046189, "cpm": 1.418014, "cpp": 1.468431, "frequency": 1.035555, "uniqueClicks": 3, "uniqueCtr": 0.047832, "costPerUniqueClick": 3.07, "inlineLinkClicks": 0, "costPerInlineLinkClick": 0, "outboundClicks": 0, "costPerOutboundClick": 0, "websiteCtr": [], "accountCurrency": "USD", "accountName": "John Doe", "accountId": "274948331" }, "name": "API Post - DE6gpw8kxlonHy6eb7L1 - 2025-03-30T17:11:26", "previewLink": "https://fb.me/22Cn31wXlzhxOC1", "review": { "reasons": [], "status": "approved" }, "spend": 9.21, "startDate": "2025-03-30T17:11:32.000Z", "status": "ACTIVE", "targeting": { "ageMax": 65, "ageMin": 18, "geoLocations": { "countries": [ "US" ], "locationTypes": [ "home", "recent" ] }, "interests": [ { "id": "6003195554098", "name": "Rhythm and blues music" } ] } } } ], "count": 1}
{ "status": "success", "ads": [ { "postId": "DE6gpw8kxlonHy6eb7Lo", "ad": { "accountId": "274948331", "adId": "6683876017501", "budgetRemaining": 0, "created": "2025-03-30T10:11:34-0700", "creativeId": "1033490148629541", "dailyBudget": 0, "deliveryStatus": "ACTIVE", "endDate": "2025-04-03T22:30:00.000Z", "fbPostId": "106638148652329_672633202087921", "goal": { "title": "Get More Engagement", "description": "This goal seeks to increase engagement while ensuring that the ad reaches the maximum number of unique users. It balances visibility with engagement, showing the ad to as many different people as possible who may interact with it.", "type": "engagement" }, "isComplete": false, "lifetimeBudget": 0, "metrics": { "spend": 9.21, "impressions": 6495, "reach": 6272, "clicks": 3, "ctr": 0.046189, "cpm": 1.418014, "cpp": 1.468431, "frequency": 1.035555, "uniqueClicks": 3, "uniqueCtr": 0.047832, "costPerUniqueClick": 3.07, "inlineLinkClicks": 0, "costPerInlineLinkClick": 0, "outboundClicks": 0, "costPerOutboundClick": 0, "websiteCtr": [], "accountCurrency": "USD", "accountName": "John Doe", "accountId": "274948331" }, "name": "API Post - DE6gpw8kxlonHy6eb7Lo - 2025-03-30T17:11:26", "previewLink": "https://fb.me/22Cn31wXlzhxOC1", "review": { "reasons": [], "status": "approved" }, "spend": 9.21, "startDate": "2025-03-30T17:11:32.000Z", "status": "ACTIVE", "targeting": { "ageMax": 65, "ageMin": 18, "geoLocations": { "countries": ["US"], "locationTypes": ["home", "recent"] }, "interests": [ { "id": "6003195554098", "name": "Rhythm and blues music" } ] } } }, { "ad": { "accountId": "274948331", "adId": "6685225314301", "budgetRemaining": 0, "created": "2025-03-30T18:36:39-0700", "creativeId": "628434386637341", "dailyBudget": 0, "deliveryStatus": "PAUSED", "endDate": "2025-04-03T22:30:00.000Z", "fbPostId": "106638148652329_672633202087921", "goal": { "title": "Get More Engagement", "description": "This goal seeks to increase engagement while ensuring that the ad reaches the maximum number of unique users. It balances visibility with engagement, showing the ad to as many different people as possible who may interact with it.", "type": "engagement" }, "isComplete": false, "lifetimeBudget": 0, "metrics": {}, "name": "API Post 14 - 106638148652329_672633202087926 - 2025-03-31T01:36:32", "previewLink": "https://fb.me/2nPlTIZEpzrCnY1", "review": null, "spend": 0, "startDate": "2025-03-31T01:36:37.000Z", "status": "PAUSED", "targeting": { "ageMax": 65, "ageMin": 18, "geoLocations": { "countries": ["US"], "locationTypes": ["home", "recent"] }, "interests": [ { "id": "6003195554098", "name": "Rhythm and blues music" } ] } } } ], "count": 2}
{ "action": "get ads", "status": "error", "code": 370, "message": "Error getting ads. Please try again or contact us if the issue persists."}
Rufen Sie Anzeigen ab, die für einen bestimmten Facebook-Beitrag beworben wurden.Dieser Endpunkt für beworbene Anzeigen liefert detaillierte Informationen zu den beworbenen Anzeigen, einschließlich Status, aktueller Ausgaben, Leistungskennzahlen (Analytics) und Vorschau-Links.
Die Kennzahlen sind Echtzeit-Gesamtwerte für die Anzeigen. Wenn Sie historische Daten benötigen, verwenden Sie den Endpunkt für den Anzeigenverlauf.
review ist Metas Prüfung der Anzeige: status ist pending, solange Meta sie prüft, rejected,
wenn Meta sie abgelehnt oder Richtlinien-Feedback dazu hinterlassen hat, und approved, wenn die Anzeige
aktiv oder vorab genehmigt ist. reasons enthält Metas Erklärungen oder den Namen der Richtlinie, wenn Meta keinen Text liefert, und ist leer, wenn es kein Feedback gibt. review ist null, wenn weder
der Status der Anzeige noch ein Feedback die Prüfung erkennen lässt, zum Beispiel bei einer Anzeige, die vor der Prüfung pausiert wurde.
Über die previewLink-URL können Sie die Vorschauanzeige mit Ihren Kolleginnen und Kollegen teilen, sodass diese
die Anzeige 24 Stunden lang in den verschiedenen Facebook-Formaten sehen. Die Aufrufe Ihrer Kolleginnen und Kollegen
werden nicht auf Ihre Werbeausgaben angerechnet.
Header-Parameter
Query-Parameter
string
erforderlich
Ruft alle Anzeigen unter der Konto-ID ab.Die ID des Werbekontos, mit oder ohne das Präfix act_ (1234567890 oder act_1234567890).Erforderlich, wenn adId, fbPostId oder postId nicht gesetzt ist.
string
erforderlich
Ruft eine Anzeige mit der Anzeigen-ID ab.Erforderlich, wenn accountId, fbPostId oder postId nicht gesetzt ist.
string
erforderlich
Ruft Anzeigen mit der Facebook-Social-Post-ID ab.Erforderlich, wenn accountId, adId oder postId nicht gesetzt ist.
number
Standard:25
Ruft maximal limit Anzeigen ab. Maximal 300; höhere Werte werden auf 300 begrenzt.
string
erforderlich
Ruft Anzeigen mit der Ayrshare-Post-ID ab.Erforderlich, wenn accountId, adId oder fbPostId nicht gesetzt ist.
string
Standard:"all"
Filtert Anzeigen nach Status. Gültige Werte sind:
active
paused
deleted
archived
Eine Anzeige, die mit einem callToAction
beworben wurde, gibt dieses Objekt unter ad.callToAction zurück, mit type in Metas
Großschreibung. Bei einer Anzeige ohne Call-to-Action-Button wird der Schlüssel vollständig
weggelassen. Ein Button, der einen Chat öffnet, enthält außerdem sein destination. Die
folgenden Beispiele verwenden das Ziel engagement ohne Button. Ein Link-Button benötigt
das Ziel traffic, ein Chat-Button benötigt
engagement oder interactions. Ein mit interactions beworbener Chat-Button wird beim Filtern
nach Kampagne mit dem Ziel engagement aufgeführt.
curl \-H "Authorization: Bearer API_KEY" \-X GET https://api.ayrshare.com/api/ads/facebook/ads?adId=1234567890