# Facebook GraphQL Scraper

> Python library that collects Facebook profiles, posts, comments, reactions, groups and Marketplace data through Facebook's GraphQL.

Source: https://osinttools.io/tools/facebook-gql-scraper/ (Markdown view of an OSINTtools.io page; append `.md` to any page URL for this format).

- **Inputs:** Username, URL
- **Category:** Social media intelligence
- **Pricing:** Free, open source
- **Footprint:** passive (does not contact the target)
- **Account required:** no
- **API:** no public API
- **Platforms:** Python library
- **Website:** https://github.com/XD-MHLOO/facebook-gql-scraper
- **Docs:** https://XD-MHLOO.github.io/facebook-gql-scraper/
- **GitHub:** XD-MHLOO/facebook-gql-scraper, 97 stars · Python · MIT · last commit 2026-11-23
- **Listed:** Nov 26
- **Last verified by an editor:** Nov 26, 2026

## What it does

facebook-gql-scraper is a Python package that requests data from the GraphQL endpoints Facebook's own web app uses, instead of parsing pages or driving a browser. It covers profiles, posts, comments, reactions, groups, Marketplace and search, and when Facebook rotates its internal query IDs it rediscovers them automatically with a small embedded JavaScript engine.

Investigators use it to collect public Facebook content into structured data for analysis. Anonymous mode needs no account but is rate-limited and may miss data; authenticated mode uses session cookies you export from your own browser and gives broader access.

Footprint is passive: it reads its own index or third-party records and does not contact the target. No account is needed. There is no public API.

## Features

- Profiles, posts and comments
- Reactions and groups
- Marketplace and search
- Automatic query ID rediscovery
- Anonymous or cookie-based mode
- No headless browser

## Pros

- Lightweight compared with browser automation
- Recently and actively updated
- Documentation site with examples
- Free and open source (MIT)

## Cons

- Uses Facebook's internal endpoints, which breaks its terms and can change without notice
- Anonymous mode is heavily rate-limited
- Cookie mode risks the account you use

## When to use it

- Use it when you need posts and comments from public Facebook pages or groups in structured form.
- Use it when you want to collect Marketplace listings for a fraud investigation.

## Quick start

Install from PyPI:

```
pip install facebook-gql-scraper
```

## Alternatives

- [Archivarix Tube Search](https://osinttools.io/tools/archivarix-tube-search/): Search engine for deleted YouTube videos that recovers titles, descriptions, thumbnails and subtitles from web archives. (Freemium · URL, Username · passive)
- [Arctic Shift](https://osinttools.io/tools/arctic-shift/): Free Reddit archive with a web search for posts and comments by subreddit, author, date and text, plus an API and dumps. (Free · Username, URL · passive · 1,933 GitHub stars)
- [Deleted Tweet Finder](https://osinttools.io/tools/deleted-tweet-finder/): Henk van Ess's form that checks a tweet or X profile URL against several web archives and search engine caches in one go. (Free · URL, Username · passive)
- [Junkipedia](https://osinttools.io/tools/junkipedia/): Application-only platform for tracking and analysing public posts across 15 social platforms, built for public-interest researchers. (Freemium · Username, URL · passive)
- [Maltego Telegram](https://osinttools.io/tools/maltego-telegram/): Maltego transforms for Telegram that link channels, users, sticker pack owners, similar channels and deleted posts. (Open source · Username, URL · active · 604 GitHub stars)
- [OSoMeNet](https://osinttools.io/tools/osomenet/): Indiana University tool that maps how posts spread on Bluesky, Mastodon and TikTok as interactive diffusion networks. (Free · Username, URL · passive)

All alternatives to Facebook GraphQL Scraper in one table: https://osinttools.io/tools/facebook-gql-scraper/alternatives/

---

Listings on OSINTtools.io are reviewed by editors and re-verified on a schedule; check pricing and availability on the vendor's site before relying on them, and use OSINT tools only with a lawful basis.
Site index for agents: https://osinttools.io/llms.txt · Full catalog: https://osinttools.io/llms-full.txt · MCP server (Streamable HTTP, no auth): https://osinttools.io/mcp/
