Campaigns in your Meta ad account — status, budget
meta-ads.campaignsList the campaigns in your Meta ad account with status, objective and budget
- Price
- freePelo preço do provedor
- Success rate
- —Ainda não há dados da taxa de sucessoAinda não há dados da taxa de sucesso
- Latency p50
- ——
- Last verified
- 28 de jul. de 2026Verified working
GEThttps://toolswitch.dev/v1/tools/meta-ads.campaigns?limit=2Preview- Uses platform quota
- Synchronous response
- Reads public data
Parâmetros
budgets are strings in the account currency's MINOR unit — daily_budget "5000" is $50.00. Budget can live on the campaign (CBO) or on each ad set, so a null daily_budget here is normal, not missing data. Ad sets and ads are the same pattern on /{ad_account_id}/adsets and /ads
| Parâmetro | Tipo | Obrigatório | Descrição | Exemplo |
|---|---|---|---|---|
| Parâmetros de caminho | ||||
ad_account_id | string | Obrigatório | the act_-prefixed id from facebook.ads.accounts | act_1234567890 |
| Parâmetros de consulta | ||||
after | string | Opcional | paging.cursors.after from the previous response | |
limit | inteiro | Opcional | 50 | |
fields | string | Obrigatório | id,name,status,effective_status,objective,daily_budget,lifetime_budget,start_time,stop_time,created_time | |
effective_status | string | Opcional | JSON array as a string, e.g. ["ACTIVE","PAUSED"] — without it Meta also returns archived campaigns | ["ACTIVE"] |
- Parâmetros de caminho
ad_account_idstringObrigatóriothe act_-prefixed id from facebook.ads.accounts
Exemplo:
act_1234567890- Parâmetros de consulta
afterstringOpcionalpaging.cursors.after from the previous response
limitinteiroOpcionalExemplo:
50fieldsstringObrigatórioExemplo:
id,name,status,effective_status,objective,daily_budget,lifetime_budget,start_time,stop_time,created_timeeffective_statusstringOpcionalJSON array as a string, e.g. ["ACTIVE","PAUSED"] — without it Meta also returns archived campaigns
Exemplo:
["ACTIVE"]
Exemplos de código
Substitua $TOOLSWITCH_KEY pela chave criada no console.
curl -X GET 'https://toolswitch.dev/v1/tools/meta-ads.campaigns?limit=2' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/meta-ads.campaigns?limit=2",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/meta-ads.campaigns?limit=2", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());Esta API de gateway está em prévia; a URL e a autenticação podem mudar. Os parâmetros do exemplo são dados de amostra. As chamadas são cobradas a free, incluindo a taxa de serviço.