querystringbắt buộc
Name to look up, as you would type it into Facebook's search box (e.g. NASA or plumber chicago).
https://api.sandbase.ai/v1/api/facebook/page-lookupLook up Facebook Pages and profiles by name with Facebook's own quick search. A name lookup that returns basic identity fields only: name, URL, profile image, Facebook id, and verified status. Matches can include personal profiles as well as Pages. For full Page details (category, followers, phone, website), use facebook.search_pages.
Đầu ra của bạn sẽ xuất hiện ở đây
Hoàn tất đầu vào, rồi nhấp Run.
This API looks up Facebook Pages and profiles by name and returns up to 7 matches. It needs one input, query, the name you would type into Facebook's search box. Each match has only basic identity fields.
id of a brand or organization from its name.id or url, then pass it to another Facebook API for deeper data.curl -X POST "https://api.sandbase.ai/v1/api/facebook/page-lookup" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"limit": 5, "query": "NASA"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Name to look up, as you would type it into Facebook's search box (e.g. NASA or plumber chicago). |
limit | integer | No | Maximum number of matches to return (1-7, default 7). Facebook's quick search answers a name with at most 7 matches. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"items": [
{
"id": "100044561550831",
"image": "https://scontent-mia5-2.xx.fbcdn.net/v/t39.30808-1/243095782_416661036495945_384…",
"isVerified": true,
"name": "NASA - National Aeronautics and Space Administration",
"url": "https://www.facebook.com/NASA"
}
]
},
"found": true
}
| Field | Meaning |
|---|---|
found | true when the lookup returned at least one match. A lookup with no matches returns found: false. |
data.items[] | One match for the name. The list holds at most limit entries, and never more than 7. |
data.items[].name | Display name of the Page or profile, for example NASA - National Aeronautics and Space Administration. |
data.items[].url | Public Facebook URL of the match, for example https://www.facebook.com/NASA. |
data.items[].id | Facebook id of the match, returned as a string of digits. |
data.items[].isVerified | true when the match shows as verified on Facebook. |
data.items[].image | URL of the small profile image for the match. The sample URLs point to 120x120 images. |
name and url before you use a result.limit between 1 and 7. The default is 7, and there is no pagination.Billed at the actual cost of each call, about $0.00975 for the request above. Failed calls are not charged.
Bắt đầu xây dựng
Endpoint API của nền tảng với xác thực và theo dõi mức sử dụng thống nhất.
curl -X POST "https://api.sandbase.ai/v1/api/facebook/page-lookup" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"limit": 5,
"query": "NASA"
}'Đặt SandBase API key của bạn trong môi trường máy chủ. Các request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key của bạn trên máy chủ. Không hiển thị trong mã chạy trên trình duyệt.
querystringbắt buộcName to look up, as you would type it into Facebook's search box (e.g. NASA or plumber chicago).
limitintegerMaximum number of matches to return (1-7, default 7). Facebook's quick search answers a name with at most 7 matches.
Mặc định: 7
Đây là phản hồi ví dụ đã lưu cho API này; không có request thực nào được gửi khi xem mục này.
Chưa có phản hồi đã lưu nào được công bố. Chạy API trong Playground để xem phản hồi.
Khám phá thêm
| API | Giá | Phản hồi |
|---|---|---|
Facebook Page LookupAPI này Facebook | Từ $0.00975 mỗi lần gọi | JSON |
Facebook | Từ $0.0012 mỗi lần gọi | JSON |
Facebook | Từ $0.00462 mỗi lần gọi | JSON |
Facebook | Từ $0.0012 mỗi lần gọi | JSON |
Facebook | Từ $0.0011 mỗi lần gọi | JSON |
Facebook | Từ $0.0011 mỗi lần gọi | JSON |
Câu hỏi
Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/facebook/page-lookup với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.
Từ $0.00975 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.
Bắt buộc: query (string). Tùy chọn: limit (integer). Bảng Parameters và Playground trên trang này liệt kê mọi trường.
Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.
Không. Facebook Page Lookup chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Facebook.