curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/reddit/history?adId=2707300000000000001&startDate=2026-11-20"
{
"status": "success",
"history": [
{
"accountId": "a2_abc123",
"adId": "2707300000000000001",
"adName": "Spring sale",
"budgetDaily": 50,
"budgetType": "",
"currency": "USD",
"deliveryStatus": null,
"goal": { "type": "website_visits" },
"isActive": true,
"isComplete": false,
"metrics": {
"clicks": 42,
"cpc": 0.2,
"cpp": 0,
"cpm": 3.5,
"ctr": 1.75,
"frequency": 0,
"impressions": 2400,
"reach": 0
},
"network": "reddit",
"postId": "DE6gpw8kxlonHy6eb721",
"redditPostId": "1abc27",
"socialPostId": "1abc27",
"spend": 8.4,
"spendDate": "2026-11-21T00:00:00.000Z",
"spendUsd": 8.4,
"status": "ACTIVE"
}
],
"dateRange": {
"start": "2026-11-20T00:00:00.000Z",
"end": "2026-12-02T10:15:00.000Z",
"adId": "2707300000000000001"
},
"metrics": {
"totalSpend": null,
"totalSpendByCurrency": { "USD": 8.4 },
"totalClicks": 42,
"totalImpressions": 2400,
"totalReach": 0,
"averageCTR": 1.75,
"averageFrequency": 0,
"cpm": 3.5,
"cpp": 0,
"cpc": 0.2,
"costPerResult": 0.2,
"byGoalType": {
"website_visits": {
"spend": 8.4,
"impressions": 2400,
"clicks": 42,
"reach": 0,
"count": 1,
"ctr": 1.75,
"cpm": 3.5,
"cpp": 0,
"cpc": 0.2
}
},
"byGoalTitle": {},
"goalPerformance": {
"bestPerformingGoalType": { "type": "website_visits", "clicks": 42, "spend": 8.4, "ctr": 1.75 },
"mostEfficientGoalType": { "type": "website_visits", "cpc": 0.2, "spend": 8.4 }
},
"count": 1,
"firstDay": "2026-11-21T00:00:00.000Z",
"lastDay": "2026-11-21T00:00:00.000Z"
}
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "Start date must be before end date."
}
Reddit Ads
Verlauf
Rufen Sie die täglichen Ausgaben und Leistungsdaten ab, die Ayrshare für Ihre beworbenen Reddit-Anzeigen erfasst hat, mit Summen.
GET
/
ads
/
reddit
/
history
curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/reddit/history?adId=2707300000000000001&startDate=2026-11-20"
{
"status": "success",
"history": [
{
"accountId": "a2_abc123",
"adId": "2707300000000000001",
"adName": "Spring sale",
"budgetDaily": 50,
"budgetType": "",
"currency": "USD",
"deliveryStatus": null,
"goal": { "type": "website_visits" },
"isActive": true,
"isComplete": false,
"metrics": {
"clicks": 42,
"cpc": 0.2,
"cpp": 0,
"cpm": 3.5,
"ctr": 1.75,
"frequency": 0,
"impressions": 2400,
"reach": 0
},
"network": "reddit",
"postId": "DE6gpw8kxlonHy6eb721",
"redditPostId": "1abc27",
"socialPostId": "1abc27",
"spend": 8.4,
"spendDate": "2026-11-21T00:00:00.000Z",
"spendUsd": 8.4,
"status": "ACTIVE"
}
],
"dateRange": {
"start": "2026-11-20T00:00:00.000Z",
"end": "2026-12-02T10:15:00.000Z",
"adId": "2707300000000000001"
},
"metrics": {
"totalSpend": null,
"totalSpendByCurrency": { "USD": 8.4 },
"totalClicks": 42,
"totalImpressions": 2400,
"totalReach": 0,
"averageCTR": 1.75,
"averageFrequency": 0,
"cpm": 3.5,
"cpp": 0,
"cpc": 0.2,
"costPerResult": 0.2,
"byGoalType": {
"website_visits": {
"spend": 8.4,
"impressions": 2400,
"clicks": 42,
"reach": 0,
"count": 1,
"ctr": 1.75,
"cpm": 3.5,
"cpp": 0,
"cpc": 0.2
}
},
"byGoalTitle": {},
"goalPerformance": {
"bestPerformingGoalType": { "type": "website_visits", "clicks": 42, "spend": 8.4, "ctr": 1.75 },
"mostEfficientGoalType": { "type": "website_visits", "cpc": 0.2, "spend": 8.4 }
},
"count": 1,
"firstDay": "2026-11-21T00:00:00.000Z",
"lastDay": "2026-11-21T00:00:00.000Z"
}
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "Start date must be before end date."
}
Rufen Sie die täglichen Ausgaben und Leistungsdaten ab, die Ayrshare für die Reddit-Anzeigen erfasst hat, die Sie mit Beitrag bewerben erstellt haben. Für Live-Zahlen verwenden Sie Insights.
- Jeder Eintrag in
historyist eine Anzeige an einem Tag, die neuesten zuerst. - Wird nichts gefunden, ist die Antwort trotzdem erfolgreich:
historyist leer, undwarningsenthält einen Eintrag mitcode: 401. spendist in der Währung des Werbekontos angegeben, diecurrencyzeigt.spendUsdwird nur gesetzt, wenn diese Währung USD ist, und ist andernfallsnull.totalSpendist immernull: Verwenden SietotalSpendByCurrency.- Reddit meldet für diese Tage keine Reichweite, daher sind
reach,frequencyundcppgleich0. - Filter gelten in dieser Reihenfolge, und nur der erste gesendete wird verwendet:
adId,postId,accountId,socialPostId.
Header-Parameter
Query-Parameter
Nur die Tage von Anzeigen, die aus dieser Ayrshare-Post-ID beworben wurden.
Nur die Tage von Anzeigen, die diesen Reddit-Beitrag bewerben. Senden Sie die ID ohne
t3_ und in Kleinbuchstaben, zum Beispiel 1abc27. redditPostId wird als dasselbe Feld akzeptiert.Erster einzubeziehender Tag, als ISO-8601-Datum, zum Beispiel
2026-11-01.Letzter einzubeziehender Tag, als ISO-8601-Datum. Darf nicht vor
startDate liegen.Die maximale Anzahl zurückgegebener Zeilen, die neuesten zuerst. Jede Zeile ist eine Anzeige an einem Tag, bei mehreren Anzeigen deckt dies also weniger Tage ab als
limit. Werte über 300 werden auf 300 begrenzt. Die Summen addieren nur die zurückgegebenen Zeilen: Um den gesamten Zeitraum zu erhalten, grenzen Sie die Daten ein oder erhöhen Sie limit.curl \
-H "Authorization: Bearer API_KEY" \
-X GET "https://api.ayrshare.com/api/ads/reddit/history?adId=2707300000000000001&startDate=2026-11-20"
{
"status": "success",
"history": [
{
"accountId": "a2_abc123",
"adId": "2707300000000000001",
"adName": "Spring sale",
"budgetDaily": 50,
"budgetType": "",
"currency": "USD",
"deliveryStatus": null,
"goal": { "type": "website_visits" },
"isActive": true,
"isComplete": false,
"metrics": {
"clicks": 42,
"cpc": 0.2,
"cpp": 0,
"cpm": 3.5,
"ctr": 1.75,
"frequency": 0,
"impressions": 2400,
"reach": 0
},
"network": "reddit",
"postId": "DE6gpw8kxlonHy6eb721",
"redditPostId": "1abc27",
"socialPostId": "1abc27",
"spend": 8.4,
"spendDate": "2026-11-21T00:00:00.000Z",
"spendUsd": 8.4,
"status": "ACTIVE"
}
],
"dateRange": {
"start": "2026-11-20T00:00:00.000Z",
"end": "2026-12-02T10:15:00.000Z",
"adId": "2707300000000000001"
},
"metrics": {
"totalSpend": null,
"totalSpendByCurrency": { "USD": 8.4 },
"totalClicks": 42,
"totalImpressions": 2400,
"totalReach": 0,
"averageCTR": 1.75,
"averageFrequency": 0,
"cpm": 3.5,
"cpp": 0,
"cpc": 0.2,
"costPerResult": 0.2,
"byGoalType": {
"website_visits": {
"spend": 8.4,
"impressions": 2400,
"clicks": 42,
"reach": 0,
"count": 1,
"ctr": 1.75,
"cpm": 3.5,
"cpp": 0,
"cpc": 0.2
}
},
"byGoalTitle": {},
"goalPerformance": {
"bestPerformingGoalType": { "type": "website_visits", "clicks": 42, "spend": 8.4, "ctr": 1.75 },
"mostEfficientGoalType": { "type": "website_visits", "cpc": 0.2, "spend": 8.4 }
},
"count": 1,
"firstDay": "2026-11-21T00:00:00.000Z",
"lastDay": "2026-11-21T00:00:00.000Z"
}
}
{
"action": "request",
"status": "error",
"code": 101,
"message": "Missing or incorrect parameters. Please verify with the docs. https://www.ayrshare.com/docs/apis",
"details": "Start date must be before end date."
}