List your Microsoft Ads campaigns — status, budget
microsoft-ads.queryCampaigns in your Microsoft Advertising account, with status, budget and bid strategy
- Prix
- freeAu prix catalogue
- Taux de réussite
- —Aucune donnée de taux de réussite pour le momentAucune donnée de taux de réussite pour le moment
- Latence p50
- ——
- Dernière vérification
- —Pas encore vérifié
POSThttps://toolswitch.dev/v1/tools/microsoft-ads.queryBeta- Utilise le quota de la plateforme
- Réponse synchrone
- Lit des données publiques
Paramètres
returns Campaigns[] with Id, Name, Status, DailyBudget, BudgetType, BiddingScheme, StartDate/EndDate, Languages and CampaignType. DailyBudget is a plain decimal in the ACCOUNT CURRENCY — not micros, not cents, unlike Google and Meta. No performance metrics: pair with the Reporting service for spend and clicks
| Paramètre | Type | Obligatoire | Description | Exemple |
|---|---|---|---|---|
| Corps (JSON) | ||||
AccountId | entier | Obligatoire | the ad account id (a long). Must equal the CustomerAccountId header | 123456789 |
CampaignType | chaîne | Facultatif | SPACE-DELIMITED flags, not an array: "Search Shopping DynamicSearchAds Audience PerformanceMax". DEFAULTS TO Search — omit it and Shopping/PMax campaigns are silently missing from the result | Search Shopping PerformanceMax |
ReturnAdditionalFields | chaîne | Facultatif | space-delimited opt-ins for newer properties, e.g. "AdScheduleUseSearcherTimeZone BidStrategyId" | BidStrategyId |
- Corps (JSON)
AccountIdentierObligatoirethe ad account id (a long). Must equal the CustomerAccountId header
Exemple :
123456789CampaignTypechaîneFacultatifSPACE-DELIMITED flags, not an array: "Search Shopping DynamicSearchAds Audience PerformanceMax". DEFAULTS TO Search — omit it and Shopping/PMax campaigns are silently missing from the result
Exemple :
Search Shopping PerformanceMaxReturnAdditionalFieldschaîneFacultatifspace-delimited opt-ins for newer properties, e.g. "AdScheduleUseSearcherTimeZone BidStrategyId"
Exemple :
BidStrategyId
Exemples de code
Remplacez $TOOLSWITCH_KEY par la clé créée dans la console.
curl -X POST 'https://toolswitch.dev/v1/tools/microsoft-ads.query' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"POST",
"https://toolswitch.dev/v1/tools/microsoft-ads.query",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/microsoft-ads.query", {
method: "POST",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());Cette API de passerelle est en version Beta ; son URL et son authentification peuvent changer. Les paramètres de l’exemple sont des données fictives. Les appels sont facturés à free, frais de service inclus.