A scraping package such as facebook-scraper runs from your own IP and needs fixing when Facebook changes its pages. From Python you can instead POST social.posts with platform facebook and the page URL to the RouterGrowth API and read the posts from the JSON: text, date, likes, comments, shares and views.
Ask your agent
Write a Python script that reads the last ten posts of five brand pages on Facebook each Monday and saves them to a CSV.
Connect RouterGrowth once, then ask in plain words. New workspaces start with $1 of credit. Get a key or read the setup guide.
A real run
One call to social.posts (social posts & content), run through RouterGrowth on October 19, 2026. These are the first rows it returned; fields that name a person are masked.
| text | created_at | likes | replies | reposts | views |
|---|---|---|---|---|---|
| It's not pink, it's shrimp. Exceptional gear for uncommon pursuits since 1973. https://pat.ag/F/F26/InnovationUnusual | 2026-10-14 | 262 | 1 | 1 | 17772 |
| Bears Ears National Monument in Utah was the first national monument in the United States created at the urging of Tribal Nations, and the… | 2026-10-12 | 1509 | 24 | 171 |
Five recent posts from Patagonia's Facebook page; the reels carry view counts and the photo posts do not.
Step by step
Export ROUTERGROWTH_API_KEY and send it as a Bearer token from requests or httpx.
Send capability social.posts and input platform facebook, the page URL as handle and a limit to /v1/run.
Each post is a dict with url, text, created_at, is_video and an engagement dict.
Write the rows with csv or pandas, keyed on the post id so repeat runs do not duplicate.
Price
List prices on Facebook, read from the catalog when this page was built. The exact figure is quoted before every run, and a monthly plan lowers it.
In practice
You describe the job; the agent picks the calls, shows the price and runs them.
Write a Python script that reads the last ten posts of five brand pages on Facebook each Monday and saves them to a CSV.
From Python, pull Patagonia's recent Facebook posts and flag the ones with more than 1,000 likes.
Search Facebook for 'repair program' and then read the pages that posted, in one script.
Connect
One MCP server for Claude, ChatGPT, Claude Code, Codex and Cursor, or the same call over the CLI and REST with the input above.
claude mcp add --transport http routergrowth https://api.routergrowth.com/mcp
npm install -g routergrowth && routergrowth setup
routergrowth run -c social.posts -i '{"platform": "facebook", "handle": "https://www.facebook.com/patagonia", "limit": 5}'curl -X POST https://api.routergrowth.com/v1/run \
-H "Authorization: Bearer $ROUTERGROWTH_API_KEY" \
-d '{"capability": "social.posts", "input": {"platform": "facebook", "handle": "https://www.facebook.com/patagonia", "limit": 5}}'Worth knowing
The script holds no scraping logic, so a Facebook layout change does not break it.
Requests to Facebook come from RouterGrowth's providers, not from the machine running the script.
Reels and videos return a view count; photo and text posts leave it empty.
FAQ
The package scrapes from your machine. Here your script makes one HTTP call and the scraping runs on RouterGrowth's providers.
Only an HTTP client such as requests or httpx, plus csv or pandas if you save files.
No. Public pages are read without a Facebook login.
id, url, text, created_at, author, is_video and engagement with likes, comments, shares and views.
More on Facebook
Reading this as an agent? This page as markdown: /tools/facebook/scraper-python.md
Connect your agent once. The first calls run on the $1 that comes with signup.