Facebook Url To Id Scraper
Pricing
$19.99/month + usage
Facebook Url To Id Scraper
Facebook Url To Id Scraper converts any Facebook profile, page, group, or post URL into its exact numeric ID. Get fast, reliable ID extraction for automation, data workflows, and integrations. Ideal for marketers, analysts, and developers needing clean structured IDs.
Pricing
$19.99/month + usage
Rating
0.0
(0)
Developer

API Empire
Actor stats
0
Bookmarked
3
Total users
1
Monthly active users
4 days ago
Last modified
Categories
Share
A powerful Apify Actor that extracts Facebook page IDs, group information, and post data from Facebook URLs. This actor automatically detects URL types (pages, groups, or posts) and extracts structured data including Facebook IDs, OpenGraph metadata, user information, and more.
Why Choose Us?
- Intelligent URL Detection: Automatically identifies whether a URL is a Facebook page, group, or post
- Smart Proxy Management: Built-in proxy fallback system that automatically switches between no proxy, datacenter, and residential proxies when requests are blocked
- Bulk Processing: Process multiple URLs, usernames, or keywords in a single run
- Comprehensive Data Extraction: Extracts Facebook IDs, OpenGraph metadata, user profiles, group information, and post details
- Real-time Logging: Detailed progress logs keep you informed throughout the scraping process
- Reliable & Robust: Automatic retry mechanism with residential proxy fallback ensures high success rates
Key Features
- ✅ Multi-URL Type Support: Handles Facebook pages, groups, and posts seamlessly
- ✅ Automatic Proxy Fallback: Starts with no proxy, automatically falls back to datacenter proxy, then residential proxy with 3 retries if blocked
- ✅ Bulk Input Support: Process multiple URLs, usernames, or keywords at once
- ✅ Structured Output: Organized data into
page_data,group_data, andpost_datacategories - ✅ OpenGraph Metadata: Extracts rich metadata including titles, descriptions, images, and more
- ✅ Facebook ID Extraction: Retrieves unique Facebook IDs for pages, groups, and posts
- ✅ User Profile Data: Extracts user information, profile pictures, and page details
- ✅ Group Information: Captures group names, member counts, join states, and group metadata
- ✅ Post Details: Extracts post IDs, content, page associations, and engagement data
- ✅ Async Processing: Fast and efficient asynchronous request handling
Input
The actor accepts the following input parameters:
Input Schema
{"startUrls": [{"url": "https://www.facebook.com/NintendoAmerica"},{"url": "https://www.facebook.com/groups/germtheory.vs.terraintheory"},{"url": "https://www.facebook.com/NintendoAmerica/posts/pfbid02JESEPSvyiLGjvewuFYhviAwQjTdxZW1ZfnWTeCzxVWgZLT3xgoLHVDwvuenVRyKKl"}],"sort_order": "chronological","max_comments": 0,"proxyConfiguration": {"useApifyProxy": false}}
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| startUrls | Array | Yes | List of Facebook URLs, usernames, or keywords to scrape. Supports bulk input. Can be full URLs (e.g., https://www.facebook.com/username) or just usernames (e.g., NintendoAmerica). |
| sort_order | String | No | Sort order for results. Options: "chronological", "relevance", "popular". Default: "chronological". |
| max_comments | Integer | No | Maximum number of comments to extract per post. Set to 0 for no limit. Range: 0-10000. Default: 0. |
| proxyConfiguration | Object | No | Proxy configuration. By default, no proxy is used. If Facebook blocks the request, the actor automatically falls back to datacenter proxy, then residential proxy with 3 retries. |
Input Examples
Example 1: Single Page URL
{"startUrls": [{ "url": "https://www.facebook.com/NintendoAmerica" }]}
Example 2: Multiple URLs (Mixed Types)
{"startUrls": [{ "url": "https://www.facebook.com/NintendoAmerica" },{ "url": "https://www.facebook.com/groups/germtheory.vs.terraintheory" },{ "url": "https://www.facebook.com/NintendoAmerica/posts/pfbid02JESEPSvyiLGjvewuFYhviAwQjTdxZW1ZfnWTeCzxVWgZLT3xgoLHVDwvuenVRyKKl" }]}
Example 3: Usernames Only
{"startUrls": [{ "url": "NintendoAmerica" },{ "url": "Microsoft" }]}
Output
The actor outputs structured data organized into three categories: page_data, group_data, and post_data. Each item is saved to the Apify dataset in real-time.
Output Structure
{"page_data": [{"facebookUrl": "https://www.facebook.com/NintendoAmerica","url": "https://www.facebook.com/NintendoAmerica","facebookId": "100064368354094","user": {"id": "100064368354094","name": "Nintendo of America",...},"openGraph": {"app_name": "Facebook","package": "com.facebook.katana","url": "https://www.facebook.com/NintendoAmerica","app_store_id": "284882215","type": "video.other","title": "Nintendo of America","description": "Nintendo of America. 5,338,483 likes · 43,168 talking about this...","alt": "Nintendo of America","image": "https://scontent.fdac142-1.fna.fbcdn.net/...","locale": "en_US"},"pageAdLibrary": {"is_business_page_active": false,"id": "119240841493711"}}],"group_data": [{"source_url": "https://www.facebook.com/groups/germtheory.vs.terraintheory","facebookUrl": "https://www.facebook.com/groups/germtheory.vs.terraintheory","url": "https://www.facebook.com/groups/germtheory.vs.terraintheory","facebookId": "123456789","group": {"name": "Group Name","url": "https://www.facebook.com/groups/...","id": "123456789","profile_picture": {"uri": "https://..."},"viewer_join_state": "CAN_JOIN","group_member_profiles": {"formatted_count_text": "1.2K members"}},"openGraph": {"title": "Group Title","description": "Group description...",...}}],"post_data": [{"facebookId": "123456789","postId": "pfbid02JESEPSvyiLGjvewuFYhviAwQjTdxZW1ZfnWTeCzxVWgZLT3xgoLHVDwvuenVRyKKl","url": "https://www.facebook.com/NintendoAmerica/posts/...","facebookUrl": "https://www.facebook.com/NintendoAmerica/posts/...","pageId": "100064368354094","node": {"__typename": "Story","id": "123456789",...},"openGraph": {"type": "video.other","title": "Post Title","description": "Post description...",...},"source_url": "https://www.facebook.com/NintendoAmerica/posts/..."}]}
Output Fields
Page Data Fields
facebookUrl: The Facebook URL of the pageurl: Canonical URL of the pagefacebookId: Unique Facebook ID of the pageuser: User/profile object with detailed informationopenGraph: OpenGraph metadata (title, description, image, etc.)pageAdLibrary: Page ad library information (if available)
Group Data Fields
source_url: Original source URLfacebookUrl: The Facebook URL of the groupurl: Canonical URL of the groupfacebookId: Unique Facebook ID of the groupgroup: Group object with name, member count, join state, etc.openGraph: OpenGraph metadatagroupTitle: Group title
Post Data Fields
facebookId: Unique Facebook ID of the postpostId: Post identifierurl: URL of the postfacebookUrl: Facebook URL of the postpageId: ID of the page that owns the postnode: Post node data with full story informationopenGraph: OpenGraph metadatasource_url: Original source URLpageAdLibrary: Page ad library information (if available)
🚀 How to Use the Actor (via Apify Console)
-
Log in to Apify: Go to https://console.apify.com and sign in to your account.
-
Find the Actor: Navigate to the Actors section and search for "facebook-url-to-id-scraper" or locate it in your actor list.
-
Configure Inputs:
- Add one or more Facebook URLs, usernames, or keywords in the
startUrlsfield - Optionally configure
sort_orderandmax_comments - Configure proxy settings if needed (default: no proxy with automatic fallback)
- Add one or more Facebook URLs, usernames, or keywords in the
-
Run the Actor: Click the Start button to begin scraping.
-
Monitor Progress: Watch the real-time logs to see:
- URL processing status
- Proxy mode changes
- Data extraction progress
- Success/failure notifications
-
Access Results: Once complete, go to the OUTPUT tab to view your scraped data.
-
Export Data: Export results to JSON, CSV, or other formats using the export options.
Best Use Cases
- Social Media Research: Extract Facebook IDs and metadata for market research and analysis
- Competitor Analysis: Gather information about competitor Facebook pages and posts
- Content Aggregation: Collect post data and metadata for content analysis
- Group Monitoring: Track Facebook group information and member statistics
- Data Integration: Extract Facebook IDs for integration with other systems
- SEO & Marketing: Gather OpenGraph metadata for SEO and marketing purposes
- Academic Research: Collect publicly available Facebook data for research projects
Frequently Asked Questions
Q: What types of Facebook URLs does the actor support?
A: The actor supports three types of Facebook URLs:
- Pages:
https://www.facebook.com/usernameorhttps://www.facebook.com/PageName - Groups:
https://www.facebook.com/groups/groupname - Posts:
https://www.facebook.com/username/posts/...or permalink URLs
Q: Can I use just usernames instead of full URLs?
A: Yes! You can input just the username (e.g., NintendoAmerica) and the actor will automatically construct the full Facebook URL.
Q: How does the proxy fallback system work?
A: The actor uses an intelligent proxy fallback system:
- First attempt: No proxy (direct connection)
- If blocked: Automatically switches to datacenter proxy
- If still blocked: Falls back to residential proxy with 3 retry attempts
- Once fallback occurs: Sticks with the working proxy for all remaining requests
Q: What happens if a URL fails to scrape?
A: The actor logs the error and continues processing the remaining URLs. Failed URLs are reported in the logs but don't stop the entire run.
Q: How long does it take to scrape data?
A: Processing time depends on:
- Number of URLs to process
- Facebook's response time
- Whether proxy fallback is needed
- Network conditions
Typically, each URL takes 2-5 seconds to process.
Q: Can I scrape private or restricted content?
A: No. The actor only scrapes publicly available data. It cannot access private profiles, private groups, or password-protected content.
Q: What data is extracted from each URL type?
A:
- Pages: Facebook ID, user profile data, OpenGraph metadata, page ad library info
- Groups: Group ID, name, member count, join state, profile picture, OpenGraph data
- Posts: Post ID, Facebook ID, page association, post content, OpenGraph metadata
Q: Is there a rate limit?
A: The actor includes a 1-second delay between requests to avoid overwhelming Facebook's servers. For large-scale scraping, consider using Apify's built-in rate limiting features.
Q: Can I customize the extraction?
A: The actor extracts all available data from the Facebook page structure. For custom extraction needs, you may need to modify the source code.
Q: What if Facebook changes their page structure?
A: If Facebook updates their HTML structure, the extractor logic may need to be updated. The actor is designed to handle common variations, but major structural changes may require code updates.
Support and Feedback
If you encounter any issues, have questions, or want to provide feedback:
- Check the Logs: Review the detailed logs in the Apify console for error messages and debugging information
- Verify Input Format: Ensure your URLs are correctly formatted and publicly accessible
- Proxy Issues: If you experience persistent blocking, the actor will automatically try different proxy configurations
- Report Bugs: Report any bugs or issues through the Apify platform
Cautions
⚠️ Important Legal and Ethical Considerations:
-
Public Data Only: This actor collects data only from publicly available sources. It does not access private accounts, private groups, or password-protected content.
-
Terms of Service: Ensure your use of this actor complies with Facebook's Terms of Service and applicable laws in your jurisdiction.
-
Rate Limiting: Be respectful of Facebook's servers. The actor includes built-in delays, but excessive use may result in IP blocking.
-
Data Privacy: You are responsible for ensuring compliance with data protection laws (GDPR, CCPA, etc.) when collecting and using scraped data.
-
No Authentication: This actor does not require Facebook login credentials and only accesses publicly visible content.
-
Use Responsibly: Use this actor responsibly and ethically. Do not use scraped data for spam, harassment, or other malicious purposes.
Version: 0.1
Last Updated: 2025
Maintained by: Apify Community