Your Facebook Page reach and engagement metrics
facebook.facebook.page.insightsGet reach, impressions and engagement metrics for your Facebook Page
- Price
- freeAl precio del proveedor
- 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
Parámetros
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
| Parámetro | Tipo | Obligatorio | Descripción | Ejemplo |
|---|---|---|---|---|
| Parámetros de ruta | ||||
page_id | cadena | Obligatorio | 123456789012345 | |
| Parámetros de consulta | ||||
since | cadena | Opcional | Unix timestamp or YYYY-MM-DD; Meta caps a single call at 93 days | 2026-07-01 |
until | cadena | Opcional | 2026-07-28 | |
metric | cadena | Obligatorio | 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 | cadena | Obligatorio | day | week | days_28 | lifetime — a metric only supports some of these | day |
- Parámetros de ruta
page_idcadenaObligatorioEjemplo:
123456789012345- Parámetros de consulta
sincecadenaOpcionalUnix timestamp or YYYY-MM-DD; Meta caps a single call at 93 days
Ejemplo:
2026-07-01untilcadenaOpcionalEjemplo:
2026-07-28metriccadenaObligatoriocomma-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
Ejemplo:
page_daily_follows_unique,page_post_engagementsperiodcadenaObligatorioday | week | days_28 | lifetime — a metric only supports some of these
Ejemplo:
day
Ejemplos de código
Sustituye $TOOLSWITCH_KEY por la clave que creaste en la consola.
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());La API de la pasarela está en versión preliminar; su URL y autenticación pueden cambiar. Los parámetros del ejemplo son datos de muestra. Las llamadas se facturan a free, incluida la tarifa de servicio.