urlstringwajib
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.
Output Anda akan muncul di sini
Lengkapi input, lalu klik Run.
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.
Mulai membangun
Endpoint API platform dengan autentikasi dan pelacakan penggunaan terpadu.
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"
}'Atur SandBase API key Anda di environment server Anda. Permintaan menggunakan autentikasi Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Simpan key Anda di server. Jangan tampilkan di kode browser.
urlstringwajibThe path portion of the Facebook profile URL, such as /<profile-path>. Do not include the scheme or host.
Contoh respons yang disimpan untuk API ini; tidak ada permintaan langsung yang dibuat saat melihatnya.
Belum ada respons tersimpan yang dipublikasikan. Jalankan API di Playground untuk melihat responsnya.
Jelajahi lebih lanjut
| API | Harga | Respons |
|---|---|---|
Facebook Profile IDAPI ini Facebook | $0.028571 per panggilan | JSON |
Facebook | Dari $0.0012 per panggilan | JSON |
Facebook | Dari $0.00462 per panggilan | JSON |
Facebook | Dari $0.0012 per panggilan | JSON |
Facebook | Dari $0.0011 per panggilan | JSON |
Facebook | Dari $0.0011 per panggilan | JSON |
Pertanyaan
Kirim permintaan POST ke https://api.sandbase.ai/v1/api/facebook/profile-id dengan kunci API SandBase Anda di header Authorization (Bearer) dan parameter sebagai body JSON. Anda juga dapat mencobanya di Playground di halaman ini tanpa menulis kode.
$0.028571 per panggilan, ditagihkan dari saldo SandBase Anda. Anda hanya dikenai biaya untuk panggilan yang Anda lakukan; tidak ada langganan.
Wajib: url (string). Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.
Respons JSON yang dikembalikan dalam permintaan HTTP yang sama (sinkron). README di halaman ini menyertakan contoh respons.
Tidak. Facebook Profile ID berjalan melalui SandBase, jadi satu kunci API SandBase mencakup endpoint ini dan setiap API serta model lain di katalog. Anda tidak perlu mendaftar akses API Facebook secara terpisah.