Facebook Page Contact Info
Public contact details of a Facebook page (email, phone, website, address, price range, rating) by URL, handle or page id.
- Price per call
- 2 credits
- per successful call
- Price ceiling
- 14 credits
- if a call is retried elsewhere
- Failed calls
- Free
- retried automatically
- Billed
- Per call
- only on success
Endpoint
api.primaryapi.com/ v1/ run/ facebook. page_contactAuth: API key with run or full access, or a dashboard session
Send the input below as a JSON body. The call is routed to a healthy upstream; if an attempt fails, it is retried automatically inside the same request and you pay only for the answer you get. To check an input and see the exact price without running anything, call POST /v1/quote/facebook.page_contact with the same body (free).
This is a restricted API: your account must be approved and accept the permissible-purpose terms first, otherwise calls return 403 restricted_api. See Restricted APIs.
Example request
curl -sS -X POST "https://api.primaryapi.com/v1/run/facebook.page_contact" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"page":"https://www.facebook.com/joesstonecrab"}'const res = await fetch('https://api.primaryapi.com/v1/run/facebook.page_contact', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PRIMARYAPI_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
page: 'https://www.facebook.com/joesstonecrab',
}),
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.code}: ${body.error}`);
// found:false is a successful answer ("does not exist"), not an error
console.log(body.output.found ? body.output.data : body.output.reason, body.credits);import os
import requests
res = requests.post(
"https://api.primaryapi.com/v1/run/facebook.page_contact",
headers={"Authorization": f"Bearer {os.environ['PRIMARYAPI_API_KEY']}"},
json={
"page": "https://www.facebook.com/joesstonecrab",
},
timeout=60,
)
body = res.json()
if not res.ok:
raise RuntimeError(f"{body['code']}: {body['error']}")
# found=False is a successful answer ("does not exist"), not an error
print(body["output"]["data"] if body["output"]["found"] else body["output"]["reason"], body["credits"]){
"name": "run_api",
"arguments": {
"sku": "facebook.page_contact",
"input": {
"page": "https://www.facebook.com/joesstonecrab"
}
}
}Price this exact input first (free)
curl -sS -X POST "https://api.primaryapi.com/v1/quote/facebook.page_contact" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"page":"https://www.facebook.com/joesstonecrab"}'Returns credits (what the call is expected to cost) and maxCredits (the most it can cost, which is set aside while it runs). Invalid input fails here the same way it would on run.
Input
JSON body fields. Unknown fields are rejected with 400 invalid_input (never silently ignored). You may add the routing controls preferLatencyUnderMs and maxCredits to the same object.
pagestringrequired- Facebook page URL, handle or numeric page id, e.g. https://www.facebook.com/joesstonecrab.max 2048 chars
languageenumdefault"en-US"- Facebook UI locale for the returned text, e.g. "en-US".one of: af-ZA, az-AZ, bs-BA, br-FR, ca-ES, cx-PH, co-FR, cs-CZ, da-DK, en-GB, en-US, eo-EO, et-EE, eu-ES, tl-PH, fo-FO, fr-CA, fr-FR, fy-NL, ff-NG, gl-ES, de-DE, gn-PY, ha-NG, hr-HR, id-ID, ga-IE, is-IS, it-IT, jv-ID, rw-RW, ht-HT, ku-TR, lv-LV, lt-LT, hu-HU, mg-MG, ms-MY, mt-MT, nl-NL, nl-BE, nb-NO, nn-NO, pl-PL, pt-BR, pt-PT, ro-RO, sc-IT, sn-ZW, sq-AL, sz-PL, sk-SK, sl-SI, so-SO, es-LA, es-ES, fi-FI, sw-KE, sv-SE, tr-TR, uz-UZ, vi-VN, cy-GB, zz-TR, el-GR, be-BY, bg-BG, ky-KG, kk-KZ, mk-MK, mn-MN, ru-RU, sr-RS, tt-RU, tg-TJ, uk-UA, ka-GE, hy-AM, he-IL, ur-PK, ar-AR, ps-AF, fa-IR, cb-IQ, sy-SY, tz-MA, am-ET, ne-NP, mr-IN, hi-IN, as-IN, bn-IN, pa-IN, gu-IN, or-IN, ta-IN, te-IN, kn-IN, ml-IN, si-LK, th-TH, lo-LA, my-MM, km-KH, ko-KR, zh-TW, zh-CN, zh-HK, ja-JP, ja-KS
Output
When output.found is true, output.data has these fields.
idstring | null- Facebook page id.
titlestring | null- Page name.
urlstring | nullcategorystring | nullaboutstring | null- Intro text.
addressstring | nullemailstring | null- Public contact email shown on the page.
phonestring | null- Public phone shown on the page.
websitestring | nulllinksstring[]- Other links shown on the page.
followersinteger | nullimagestring | null- Profile picture URL when the source exposes a direct image link.
priceRangestring | null- e.g. "$$".
ratingstring | null- Rating text as shown, e.g. "94% recommend (839 Reviews)".
servicesstring | nulladLibraryPageIdstring | nulladStatusstring | nullcoverPhotoUrlstring | nullcreatedUtcinteger | null- Page creation date, epoch seconds (UTC).
itemsobject[]- AnyAPI-compatible wrapper holding the single contact record.
items[].adLibraryPageIdstring | nullitems[].addressstring | nullitems[].categorystring | nullitems[].emailstring | nullitems[].followersinteger | nullitems[].imagestring | nullitems[].linksstring[]items[].phonestring | nullitems[].titlestring | nullitems[].urlstring | nullitems[].websitestring | null
TypeScript type
/** output.data when output.found is true */
type FacebookPageContact = {
/** Facebook page id. */
id: string | null;
/** Page name. */
title: string | null;
url: string | null;
category: string | null;
/** Intro text. */
about: string | null;
address: string | null;
/** Public contact email shown on the page. */
email: string | null;
/** Public phone shown on the page. */
phone: string | null;
website: string | null;
/** Other links shown on the page. */
links: string[];
followers: number | null;
/** Profile picture URL when the source exposes a direct image link. */
image: string | null;
/** e.g. "$$". */
priceRange: string | null;
/** Rating text as shown, e.g. "94% recommend (839 Reviews)". */
rating: string | null;
services: string | null;
adLibraryPageId: string | null;
adStatus: string | null;
coverPhotoUrl: string | null;
/** Page creation date, epoch seconds (UTC). */
createdUtc: number | null;
/** AnyAPI-compatible wrapper holding the single contact record. */
items: {
adLibraryPageId: string | null;
address: string | null;
category: string | null;
email: string | null;
followers: number | null;
image: string | null;
links: string[];
phone: string | null;
title: string | null;
url: string | null;
website: string | null;
}[];
};If what you asked about does not exist, is private, or a search matches nothing, the call still succeeds: output.found is false, output.data is null and output.reason says why. Such misses are free unless the notes below say misses are billed, in which case a miss costs the price of one call.
Example response
Values are placeholders that follow the output schema (strings as "string", numbers as 0); credits shows what this call would cost at the usual price.
{
"output": {
"found": true,
"data": {
"id": "string",
"title": "string",
"url": "https://example.com",
"category": "string",
"about": "string",
"address": "string",
"email": "string",
"phone": "string",
"website": "string",
"links": [
"string"
],
"followers": 0,
"image": "string",
"priceRange": "string",
"rating": "string",
"services": "string",
"adLibraryPageId": "string",
"adStatus": "string",
"coverPhotoUrl": "https://example.com",
"createdUtc": 0,
"items": [
{
"adLibraryPageId": "string",
"address": "string",
"category": "string",
"email": "string",
"followers": 0,
"image": "string",
"links": [
"string"
],
"phone": "string",
"title": "string",
"url": "https://example.com",
"website": "string"
}
]
}
},
"provider": "PrimaryAPI",
"credits": 2,
"items": 1,
"requestId": "req_01JBXK6Y2N9V8T4R3Q2P1M0A7Z"
}Pricing and reliability
Calls go only to upstreams that are healthy right now. If an attempt fails, the call is retried automatically inside the same request; a failed attempt costs nothing, and a call never costs more than its quote’s maxCredits. Live figures below are measured on real traffic.
Success rate, uptime, latency and call counts are measured live from real traffic over 30 days and show “—” until there is data.
Errors
Errors are JSON { code, error, requestId } and are never charged. The ones to handle for this endpoint:
- invalid_inputThe request failed validation before anything ran.
- unauthorizedNo valid API key or session was presented.
- insufficient_balanceThe balance cannot cover the most this call could cost.
- key_limit_reachedThe key’s own spend limit is used up for the current window.
- trial_cap_reachedAn agent trial key has used its whole trial budget.
- forbiddenThe credential is valid but may not do this.
- not_foundThe thing addressed by the URL does not exist for you.
- idempotency_conflictThe
Idempotency-Keyis already bound to a different request. - rate_limitedToo many requests in the current window.
- all_sources_failedThe call could not be answered, even after automatic retries.
- service_unavailableThis API cannot run in this deployment right now.
- timeoutThe request passed its deadline before it finished.
- restricted_apiThis API handles sensitive personal data and your account is not approved for it.
Notes
Contact fields come from the public page only.
Returns email addresses, phone numbers and street addresses published on Facebook pages; for sole traders and creators these are personal data. Requires account approval and acceptance of a permissible-purpose clause: no spam or unsolicited outreach, no surveillance or profiling of individuals, lawful basis under GDPR/CCPA and compliance with CAN-SPAM/TCPA for any contact. Honour removal requests and do not keep results longer than needed.
More Facebook endpoints
- Facebook Ad Creative Details2 credits
- Facebook Ad Details2 credits
- Facebook Ad Library Advertiser Search2 credits
- Facebook Ad Library Search1 credit
- Facebook Company Ads2 credits
- Facebook Event Details2 credits
- Facebook Events by City2 credits
- Facebook Events Search2 credits
- Facebook Group Posts2 credits
- Facebook Marketplace Item2 credits
- Facebook Marketplace Search2 credits
- Facebook Page Events2 credits
- Facebook Page Lookup by Name2 credits
- Facebook Page Photos2 credits
- Facebook Page Posts2 credits
- Facebook Page Profile2 credits
- Facebook Page Reels2 credits
- Facebook Page Search6.25 credits per result
- Facebook Post2 credits
- Facebook Post Comments2 credits
- Facebook Post Search3.24 credits per result
- Facebook Post Transcript2 credits
- Facebook Followers / Following ListPlanned
Generated from the PrimaryAPI catalog. Machine-readable contract: GET https://api.primaryapi.com/v1/apis/facebook.page_contact.