Your detailed step-by-step guide to scraping Facebook Pages without using the official Facebook API. You’ll be able to scrape any publicly available information about any page, without running up against Facebook’s limits.
To scrape a website with a structure as convoluted as Facebook's, you’ll need a tool that strikes a balance between simplicity and complexity. Our unofficial Facebook API solution is a scraper dedicated to extracting basic data from Facebook Pages. It can deliver page name, URLs, category, likes, and check-ins from public sources within a few minutes (sometimes even under 1 minute!)
Once you’ve extracted this data, you can easily incorporate it into your own projects, workflows, spreadsheets, and applications.
You’ll find yourself in Apify Store. It’s full of useful tools, but we’re only interested in the ones for scraping Facebook right now, so let's find the Facebook Pages Scraper 🔗 page. Now click the Try for free button and it will automatically redirect you to Apify Console.
If you don’t have an Apify account yet, you can sign up using your email, Gmail, or GitHub account. You'll have a free trial to experiment with any of the web automation or web scraping tools.
Step 2. Choose Facebook Pages to scrape
Now you can start specifying how you want to scrape data from Facebook. Head over to facebook.com and copy-paste the URL of the page that interests you — in our case, Humans of New York.
You can add as many pages as you wish, so let’s add Humans of Amsterdam, Humans of Ha Noi, and Humans of Prague to that mix.
Step 3. Click Start ▶️
Your input will turn into a table that will soon fill with results. The status of the scraper will change to Running 🏃🏻♀️ so just wait a minute for the scraper's run to finish. You can view your Facebook data once the status switches to Succeeded 🏁
Step 4. Export the data you’ve collected
Now click on Exportresults button to view or download the scraped data. As you can see, we now have basic info about each Facebook Page.
In general, you can always find your data in the Storage tab. You can open it by clicking on View in another tab or Download. Before downloading, you can preview the data using the Preview👁 button, and also choose a data format that suits your needs: CSV, Excel, XML, HTML table, JSONL, or JSON.
So now you know how to scrape data from Facebook. It’s as easy as that! Now you can have your own directory of Facebook pages that are important for your project. Have fun 🥳
💻 I don’t need Facebook Page info. Where can I scrape posts from a Facebook Page?
In Apify Store, you can find a scraper that will extract data specifically from each post on a page. Just pick Facebook Posts Scraper 🔗 and learn how to get each post text, post URL number of likes, shares, and comments, etc.
🌈 Need more Facebook scraping tools?
Check out these scrapers below, made for group, reviews, comments, and image scraping. Each one's made for a specific task, so see if you find the use case you're looking for.
In principle, yes, scraping is legal. To keep it that way, legal rules must be followed, such as GDPR and CCPA regulations. Basically, you should make sure only to scrape publicly available content on the website and not scrape copyrighted content or accumulate personal data without having a legal basis for doing so. You can read up on the legality of web scraping in our blog post on the subject.
💡 What about getting data with the Facebook API?
Scraping some of the Facebook data is available through their official API, but Facebook’s rules and rate limits are strictly enforced. You won’t be able to extract a lot of information in a short period of time and you can easily get your API key blocked. These restrictions have given rise to a lot of Facebook API alternatives, including our Facebook scrapers.
🤖 Can I use AI to scrape Facebook?
AI is currently unable to scrape websites directly, but it can help generate code for scraping Facebook if you prompt it with the target elements you want to scrape. Note that the code may not be functional, and website structure and design changes may impact the targeted elements and attributes.
👷 Can I build a Facebook scraper of my own?
Yes, you can and we can host it in the cloud for you. You can create your own Facebook crawler directly on the platform and keep production there or develop it locally on your computer and only push it to the Apify cloud during deployment.
🌟 Can you scrape Facebook Page Reviews?
Yes, you can. Check out Facebook Reviews Scraper 🔗 It's specifically designed to extract Facebook reviews data from pages, including reviews text, timestamp, and basic reviewer info.
🛡 Do you need proxies to scrape Facebook pages?
These days, absolutely. Facebook pages are usually public and don’t require a login to allow you to fetch information. You will usually need some sort of proxy to be able to scrape Facebook successfully. Although you can still get some results (such as reviews, about, and some other content) with just datacenter proxies, our best bet is on residential proxies for all Facebook scraping. Luckily, our free plan includes a free trial of residential proxies so you can fully test the scraper.
🙋♂️ What’s a Facebook page and a Facebook profile?
Facebook Pages are used by brands, companies, and organizations to provide information about their product or service. They're all about posting public content and usually are associated with a particular category (Politics, Music, Non-profit, etc.). Of course, the easiest way to distinguish between pages and profiles is a blue checkmark. This scraper tool is not intended to extract info from Facebook profiles.
🍪 Can I use cookies to scrape Facebook data behind login?
In general, you can use cookies to scrape Facebook, but not with our Facebook scrapers. We don’t provide the option to scrape Facebook pages that are visible only after login.
Apifier since 2016 so learned about web scraping and automation from the experts. MSc in Computer Science from TCD. Former game designer and newspaper production manager. Now Head of Content at Apify.