profileIdstring必須
The unique Facebook profile ID.
https://api.sandbase.ai/v1/api/facebook/profile-postsGet public posts for a Facebook profile ID with cursor pagination. Use it to browse a known profile's public posting history or continue through subsequent post pages.
出力はここに表示されます
入力を完了してから[実行]をクリックしてください。
Returns a page of public posts for a Facebook profile, with message text, reaction counts, comment and share counts, media, and top comments. It needs a Facebook profile ID in profileId. The response includes a cursor for the next page.
like, love, haha, angry) across posts to see which topics get which responses.post_id values to feed into comment or transcript lookups.curl -X POST "https://api.sandbase.ai/v1/api/facebook/profile-posts" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"profileId": "4"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
profileId | string | Yes | The unique Facebook profile ID. |
cursor | string | No | Pagination cursor for fetching the next set of results. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"cursor": "Cg8Ob3JnYW5pY19jdXJzb3IJAAACGkFRSFRyRXRuWmxKaUJ3SXVGNFpFaVg0RkxtSW9PX293c1VHaGdM…",
"results": [
{
"album_preview": [
{
"id": "10118155440653191",
"image_file_uri": "https://scontent-atl3-2.xx.fbcdn.net/v/t39.99422-6/885149443_1824040011869927_32…",
"type": "photo",
"url": "https://www.facebook.com/photo.php?fbid=10118155440653191&set=a.612287952871&typ…"
}
],
"associated_group": null,
"associated_group_id": null,
"attached_event": null,
"attached_group": null,
"attached_post": null,
"attached_post_url": null,
"author": {
"delegate_page_id": "111895498378878",
"id": "4",
"name": "Mark Zuckerberg",
"profile_picture_url": "https://scontent-atl3-2.xx.fbcdn.net/v/t39.30808-1/824997889_10117988912521901_6…",
"url": "https://www.facebook.com/zuck"
},
"author_title": null,
"authors": [
{
"delegate_page_id": "111895498378878",
"id": "4",
"name": "Mark Zuckerberg",
"profile_picture_url": "https://scontent-atl3-2.xx.fbcdn.net/v/t39.30808-1/824997889_10117988912521901_6…",
"url": "https://www.facebook.com/zuck"
}
],
"comments_count": 15054,
"comments_id": "10118155444854771"
}
]
}
| Field | Meaning |
|---|---|
cursor | Pagination cursor. Send it as cursor in the next request to get the next page of posts. |
results[].post_id | ID of the post. Also appears as comments_id and shares_id in the sample. |
results[].message | Text of the post. Long text may be cut in the response. |
results[].url | Public Facebook URL of the post. |
results[].timestamp | Post creation time as a Unix timestamp in seconds. |
results[].reactions_count | Total number of reactions on the post. |
results[].reactions.like / reactions.love / reactions.haha / reactions.care / reactions.wow / reactions.sad / reactions.angry | Count of each reaction type on the post. |
results[].comments_count / results[].reshare_count | Number of comments and number of reshares for the post. |
results[].author.id / results[].author.name / results[].author.url | ID, display name, and profile URL of the post author. |
results[].top_comments[].text | Text of a top comment on the post. Each entry also has author.name, created_time, and id. |
results[].attached_post.url | URL of another post attached to this one. It is null when nothing is attached. |
profileId. For example, 4 is the profile at https://www.facebook.com/zuck. If you only have a profile URL, try Facebook Profile ID.cursor value as cursor with the same profileId.video, image, and album_preview are null when the post has no matching media. images_count is null when the post has no images.$0.028571 per successful call. Failed calls are not charged.
開発を始める
統一認証と使用状況の追跡を備えたプラットフォームAPIエンドポイントです。
curl -X POST "https://api.sandbase.ai/v1/api/facebook/profile-posts" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"profileId": "4"
}'SandBaseのAPIキーをサーバー環境に設定してください。リクエストはBearer認証を使用します。
export SANDBASE_API_KEY="YOUR_API_KEY"キーはサーバー側で管理してください。ブラウザコードに公開しないでください。
profileIdstring必須The unique Facebook profile ID.
cursorstringPagination cursor for fetching the next set of results.
このAPIの保存済みサンプルレスポンスです。表示時にライブリクエストは行われません。
保存済みレスポンスはまだ公開されていません。PlaygroundでAPIを実行し、レスポンスを確認してください。
さらに探索
| API | 価格 | レスポンス |
|---|---|---|
Facebook | $0.028571 / 回 | JSON |
Facebook | 1回あたり $0.0012 から | JSON |
Facebook | 1回あたり $0.00462 から | JSON |
Facebook | 1回あたり $0.0012 から | JSON |
Facebook | 1回あたり $0.0011 から | JSON |
Facebook | 1回あたり $0.0011 から | JSON |
質問
Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/facebook/profile-posts に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。
1回あたり $0.028571、SandBase 残高から課金されます。課金対象はご利用分のみで、サブスクリプションはありません。
必須: profileId (string)。 任意: cursor (string)。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。
同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。 このページの README にサンプルレスポンスがあります。
いいえ。Facebook Get Profile Posts は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。Facebook の API アクセスを別途申請する必要はありません。