Sand AISand AI MAGI-2MAGI-2 jest teraz na SandBase: wideo 1080p z natywnym dźwiękiemWypróbuj teraz

Facebook Profile ID

Dokumentacja API
https://api.sandbase.ai/v1/api/facebook/profile-id

Resolve the numeric Facebook profile ID behind a profile path such as "zuck", for use with endpoints that need a profile ID.

Cena
$0.028571USD / wywołanie
Metoda
POST
Odpowiedź
JSON
Parametry
1 wymaganych · 0 opcjonalnych

Playground

Wejście
The path portion of the Facebook profile URL, such as /<profile-path>. Do not include the scheme or host.
WyjścieGotowe

Twój wynik pojawi się tutaj

Uzupełnij dane wejściowe, a następnie kliknij Uruchom.

README API

Facebook Profile ID API

This API returns the numeric Facebook profile ID for a profile path such as zuck. It needs one input, the url path of the profile.

Use cases

  • Convert a profile path into a numeric ID before you call an endpoint that only accepts profile IDs.
  • Store a numeric ID for each tracked profile next to its path in your own database.
  • Build a lookup table that maps many profile paths to their IDs in one batch job.

Request

curl -X POST "https://api.sandbase.ai/v1/api/facebook/profile-id" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "zuck"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
urlstringYesThe path portion of the Facebook profile URL, such as /<profile-path>. Do not include the scheme or host.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "profile_id": "4"
}

Response fields

FieldMeaning
profile_idThe numeric Facebook profile ID for the requested profile path. For the path zuck the value is 4.
profile_idThe value arrives as a string of digits, not as a JSON number. Keep it as a string in your code.
profile_idPass this value to any endpoint that asks for a profile ID. It is the only field in the response.

Notes

Pricing

$0.028571 per successful call. Failed calls are not charged.

Odkryj więcej

Powiązane APIs

Wszystkie APIs
APICenaOdpowiedź
Facebook$0.028571 za wywołanieJSON
FacebookOd $0.0012 za wywołanieJSON
FacebookOd $0.00462 za wywołanieJSON
FacebookOd $0.0012 za wywołanieJSON
FacebookOd $0.0011 za wywołanieJSON
FacebookOd $0.0011 za wywołanieJSON

Przewodniki:Best Facebook API in 2026: Pricing Compared

Pytania

FAQ

Jak używać API Facebook Profile ID?

Wyślij żądanie POST do https://api.sandbase.ai/v1/api/facebook/profile-id z kluczem API SandBase w nagłówku Authorization (Bearer) oraz parametrami w treści JSON. Możesz też wypróbować je w Playground na tej stronie bez pisania kodu.

Ile kosztuje API Facebook Profile ID?

$0.028571 za wywołanie, rozliczane z salda SandBase. Płacisz tylko za wykonane wywołania; nie ma subskrypcji.

Jakie parametry przyjmuje API Facebook Profile ID?

Wymagane: url (string). Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.

Co zwraca API Facebook Profile ID?

Odpowiedź JSON zwrócona w tym samym żądaniu HTTP (synchronicznie). README na tej stronie zawiera przykładową odpowiedź.

Czy potrzebuję konta deweloperskiego Facebook lub klucza API?

Nie. Facebook Profile ID działa przez SandBase, więc jeden klucz API SandBase obejmuje ten endpoint i każde inne API oraz model w katalogu. Nie musisz osobno ubiegać się o dostęp do API Facebook.