Facebook API
Facebook 粉絲專頁個人檔案與公開貼文。
- 僅支援公開的 Facebook 粉絲專頁,不支援個人檔案
- 貼文搜尋每次請求最多回傳 10 筆結果
/facebook/posts?url=端點支援貼文、影片、Reels 和分享連結
用戶
GET /facebook/users/:username — 3 點數
取得 Facebook 粉絲專頁個人檔案。
| 參數 | 類型 | 必填 | 預設 | 說明 |
|---|---|---|---|---|
username | string | 是 | — | Facebook 粉專用戶名稱或 ID |
cURL
curl -H "x-api-key: sk_byc_xxx" \
https://api.bycrawl.com/facebook/users/NASA回應
{
"id": "100044561550831",
"name": "NASA - National Aeronautics and Space Administration",
"username": "NASA",
"category": "",
"profilePicture": "https://...",
"coverPhoto": "https://...",
"likesCount": 26880882,
"description": "NASA - National Aeronautics and Space Administration..."
}GET /facebook/users/:username/posts — 3 點數
取得 Facebook 粉絲專頁的近期貼文。
| 參數 | 類型 | 必填 | 預設 | 說明 |
|---|---|---|---|---|
username | string | 是 | — | Facebook 粉專用戶名稱或 ID |
count | integer | 否 | 3 | 貼文數量(最多 10) |
cURL
curl -H "x-api-key: sk_byc_xxx" \
https://api.bycrawl.com/facebook/users/NASA/posts回應
{
"posts": [
{
"id": "1471370877691617",
"text": "Want to track the Artemis II crew around the Moon...",
"createdAt": "2026-03-06T18:48:20.000Z",
"permalinkUrl": "https://www.facebook.com/photo.php?fbid=1471370844358287&set=a.416661013162614&type=3",
"reactionCount": 3204,
"commentCount": 208,
"shareCount": 478,
"topReactions": [
{ "type": "1635855486666999", "count": 20 },
{ "type": "115940658764963", "count": 4 }
],
"media": []
}
]
}貼文
GET /facebook/posts?url=xxx — 1 點數
依 URL 取得 Facebook 貼文。支援貼文、Reels、影片和分享連結。
| 參數 | 類型 | 必填 | 預設 | 說明 |
|---|---|---|---|---|
url | string | 是 | — | Facebook 貼文 URL |
cURL
curl -H "x-api-key: sk_byc_xxx" \
"https://api.bycrawl.com/facebook/posts?url=https://www.facebook.com/will.fans/videos/2737644976589415"回應
{
"id": "2737644976589415",
"url": "https://www.facebook.com/will.fans/videos/2737644976589415",
"author": { "name": "Will", "id": "100064322940906" },
"text": "Post content...",
"createdAt": "2025-06-01T12:00:00.000Z",
"reactionCount": 963,
"commentCount": 47,
"shareCount": 228,
"viewCount": 59000,
"media": [{ "type": "video", "url": "https://..." }]
}GET /facebook/posts/comments?url=xxx — 3 點數
依 URL 取得 Facebook 貼文留言。
| 參數 | 類型 | 必填 | 預設 | 說明 |
|---|---|---|---|---|
url | string | 是 | — | Facebook 貼文 URL |
cursor | string | 否 | — | 分頁游標 |
cURL
curl -H "x-api-key: sk_byc_xxx" \
"https://api.bycrawl.com/facebook/posts/comments?url=https://www.facebook.com/hower.chen/posts/pfbid022KX63mKWNtujSnrsxBkzvSwG6G9XCTz5SxQrYdfYCktEjD1bzVNoX8zy5C1xR5Bol"回應
{
"comments": [
{
"id": "1234567890123",
"text": "Great post!",
"authorName": "John Doe",
"authorId": "100012345678901",
"createdAt": "2026-03-01T08:15:30.000Z",
"reactionCount": 5,
"replies": [
{
"id": "1234567890124",
"text": "Thanks!",
"authorName": "Jane Smith",
"authorId": "100098765432101",
"createdAt": "2026-03-01T09:20:00.000Z",
"reactionCount": 1,
"replies": []
}
]
}
],
"nextCursor": null
}GET /facebook/posts/search?q=xxx — 2 點數
依關鍵字搜尋公開 Facebook 貼文。
| 參數 | 類型 | 必填 | 預設 | 說明 |
|---|---|---|---|---|
q | string | 是 | — | 搜尋關鍵字 |
count | integer | 否 | 5 | 結果數量(最多 10) |
cURL
curl -H "x-api-key: sk_byc_xxx" \
"https://api.bycrawl.com/facebook/posts/search?q=bitcoin&count=5"回應
{
"posts": [
{
"postId": "1495158265349916",
"url": "https://www.facebook.com/BitcoinMagazine/posts/pfbid02MeTE2RCUqf...",
"text": "21 million #Bitcoin, 8.1 billion people. Do the math...",
"createdAt": "2026-03-05T21:17:00.000Z",
"author": { "name": "Bitcoin Magazine", "id": "100045672716302" },
"reactionCount": 1506,
"commentCount": 676,
"shareCount": 172,
"media": [{ "type": "photo", "url": "https://..." }]
}
],
"nextCursor": "AQHRl..."
}Marketplace
GET /facebook/marketplace/listings — 1 點數
依地點和可選類別瀏覽 Facebook Marketplace 刊登商品。
| 參數 | 類型 | 必填 | 預設 | 說明 |
|---|---|---|---|---|
location | string | 否 | taipei | 地點代碼(例如 taipei、newyork) |
category | string | 否 | — | 類別代碼(例如 vehicles、electronics) |
cURL
curl -H "x-api-key: sk_byc_xxx" \
"https://api.bycrawl.com/facebook/marketplace/listings?location=taipei&category=vehicles"回應
{
"listings": [
{
"id": "1432903611622625",
"title": "Aston Martin 2005 DB9",
"price": {
"amount": "1750000",
"currency": "TWD",
"formatted": "NT$1,750,000"
},
"location": {
"city": "台北市",
"region": "",
"displayName": "Taipei, Taiwan"
},
"primaryPhoto": "https://...",
"url": "https://www.facebook.com/marketplace/item/1432903611622625/",
"isSold": false,
"isLive": true,
"isPending": false,
"categoryId": "807311116002614",
"deliveryTypes": ["IN_PERSON", "PUBLIC_MEETUP"]
}
],
"location": "taipei",
"category": "vehicles"
}GET /facebook/marketplace/search?q=xxx — 1 點數
依關鍵字搜尋 Facebook Marketplace 刊登商品。
| 參數 | 類型 | 必填 | 預設 | 說明 |
|---|---|---|---|---|
q | string | 是 | — | 搜尋關鍵字 |
location | string | 否 | taipei | 地點代碼(例如 taipei、newyork) |
category | string | 否 | — | 類別篩選(例如 vehicles) |
cURL
curl -H "x-api-key: sk_byc_xxx" \
"https://api.bycrawl.com/facebook/marketplace/search?q=toyota&location=taipei"回應
{
"listings": [
{
"id": "9876543210123456",
"title": "Toyota Corolla 2018",
"price": {
"amount": "450000",
"currency": "TWD",
"formatted": "NT$450,000"
},
"location": {
"city": "台北市",
"region": "",
"displayName": "Taipei, Taiwan"
},
"primaryPhoto": "https://...",
"url": "https://www.facebook.com/marketplace/item/9876543210123456/",
"isSold": false,
"isLive": true,
"isPending": false,
"categoryId": "807311116002614",
"deliveryTypes": ["IN_PERSON"]
}
],
"query": "toyota",
"location": "taipei"
}GET /facebook/marketplace/items/:listing_id — 1 點數
依 ID 取得 Facebook Marketplace 商品詳情。回傳完整描述、照片、價格、狀態和地點。
| 參數 | 類型 | 必填 | 預設 | 說明 |
|---|---|---|---|---|
listing_id | string | 是 | — | Marketplace 商品 ID |
cURL
curl -H "x-api-key: sk_byc_xxx" \
"https://api.bycrawl.com/facebook/marketplace/items/1432903611622625"回應
{
"id": "1432903611622625",
"title": "Aston Martin 2005 DB9",
"price": {
"amount": "1750000",
"currency": "TWD",
"formatted": "NT$1,750,000"
},
"description": "英倫優雅,到利曼榮耀...",
"condition": "PC_USED_GOOD",
"createdAt": "2026-02-27T12:30:07.000Z",
"photos": ["https://..."],
"location": {
"city": "台北市",
"region": "",
"displayName": "台北市, 台灣"
},
"primaryPhoto": "https://...",
"url": "https://www.facebook.com/marketplace/item/1432903611622625/",
"sellerName": null,
"sellerId": null,
"isSold": false,
"isLive": true,
"isPending": false,
"categoryId": "807311116002614",
"deliveryTypes": ["IN_PERSON", "PUBLIC_MEETUP"]
}