Site scraper

Facebook Scraper: Public Facebook Pages via API

HTTP $0.50JS rendering $2.00 per 1,000 results or your own scraper from $1.95/GB

ProxyField's Web Scraping API fetches the public Facebook pages that logged-out visitors see, such as business Pages, public posts and the Ad Library, for $2.00 per 1,000 successful results with JS rendering, from $1.00 at volume, or $0.50 per 1,000 over plain HTTP where a page needs no browser. There is no separate Facebook API: you send a Facebook URL, get the page back and pay only for successful results; to start, contact sales, or run your own scraper on ProxyField residential proxies with the Easy Trial: 1 GB for $2.95.

Web Scraping API per 1,000 successful results
Web Scraping API prices per 1,000 successful results
FetchEntryVolume, from
HTTP$0.50$0.20
JS rendering$2.00$1.00

Billed on successful results only.

Your own scraper on residential proxies
from $1.95/GB Easy Trial: 1 GB for $2.95
gate.proxyfield.io:7000
QuestionShort answer
Does the Python facebook-scraper library still work?For a small test at best: its last release, 0.2.59, is from August 31, 2022, and some functions need login cookies
What to use in Python insteadMeta's Graph API for Pages you manage; requests for a Page's og: tags; Playwright or the Web Scraping API ($2.00 per 1,000 rendered pages) for posts
A competitor's ads in the Ad LibraryTheir active ads, per country, from the public Ad Library; one rendered page per advertiser and country costs $0.002
Public group posts without logging inSome, not reliably: Facebook says anyone on or off Facebook can see a public group's content, but logged out it often shows a login prompt; private groups never
Data

Public Facebook data you can collect

Facebook shows logged-out visitors less than signed-in users: mostly business Pages, some of their public posts, public events and the public Ad Library, often under a sign-in prompt. Personal profiles, private groups, friends lists, Messenger and most comments need a login and are out of scope.

PageURL patternWhat a logged-out visitor usually sees
Business Pagefacebook.com/<page-name>Name, category, description, follower and like counts, website, address and hours where published, recent public posts
Public postfacebook.com/<page-name>/posts/<id>Text, date, media, reaction, comment and share counts
Public group postfacebook.com/groups/<group>/posts/<id>Some posts and counts, when Facebook does not show the login prompt
Eventfacebook.com/events/<id>Title, date, place, organiser, description, for public events
Ad Libraryfacebook.com/ads/library/Active ads by advertiser and country: creative, text, start date, platforms, Library ID
Link preview tagsAny Page's HTML og: meta tagsTitle, description and image, no browser needed

What Facebook shows logged out changes often and differs by country, so test your page types before you plan a volume. The API returns the page itself as HTML, Markdown or plain text, or a JSON envelope with the status code, the final URL, the headers, the cookies and the content; it has no parsed Facebook fields, so your parser reads them.

Does the Python facebook-scraper library still work?

Not as something to build on. The facebook-scraper package on PyPI has had no release since version 0.2.59 on August 31, 2022; its GitHub repository was last updated in June 2024 and showed 447 open issues and pull requests in October 2026. Its own README warns that "If you scrape too much, Facebook might temporarily ban your IP" and that some functions, such as reactions, need you to be logged in with cookies, which Meta's terms do not allow for automated collection. Use it for a small test of public Pages at most, and expect fields to come back empty.

Python optionLogin neededBreaks when Facebook changesCost
facebook-scraper libraryFor reactions and some other functionsOften; no release since August 2022Your IPs
Meta's Graph API (Pages API)An app, a token and Meta's reviewRarely; versioned by MetaSet by Meta
requests + Beautiful Soup on a Page's og: tagsNoRarely: the tags are for link previews$0.50 per 1,000 via the API, or your proxy traffic
Playwright through a residential proxyNo, for logged-out pagesWhen the page layout changesFrom $1.95/GB of residential traffic
Web Scraping API with JS renderingNoFetching is ours, parsing is yours$2.00 per 1,000 successful rendered pages, from $1.00

For Pages you own or manage, the Graph API is the stable route. For public Pages you do not manage, read the link preview tags with requests (the code below) and render posts with Playwright or the Web Scraping API.

Sources: facebook-scraper on PyPI, its GitHub repository, Meta's Automated Data Collection Terms.

Scrape the Facebook Ad Library for a competitor's ads

The Ad Library shows the active ads an advertiser runs on Meta's products, one country at a time, without a login. Do it by hand first, then automate the same page:

  1. Open facebook.com/ads/library and choose the country where the ads are shown.

  2. Choose "All ads" as the ad category.

  3. Search for the competitor's exact Facebook Page name and pick the advertiser from the suggestions, not the keyword search.

  4. Set "Active status" to "Active ads".

  5. Read each ad's creative, text, start date and platforms, and note its Library ID and ad URL so you can track changes.

  6. Copy the URL of that results page: it carries the country, the active status and the Page ID, so the same URL, fetched with JS rendering, is your automated check.

  7. Repeat for each country the competitor sells in, because ads can be shown in one country only.

Read moreShow less

What the Ad Library does not give you:

  • Past commercial ads. Inactive ads stay in the library only for ads about social issues, elections or politics, kept for 7 years. Save each check if you want a history.
  • Spend, reach and targeting for commercial ads. Meta shows who paid, the spend and reach by demographic for social-issue, election and political ads only.
  • A guaranteed "every ad". Ads differ by country and version, and Meta can remove ads that break its rules, so check each country and record what you found and when.

Meta's Ad Library API is the official route, after identity confirmation, but it covers ads about social issues, elections and politics and ads delivered in the EU, not every commercial ad worldwide. For other ads, the public library page is the source.

Ad Library check (30-day month)Rendered pagesAt $2.00 per 1,000
1 competitor, 1 country, daily30$0.06
50 competitors, 1 country, weeklyabout 215 (50 × 4.3 weeks)about $0.43
50 competitors, 5 countries, daily7,500$15

These counts assume one rendered results page per advertiser and country per check; an advertiser with many ads needs the page scrolled further, which the counts do not include. Billed: a page Facebook answered with a 2xx status. Not billed: blocked requests, timeouts and errors on our side; a blocked request is retried on new IPs, and the retries are not billed. Every response says whether it was billed. A target's 404 or 410, and a sign-in page the site serves with a 200 status, count as billed results.

Public Facebook groups without logging in

Some posts, not reliably. Facebook's help pages say that anyone on or off Facebook can see a public group's content, but logged-out visitors often get a login prompt after a few posts, and comments, media and member lists are limited. A logged-out scraper therefore gets part of a public group, never its complete history; private groups are never visible without membership.

  • What works fetch known public post URLs one by one with JS rendering, at $2.00 per 1,000 successful results, and read the text, date and counts.
  • What to expect comment counts rather than full comment threads, and gaps where Facebook shows the login prompt.
  • What not to do log in, use an account, or get past the login prompt. ProxyField's acceptable use policy forbids accessing data behind logins you are not entitled to.
  • People's data members' posts and names are personal data, so in the EU and UK the GDPR needs a lawful basis and data minimisation, and post content can be protected by copyright. For a full dataset, ask the group's admins for permission.

Source: Facebook Help Center, group privacy settings.

How it works

How the Web Scraping API fetches a Facebook page

Facebook builds its pages in the browser, so send Facebook URLs with JS rendering on; the Web Scraping API returns the rendered page. The API takes a POST to https://api.proxyfield.io/v1/scrape with your API key in an Authorization: Bearer <api_key> header and a JSON body: url, render (false for plain HTTP, true for JS rendering), country and output (html, markdown, text or json); with rendering, wait_for takes a CSS selector to wait for before the page is returned. Parameter reference: API documentation.

Shell
# The request the Web Scraping API takes (access through Contact sales)
curl https://api.proxyfield.io/v1/scrape \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.facebook.com/examplebrand", "render": true, "country": "us", "output": "json"}'

Example response (shortened; content is the rendered page's HTML):

JSON
{
  "metadata": {"id": "req_63f1b8d0e5a29c47", "api": "web_scrape", "status": "success", "billed": true},
  "status_code": 200,
  "final_url": "https://www.facebook.com/examplebrand",
  "content_type": "text/html; charset=utf-8",
  "content": "<!DOCTYPE html><html id=\"facebook\" lang=\"en\">…</html>"
}
ChoicePrice per 1,000 successful resultsUse it for
JS rendering$2.00, from $1.00 at volumePage timelines, posts, public group posts, events and the Ad Library
Plain HTTP$0.50, from $0.20 at volumeA Page's name, description and image from its og: tags
Pricing

Pricing: $2.00 per 1,000 Facebook pages, from $1.00

Facebook pages cost the Web Scraping API's JS rendering price: $2.00 per 1,000 successful results, from $1.00 at volume; pages that need no browser cost $0.50 per 1,000, from $0.20. You pay only for successful results. The volume prices start at 10,000 successful results in one purchase.

Payment and balance: the same crypto balance as proxies, which never expires; there is no subscription or monthly fee. All prices: pricing.

Through the sales team on our 24/7 live chat

Sales contact: the sales team on our 24/7 live chat.

Workload (30-day month)
Workload (30-day month), Results, JS rendering at $2.00, Plain HTTP at $0.50
Workload (30-day month)ResultsJS rendering at $2.00Plain HTTP at $0.50
300 competitor Pages, checked daily9,000$18$4.50
50 advertisers in the Ad Library, weeklyabout 215about $0.43–
20,000 public posts, once20,000$40–
Compare

Meta's official tools or scraping?

Meta offers 3 official routes to public Facebook data, each with its own approval: the Graph API, which gives an app access to Pages it manages and, after Meta's app review, to public Page content; the Ad Library API, for ads about social issues, elections and politics and for ads delivered in the EU; and the Meta Content Library, for approved researchers. Scraping reads what a logged-out visitor sees instead, which is less than these tools give, and Meta's terms require its express written permission for automated collection.

ItemMeta's APIs and Content LibraryWeb Scraping API
Who can use itApproved apps, verified Ad Library users, approved researchersProxyField customers
DataPages you manage, reviewed public content, ads, research datasetsPublic Pages, posts, events and the Ad Library as shown logged out
ApprovalMeta's review per productNone from ProxyField beyond the acceptable use policy; Meta's terms still apply
CostSet by Meta$2.00 per 1,000 successful rendered pages, from $1.00
Use cases

What teams use Facebook data for

  • Competitor monitoring what competitors' Pages post, how often and how it performs.
  • Ad research which creatives and offers competitors run, from the public Ad Library.
  • Local business data category, address, hours and website from business Pages.
  • Event research public events by place and date for travel, venues and ticketing analysis.

Not allowed on ProxyField: spam, fraud including fake accounts or engagement, and accessing data behind logins you are not entitled to. Running your own Facebook ad or business accounts through fixed IPs is a different job: Facebook proxies. Marketplace listings have their own page: Facebook Marketplace scraper.

Do it yourself

Scrape Facebook with Python and ProxyField proxies

The lightest public data on a Facebook Page is in its link preview tags, which Facebook serves in the HTML for other sites to read. Python can read them without a browser; for posts, groups and the Ad Library, use a headless browser such as Playwright through the same proxy. Facebook often answers plain requests with a login page, so the code checks for that.

Python
import requests
from bs4 import BeautifulSoup

proxy = "http://<login>-country-us-city-new_york:<password>@gate.proxyfield.io:7000"
url = "https://www.facebook.com/examplebrand"     # a public business Page
resp = requests.get(url, proxies={"http": proxy, "https": proxy},
                    headers={"User-Agent": "Mozilla/5.0", "Accept-Language": "en-US"},
                    timeout=30)
soup = BeautifulSoup(resp.text, "html.parser")
tags = {m["property"]: m.get("content") for m in soup.select('meta[property^="og:"]')}
if not tags or "login" in resp.url:
    print("No public data or a sign-in page:", resp.status_code, resp.url)
else:
    print(tags.get("og:title"), "|", tags.get("og:description"))

ProxyField residential proxies cost $2.95/GB for 1 GB and from $1.95/GB at volume, with no subscription; the traffic never expires, and all purchases are final. You get 412M+ residential IPs in 195+ countries and 21,000+ cities, a new IP on every request or a sticky session from 30 s to 36 h, over HTTP, HTTPS or SOCKS5. The username format is <login>-country-us-city-new_york.

FAQ

Facebook Scraper FAQ

24/7 support by live chat, including help with setup and integration.

What's a good tool for scraping Facebook?

ProxyField's Web Scraping API fetches the public Facebook pages that logged-out visitors see, such as business Pages, public posts and the Ad Library, for $2.00 per 1,000 successful rendered pages, from $1.00 at volume. For data behind a login or at research scale, Meta's own APIs and Content Library are the tools; compare scrapers by what they reach logged out and what counts as a billable result.

Does the Python facebook-scraper library still work, or what should I use to scrape Facebook pages with Python?

Only for small tests: facebook-scraper has had no release since 0.2.59 on August 31, 2022, its README warns that Facebook may ban your IP, and some functions need login cookies. Use Meta's Graph API for Pages you manage, requests and Beautiful Soup for a public Page's og: tags, and Playwright or ProxyField's Web Scraping API, at $2.00 per 1,000 rendered pages, for public posts.

How do I scrape the Facebook Ad Library to see every ad a competitor is running?

Open facebook.com/ads/library, choose a country and "All ads", pick the competitor's exact Page from the suggestions and set "Active status" to "Active ads"; that results page lists their active ads with creative, text, start date and Library ID. Fetch the same URL with JS rendering on a schedule, at $2.00 per 1,000 rendered pages, once per country, because ads can run in one country only. Past commercial ads, spend and targeting are not shown; those are kept only for social-issue, election and political ads.

Can I scrape posts and comments from a public Facebook group without logging in to an account?

Partly. Facebook says anyone on or off Facebook can see a public group's content, but logged out it often shows a login prompt and limits posts and comments, so you get some posts and comment counts, not the complete history; private groups are never visible. Fetch known public post URLs with JS rendering at $2.00 per 1,000 successful results, never log in to get past the prompt, and treat members' posts as personal data.

What is a Facebook scraper?

A tool or script that collects public data from Facebook pages automatically, such as Page details, post counts or ads. It can be your own headless browser on proxies or a scraping API that fetches the pages for you.

How do I scrape Facebook?

List the public Page, post, event or Ad Library URLs you need, fetch them logged out with a headless browser or a scraping API with JS rendering, and read the fields from the rendered page. Keep the rate low and stop at the sign-in prompt rather than logging in.

What Facebook data can you scrape?

From logged-out pages: a business Page's name, category, description, follower count, website, address and hours, its public posts with reaction and share counts, public events and the active ads in the Ad Library. Personal profiles, private groups, friends lists and most comments need a login and are out of scope.

What do people use Facebook data for?

Mostly competitor monitoring of brand Pages, ad research in the Ad Library, local business data such as categories and hours, and event research. Researchers use Meta's Content Library for larger studies.

Does Facebook have an API for scraping data?

Meta's Graph API gives an app access to Pages it manages and, after Meta's app review, to public Page content; the Ad Library API covers social-issue, election and political ads and ads delivered in the EU. Each needs Meta's approval, and none returns personal profiles or private groups for business use.

Can I see a competitor's past Facebook ads?

Only their active ads, unless the ads are about social issues, elections or politics, which the Ad Library keeps for 7 years. To build a history of commercial ads, save each Ad Library check with its date and Library IDs.

Show 9 more questionsShow fewer questions

How do I scrape Facebook posts?

Open the public Page in a headless browser, let the timeline load and read each post's text, date and counts, or fetch known post URLs one by one. Logged out, Facebook shows only some recent posts, so plan on fewer than a signed-in user sees.

How do I scrape Facebook comments?

Facebook shows logged-out visitors few comments, mostly only the count on each post. Comments in full are behind the login, and commenters' names and texts are personal data, so a logged-out scraper should collect counts rather than comments.

Can I scrape Facebook profiles?

Personal profiles show logged-out visitors little beyond a name and a photo, and they are personal data, so collecting them needs a lawful basis that most business uses lack. Business Pages are the public part of Facebook that a scraper can use.

How many Facebook pages can I scrape per day without getting flagged?

Facebook publishes no limit; it shows the sign-in prompt sooner and blocks IPs that send fast, repetitive requests. Keep a few hundred Pages a day at a slow, steady rate with pauses between requests, and slow down as soon as sign-in prompts rise.

Is Facebook scraping detectable?

Yes: Facebook watches request rates, IP types and browser behaviour, and answers automated traffic with the sign-in prompt or a block. Collect only public pages, keep the rate low and stop at the sign-in prompt rather than logging in.

Can I scrape Facebook events?

Public events show their title, date, place, organiser and description to logged-out visitors, so their pages can be fetched with JS rendering at $2.00 per 1,000 successful results. Lists of who is going are behind the login.

What's the safest way to scrape Facebook for academic research?

Apply for Meta's Content Library, which gives approved researchers public Facebook and Instagram content within Meta's rules. Scraping is the fallback for public Pages only, with an ethics review and data minimisation.

Do browser extension scrapers work for Facebook?

They read what your own browser shows, so they work for a few pages, but if you are signed in they collect logged-in data, which breaches Meta's terms. They also do not scale or run on a schedule.

Collect Facebook pages with the Web Scraping API

Billed on successful results only. Contact sales for the Web Scraping API and the volume you need, or run your own scraper on residential proxies. 24/7 live chat helps with setup and integration.