Your Facebook Page reach and engagement metrics
facebook.facebook.page.insightsGet reach, impressions and engagement metrics for your Facebook Page
- Price
- freeAu prix du fournisseur
- Success rate
- 100 %Last 30 days · 214 calls
- Latency p50
- 536 msp95 835 ms
- Last verified
- —Not verified yet
GEThttps://toolswitch.dev/v1/tools/facebook.facebook.page.insightsPreview- Uses platform quota
- Synchronous response
- Reads public data
Paramètres
needs read_insights and the Page token (select this Page on the connection). Meta deprecates individual metric names on a fixed schedule, so an unknown-metric error means the metric was retired, not that the call is malformed
| Paramètre | Type | Obligatoire | Description | Exemple |
|---|---|---|---|---|
| Paramètres de chemin | ||||
page_id | chaîne | Obligatoire | 123456789012345 | |
| Paramètres de requête | ||||
since | chaîne | Facultatif | Unix timestamp or YYYY-MM-DD; Meta caps a single call at 93 days | 2026-07-01 |
until | chaîne | Facultatif | 2026-07-28 | |
metric | chaîne | Obligatoire | comma-separated metric names. page_impressions, page_impressions_unique and page_fans are RETIRED on v25 — all three answer '(#100) The value must be a valid insights metric' (checked live 2026-07-28). page_daily_follows_unique is still accepted | page_daily_follows_unique,page_post_engagements |
period | chaîne | Obligatoire | day | week | days_28 | lifetime — a metric only supports some of these | day |
- Paramètres de chemin
page_idchaîneObligatoireExemple :
123456789012345- Paramètres de requête
sincechaîneFacultatifUnix timestamp or YYYY-MM-DD; Meta caps a single call at 93 days
Exemple :
2026-07-01untilchaîneFacultatifExemple :
2026-07-28metricchaîneObligatoirecomma-separated metric names. page_impressions, page_impressions_unique and page_fans are RETIRED on v25 — all three answer '(#100) The value must be a valid insights metric' (checked live 2026-07-28). page_daily_follows_unique is still accepted
Exemple :
page_daily_follows_unique,page_post_engagementsperiodchaîneObligatoireday | week | days_28 | lifetime — a metric only supports some of these
Exemple :
day
Exemples de code
Remplacez $TOOLSWITCH_KEY par la clé créée dans la console.
curl -X GET 'https://toolswitch.dev/v1/tools/facebook.facebook.page.insights' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/facebook.facebook.page.insights",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/facebook.facebook.page.insights", {
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());Cette API de passerelle est en préversion ; 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.