urlstringwymagane
The path portion of the Facebook profile URL, such as /<profile-path>. Do not include the scheme or host.
https://api.sandbase.ai/v1/api/facebook/profile-idResolve the numeric Facebook profile ID behind a profile path such as "zuck", for use with endpoints that need a profile ID.
Twój wynik pojawi się tutaj
Uzupełnij dane wejściowe, a następnie kliknij Uruchom.
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.
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.
| Name | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The path portion of the Facebook profile URL, such as /<profile-path>. Do not include the scheme or host. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"profile_id": "4"
}
| Field | Meaning |
|---|---|
profile_id | The numeric Facebook profile ID for the requested profile path. For the path zuck the value is 4. |
profile_id | The value arrives as a string of digits, not as a JSON number. Keep it as a string in your code. |
profile_id | Pass this value to any endpoint that asks for a profile ID. It is the only field in the response. |
url, such as zuck. Do not include the scheme or host.$0.028571 per successful call. Failed calls are not charged.
Zacznij tworzyć
Punkt końcowy API platformy z jednolitym uwierzytelnianiem i śledzeniem użycia.
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"
}'Ustaw klucz API SandBase w środowisku serwera. Żądania używają uwierzytelniania Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Przechowuj klucz na serwerze. Nie ujawniaj go w kodzie przeglądarkowym.
urlstringwymaganeThe path portion of the Facebook profile URL, such as /<profile-path>. Do not include the scheme or host.
Zapisany przykładowy response dla tego API; podczas wyświetlania nie jest wykonywane żadne żądanie na żywo.
Nie opublikowano zapisanego response. Uruchom API w Playground, aby sprawdzić jego odpowiedź.
Odkryj więcej
| API | Cena | Odpowiedź |
|---|---|---|
Facebook Profile IDTo API Facebook | $0.028571 za wywołanie | JSON |
Facebook | Od $0.0012 za wywołanie | JSON |
Facebook | Od $0.00462 za wywołanie | JSON |
Facebook | Od $0.0012 za wywołanie | JSON |
Facebook | Od $0.0011 za wywołanie | JSON |
Facebook | Od $0.0011 za wywołanie | JSON |
Przewodniki:Best Facebook API in 2026: Pricing Compared
Pytania
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.
$0.028571 za wywołanie, rozliczane z salda SandBase. Płacisz tylko za wykonane wywołania; nie ma subskrypcji.
Wymagane: url (string). Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.
Odpowiedź JSON zwrócona w tym samym żądaniu HTTP (synchronicznie). README na tej stronie zawiera przykładową odpowiedź.
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.