How to fetch recent photos from a public Facebook page
Fetch recent photos, captions, image URLs, and dimensions from a public Facebook page or profile as normalized JSON
On this page
You have 12 public Facebook pages and need to pull recent photos from each one for a visual audit, with captions, image URLs, thumbnails and dimensions in a single table. The deliverable is a normalized table that lets you compare which pages have the most detailed and consistent visual assets
The worksheet below is the design: one row per photo, with the page URL kept as a column so rows from different pages stay together. No run has been executed for this guide, so the values are placeholders
| photoId | caption | url | thumbnail | imageUrl | imageWidth | imageHeight | Page URL |
|---|---|---|---|---|---|---|---|
| photoId_001 | caption text or empty | photo URL | thumbnail URL | image URL | 1200 | 800 | https://www.facebook.com/acme-plumbing.example |
Values here are placeholders showing the shape. The page URL is an invented example and must be replaced with a real public page or profile URL before running
Input fields and the public page limit
anyapi.facebook.photos takes url as a required string: the public Facebook page or profile URL to fetch photos from. cursor is optional and comes from a previous response's nextCursor. requireFields is optional and names output fields such as imageWidth when a source must return the named field
Only public Facebook pages or profiles can be queried, so a private profile or a page that is not public is outside this step. Check the URL before spending a call. Naming imageWidth in requireFields can raise the price, because when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a photo that genuinely lacks it, and a combination that no single source returns together is refused as invalid input with no charge
Reading the output fields
The response has found, data and, when found is false, reason. A found: false answer with reason: not_found is a successful call, not an error. When found is true, data.photos is the array you turn into rows. Each photo carries photoId, caption, url, thumbnail, imageUrl, imageWidth and imageHeight; id is also in the contract's photo object
Use the width and height to judge the visual assets. The contract says imageWidth and imageHeight are null when the serving source does not report them, so treat a null as missing data from that source. For the audit, compare rows with populated captions and thumbnails against rows where those fields are empty, and keep the page URL column so page totals stay grouped. For pagination, data.nextCursor is the opaque cursor to pass back as cursor. data.nextPageId is Facebook's own id for the next page and is null when the serving source does not report it; pass nextCursor back either way
The agent prompt
Use this prompt for the 12-page audit. Replace the invented page URLs with real public page or profile URLs
Set up https://purrkey.app/SKILL.md, then use Purrkey to fetch recent photos from 12 public Facebook pages for a visual audit. Check the current inputs and price of anyapi.facebook.photos before running anything. Call anyapi.facebook.photos once per page for the first photo page. If I ask for more pages, pass data.nextCursor back as cursor. Return a table with photoId, caption, url, thumbnail, imageUrl, imageWidth, imageHeight and Page URL, plus nextCursor and nextPageId when present. Do not query private profiles. Do not invent fields or URLs.
https://www.facebook.com/acme-plumbing.example
https://www.facebook.com/acme-dental.example
https://www.facebook.com/acme-bakery.example
https://www.facebook.com/acme-gym.example
https://www.facebook.com/acme-law.example
https://www.facebook.com/acme-hotel.example
https://www.facebook.com/acme-florist.example
https://www.facebook.com/acme-auto.example
https://www.facebook.com/acme-cafe.example
https://www.facebook.com/acme-clinic.example
https://www.facebook.com/acme-studio.example
https://www.facebook.com/acme-market.exampleReplace them before running
Estimated tool cost
Prices from the Purrkey catalog, read November 13, 2026. The tool is anyapi.facebook.photos called through POST /v1/runs with toolId anyapi.facebook.photos. The unit is max_call: "Maximum per call. Successful runs settle at the actual AnyAPI charge." The totals below are ceilings, not settled charges
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| Single page, first photo page | calls x max price | $0.0036 per call | 1 | $0.0036 |
| Twelve pages, one photo page each | calls x max price | $0.0036 per call | 12 | $0.0432 |
A second photo page is a second call, so add calls for pagination. Model fees for the agent are not counted. Naming fields in requireFields can move the price above the base ceiling when a dearer source serves
Next action
Open the tool page to check the current price and run the first page: Facebook photos
Get started by giving this to your agent
- Claude Code
- Codex
- Gemini CLI
- Cursor
- GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with Facebook.FAQ
How do I fetch recent photos from a public Facebook page?
Call anyapi.facebook.photos with the public page or profile URL in the url field. The response gives a photos array with photo IDs, captions, URLs, thumbnails and dimensions in normalized JSON.
What inputs does anyapi.facebook.photos take?
The contract lists url as required, cursor as optional from a previous response's nextCursor, and requireFields as an optional array of output field names such as imageWidth.
What does the output include?
The response includes found, data and, when found is false, reason. When found is true, data.photos holds the photo rows and data.nextCursor supports pagination.
How do I get the next page of photos?
Pass data.nextCursor back as cursor. data.nextPageId is Facebook's own id for the next page and is null when the serving source does not report it.
What happens when a page is not found?
The response has found: false with reason: not_found. The contract says this is a successful call, not an error.
How much does it cost to fetch photos from 12 pages?
Twelve first-page calls at up to $0.0036 per call total at most $0.0432.
Can I query a private Facebook profile?
No. Only public Facebook pages or profiles can be queried with anyapi.facebook.photos.
Next step
Try this with Facebook
The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.