querystringbắt buộc
Keyword to search advertiser pages for (e.g. "nike").
https://api.sandbase.ai/v1/api/facebook/search-companiesSearch the Meta Ad Library for advertisers by keyword and get matching pages: page ID, category, verification, follower counts, and linked Instagram.
Đầ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 searches the Meta Ad Library for advertiser pages that match a keyword. It returns a list of matching pages with page ID, category, verification status, like count, and linked Instagram account. It needs one input, query.
curl -X POST "https://api.sandbase.ai/v1/api/facebook/search-companies" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "nike"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Keyword to search advertiser pages for (e.g. "nike"). |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"companies": [
{
"category": "Sportswear Store",
"country": "",
"entityType": "PERSON_PROFILE",
"igFollowers": 290838453,
"igUsername": "nike",
"igVerified": true,
"imageUrl": "https://scontent-iad3-1.xx.fbcdn.net/v/t39.30808-1/284964043_10159903868513445_7…",
"likes": 39489880,
"name": "Nike",
"pageAlias": "nike",
"pageDeleted": false,
"pageId": "15087023444"
}
]
},
"found": true
}
| Field | Meaning |
|---|---|
data.companies[].pageId | Facebook page ID as a string. Use it to look up the page's ads or other page data. |
data.companies[].name / data.companies[].pageAlias | Display name of the page and its URL alias, such as Nike and nike. |
data.companies[].category | Page category, such as Sportswear Store. |
data.companies[].verification | Verification status of the page. The sample shows BLUE_VERIFIED. |
data.companies[].likes | Number of likes on the Facebook page. |
data.companies[].igUsername | Username of the linked Instagram account. |
data.companies[].igFollowers / data.companies[].igVerified | Follower count of the linked Instagram account, and whether that account is verified. |
data.companies[].pageDeleted | true if the page has been deleted, false if not. |
data.companies[].imageUrl | URL of the page's profile image. |
found | true when the search returned matching pages. |
query. The request has no pagination parameter.pageId from a result and pass it to Facebook Company Ads to see that advertiser's ads.country is an empty string for every result.Billed at the actual cost of each call, about $0.0011 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/search-companies" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "nike"
}'Đặ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ộcKeyword to search advertiser pages for (e.g. "nike").
Đâ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 Company SearchAPI này Facebook | Từ $0.0011 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/search-companies 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.0011 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). 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 Company Search 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.