Discover posts by page URL
Create a new page search
Collect posts from a specific Facebook page by providing the page URL. The results include public posts published by the page, along with detailed metadata such as engagement metrics, timestamps, and author details.
Base URL
POST https://facebook-scraper-api.datashake.com/v1/search
Request payload
callback_url
Field type: string
Required: true
Description: A URL to receive API results via a JSON POST request.
url
Field type: string
Required: true
Description: Facebook page URL.
limit
Field type: integer
Required: false
Description: Limits the number of Facebook posts to be returned. If not specified, we will return 1000 posts.
external_identifier
Field type: string
Required: false
Description: A custom identifier for tracking your request. This value will be included in the callback payload.
Code example
curl --location 'https://facebook-scraper-api.datashake.com/v1/search' --header 'x-api-key: your-api-key' --header 'Content-Type: application/json' --request POST --data '{"url": "https://www.facebook.com/bbc/", "callback_url": "https://example.com/callback", "external_identifier": "my-custom-id", "limit": 100}'
import requests
url = "https://facebook-scraper-api.datashake.com/v1/search"
payload = {
"url": "https://www.facebook.com/bbc/",
"callback_url": "https://example.com/callback",
"external_identifier": "my-custom-id",
"limit": 100
}
headers = {
"x-api-key": "your-api-key",
}
response = requests.post(url=url, headers=headers, json=payload)
Response and callback payload
API response example
{
"status": "created",
"message": "Your request was successfully submitted.",
"request_id": "1742515679047322765-7538bd54-2bd7-45"
}
Callback payload example
{
"request_id": "1742515679047322765-7538bd54-2bd7-45",
"status": "completed",
"credits_used": 130,
"request_metadata": {
"url": "https://www.facebook.com/bbc/",
"callback_url": "http://example.com/callback",
"external_identifier": "my-custom-id",
"limit": 100
},
"results": [
{
"unique_id": null,
"post_id": "1204590234361923",
"text": "Any food is amazing after four glasses 😂🍷 \n\n#TwoDoorsDown #iPlayer #Throwback",
"hashtags": [
"TwoDoorsDown",
"iPlayer",
"Throwback"
],
"url": "https://www.facebook.com/bbc/videos/1340416587083699/",
"comments_count": 23,
"likes_count": 117,
"view_count": 42866,
"share_count": 19,
"upload_date": "2025-04-01T20:30:18.000Z",
"author": {
"profile_picture_url": "https://scontent-det1-1.xx.fbcdn.net/v/t39.30808-1/245330608_5300122836669539_378388837082703204_n.png?stp=cp0_dst-png_s40x40&_nc_cat=1&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=A6uW6wDS1gAQ7kNvgHztfKi&_nc_oc=Adl-iFkaIk7yTzW_mW7bgTb0ceckxR3A97NFHLE1rQ-lVJIrJyCOZ_llrxo6BB5l6pw&_nc_zt=24&_nc_ht=scontent-det1-1.xx&_nc_gid=vS5fMYO9GtZjD58fE1dKLA&oh=00_AYFbzeb8e2X9ce34XRnMIcWSzzNiAgvN4uVm4171jp2q5Q&oe=67F2A6C9",
"name": "BBC",
"url": "https://www.facebook.com/bbc",
"id": "100044328734711"
},
"media": [
{
"type": "video",
"thumbnail_url": "https://scontent-det1-1.xx.fbcdn.net/v/t15.5256-10/488616589_4009997222616638_194991206277975795_n.jpg?stp=dst-jpg_s960x960_tt6&_nc_cat=103&ccb=1-7&_nc_sid=282d23&_nc_ohc=LrXEjcWsT2UQ7kNvgG5ez-6&_nc_oc=AdnOyFEV50yQbRNjpNs8AwkOc4UMHlrUi3UOxMpmPPaoYI55OJNK3wIx4iIseTNe6WE&_nc_zt=23&_nc_ht=scontent-det1-1.xx&_nc_gid=vS5fMYO9GtZjD58fE1dKLA&oh=00_AYEPzD0GPdwS7-plcuHhuUDGFcLtqPCP4Cj5KlQbYjKZWw&oe=67F2C018",
"url": "https://www.facebook.com/bbc/videos/1340416587083699/",
"id": "1340416587083699",
}
],
"created_at": "2025-03-21T00:08:07.793135Z",
"updated_at": "2025-03-21T00:08:07.793136Z",
},
...
],
"summary": {
"total_posts": 100,
"unique_user_count": 1
},
"pagination": {
"total": 100,
"page": 1,
"per_page": 50,
"total_pages": 2
}
}
Get search results
Use this endpoint to retrieve results in a synchronous manner.
Note that this endpoint is not intended for polling - make sure to check if your request has completed before calling it.
Base URL
GET https://facebook-scraper-api.datashake.com/v1/search/:request_id
Path parameters
request_id
Field type: string
Required: true
Description: The unique identifier for the request.
Request parameters
page
Field type: integer
Required: false
Description: The page number of the results to retrieve.
per_page
Field type: integer
Required: false
Description: The number of results to retrieve per page.
Code example
curl --location 'https://facebook-scraper-api.datashake.com/v1/search/1742546457946506999-897b27cc-acd7-4a?page=1&per_page=10' --header 'x-api-key: your-api-key'
import requests
url = "https://facebook-scraper-api.datashake.com/v1/search/1742546457946506999-897b27cc-acd7-4a"
params = {
"page": 1,
"per_page": 10
}
headers = {
"x-api-key": "your-api-key",
}
response = requests.get(url=url, headers=headers, params=params)
Response
API response example
{
"request_id": "1742515679047322765-7538bd54-2bd7-45",
"status": "completed",
"credits_used": 130,
"request_metadata": {
"url": "https://www.facebook.com/bbc/",
"callback_url": "http://example.com/callback",
"external_identifier": "my-custom-id",
"limit": 100
},
"results": [
{
"unique_id": null,
"post_id": "1204590234361923",
"text": "Any food is amazing after four glasses 😂🍷 \n\n#TwoDoorsDown #iPlayer #Throwback",
"hashtags": [
"TwoDoorsDown",
"iPlayer",
"Throwback"
],
"url": "https://www.facebook.com/bbc/videos/1340416587083699/",
"comments_count": 23,
"likes_count": 117,
"view_count": 42866,
"share_count": 19,
"upload_date": "2025-04-01T20:30:18.000Z",
"author": {
"profile_picture_url": "https://scontent-det1-1.xx.fbcdn.net/v/t39.30808-1/245330608_5300122836669539_378388837082703204_n.png?stp=cp0_dst-png_s40x40&_nc_cat=1&ccb=1-7&_nc_sid=2d3e12&_nc_ohc=A6uW6wDS1gAQ7kNvgHztfKi&_nc_oc=Adl-iFkaIk7yTzW_mW7bgTb0ceckxR3A97NFHLE1rQ-lVJIrJyCOZ_llrxo6BB5l6pw&_nc_zt=24&_nc_ht=scontent-det1-1.xx&_nc_gid=vS5fMYO9GtZjD58fE1dKLA&oh=00_AYFbzeb8e2X9ce34XRnMIcWSzzNiAgvN4uVm4171jp2q5Q&oe=67F2A6C9",
"name": "BBC",
"url": "https://www.facebook.com/bbc",
"id": "100044328734711"
},
"media": [
{
"type": "video",
"thumbnail_url": "https://scontent-det1-1.xx.fbcdn.net/v/t15.5256-10/488616589_4009997222616638_194991206277975795_n.jpg?stp=dst-jpg_s960x960_tt6&_nc_cat=103&ccb=1-7&_nc_sid=282d23&_nc_ohc=LrXEjcWsT2UQ7kNvgG5ez-6&_nc_oc=AdnOyFEV50yQbRNjpNs8AwkOc4UMHlrUi3UOxMpmPPaoYI55OJNK3wIx4iIseTNe6WE&_nc_zt=23&_nc_ht=scontent-det1-1.xx&_nc_gid=vS5fMYO9GtZjD58fE1dKLA&oh=00_AYEPzD0GPdwS7-plcuHhuUDGFcLtqPCP4Cj5KlQbYjKZWw&oe=67F2C018",
"url": "https://www.facebook.com/bbc/videos/1340416587083699/",
"id": "1340416587083699",
}
],
"created_at": "2025-03-21T00:08:07.793135Z",
"updated_at": "2025-03-21T00:08:07.793136Z",
},
...
],
"summary": {
"total_posts": 100,
"unique_user_count": 1
},
"pagination": {
"total": 100,
"page": 1,
"per_page": 50,
"total_pages": 2
}
}