The Facebook Scraper is an advanced tool designed to extract and organize content from the world's largest social media platform. This powerful scraper offers an efficient method to collect posts, comments, user data, and engagement metrics, providing valuable insights for various industries and applications.
Data Point | Description | Example |
---|---|---|
Post ID | Unique identifier for the post | 964453929052196 |
User Information | Details about the post author | Name, URL, Profile ID |
Content | Text of the post or comment | [Full text content] |
Date Posted | When the content was published | 2024-07-29T00:00:00.000Z |
Engagement Metrics | Likes, comments, shares, views | 443 likes, 183 comments |
Hashtags | Tags used in the post | #abcradiobrisbane |
Multimedia | Links to images, videos, etc. | [Thumbnail URL] |
Page Information | Details about the Facebook page | Followers, verification status |
The Facebook Scraper is a valuable asset for various sectors, including:
The Facebook Scraper API allows you to extract various types of information from Facebook, including comments, posts, and reels. This powerful tool enables developers to integrate Facebook data into their applications for social media analysis, content discovery, and more.
To use the Facebook Scraper API, you'll need to authenticate your requests using your API key. The API provides several endpoints for retrieving different types of information:
Include your API key in the request headers:
Authorization: Bearer YOUR_API_KEY
The request body should be a JSON object with the following structure:
{
"url": "https://www.facebook.com/post-or-profile-url"
}
Please note that usage is subject to rate limiting. Refer to your plan details for specific limits.
Here's an example of the data you can expect to receive for the posts endpoint:
[
{
"input": {
"url": "https://www.facebook.com/share/p/gep5QPJZNa81fYdu/"
},
"url": "https://www.facebook.com/share/p/gep5QPJZNa81fYdu/",
"post_id": "1018149849668053",
"user_url": "https://www.facebook.com/chicagobulls",
"user_username_raw": "Chicago Bulls",
"content": "OFFICIAL: We have signed Adama Sanogo to a Two-Way contract.",
"date_posted": "2024-07-06T19:05:27.000Z",
"hashtags": [],
"num_comments": 423,
"num_shares": 133,
"num_likes_type": [
{
"type": "Like",
"num": 1244
},
{
"type": "Love",
"num": 159
},
// ... other reaction types
],
"profile_id": "100044191428045",
"page_logo": "https://scontent.ffjr1-5.fna.fbcdn.net/v/t39.30808-1/212462980_10160041034481614_5926436553100355993_n.jpg?stp=dst-jpg_s200x200&_nc_cat=1&ccb=1-7&_nc_sid=f4b9fd&_nc_ohc=rA74odqUutcQ7kNvgGSJfbM&_nc_ht=scontent.ffjr1-5.fna&_nc_gid=AxecZ1Q78ZtyzlKBYQhCLQr&oh=00_AYBt10IFJCx4OlHtaPWx2lrjgKuKIfj5aYp4o69epgeLeQ&oe=66EBC08D",
"page_likes": 16000000,
"page_followers": 16000000,
"page_is_verified": true,
"attachments": [
{
"id": "1018149819668056",
"type": "Photo",
"url": "https://scontent.fhex3-1.fna.fbcdn.net/v/t39.30808-6/449743922_1018149816334723_5191694102170548263_n.jpg?stp=dst-jpg_s640x640&_nc_cat=100&ccb=1-7&_nc_sid=127cfc&_nc_ohc=PvTq2kOtlNkQ7kNvgE8IXaZ&_nc_ht=scontent.fhex3-1.fna&oh=00_AYABlBQtCKlgVo5GjewF8GDvY8-dDUaib3GXMHSrJKTXUQ&oe=66EBBB04",
"video_length": null,
"source_type": null,
"attachment_url": null
}
],
"page_url": "https://www.facebook.com/chicagobulls",
"header_image": "https://www.facebook.com/photo/?fbid=864835661666140&set=a.811377607011946",
"avatar_image_url": "https://scontent.fhex3-1.fna.fbcdn.net/v/t39.30808-1/212462980_10160041034481614_5926436553100355993_n.jpg?stp=cp0_dst-jpg_s40x40&_nc_cat=1&ccb=1-7&_nc_sid=f4b9fd&_nc_ohc=rA74odqUutcQ7kNvgEAolNp&_nc_ht=scontent.fhex3-1.fna&oh=00_AYBfTYtME31VK0tUVKJB7s87_M0u2x08fiT6aBGmhDDs-w&oe=66EBC08D",
"profile_handle": "chicagobulls",
"is_sponsored": false,
"shortcode": "1018149849668053",
"likes": 1244,
"post_image": "https://scontent.fhex3-1.fna.fbcdn.net/v/t39.30808-6/449743922_1018149816334723_5191694102170548263_n.jpg?stp=dst-jpg_s640x640&_nc_cat=100&ccb=1-7&_nc_sid=127cfc&_nc_ohc=PvTq2kOtlNkQ7kNvgE8IXaZ&_nc_ht=scontent.fhex3-1.fna&oh=00_AYABlBQtCKlgVo5GjewF8GDvY8-dDUaib3GXMHSrJKTXUQ&oe=66EBBB04",
"post_type": "Post",
"user_handle": "chicagobulls"
}
]
import requests
import json
# Your API Key
api_key = 'YOUR_API_KEY'
# API Endpoint for post information
url = 'https://taskagi.net/api/social-media/facebook-scraper/posts'
# Headers
headers = {
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json'
}
# Request Body
data = {
'url': 'https://www.facebook.com/share/p/gep5QPJZNa81fYdu/'
}
# Send POST request
response = requests.post(url, headers=headers, json=data)
# Check if the request was successful
if response.status_code == 200:
# Parse the JSON response
post_info = response.json()
# Print the post information
print(json.dumps(post_info, indent=2))
else:
print(f"Error: {response.status_code}")
print(response.text)
# Example for posts by profile
url = 'https://taskagi.net/api/social-media/facebook-scraper/posts-by-profile'
# Request Body for profile posts
data = {
'url': 'https://www.facebook.com/chicagobulls'
}
# Send POST request
response = requests.post(url, headers=headers, json=data)
# Check if the request was successful
if response.status_code == 200:
# Parse the JSON response
profile_posts = response.json()
# Print the profile posts
print(json.dumps(profile_posts, indent=2))
else:
print(f"Error: {response.status_code}")
print(response.text)