# Facebook Posts Scraper

> Facebook Posts Scraper is a paid API for AI agents from api.scrapeforagents.tech, paid per call via x402, $0.025/call, status unknown (last checked 2026-10-02).

Scrapes public Facebook page posts and direct post URLs, returning structured post data with optional date filtering and result limits.

## Facts

- Endpoint: POST https://api.scrapeforagents.tech/v1/facebook-posts?utm_source=zero.xyz
- Price: $0.025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/facebook-posts-scraper-ebecefa1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XHagihayTJZX6wsRkh7Bu

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability facebook-posts-scraper-ebecefa1 -d '<json body>'
```

Example prompt: Can you scrape the last 50 posts from the NASA Facebook page (facebook.com/NASA) posted in the past 30 days and give me the structured data including post IDs, times, and URLs?

## When to prefer this

Choose this endpoint when you need structured, paginated post data from public Facebook pages or direct post URLs, especially when date-range filtering is important. It is pay-per-call with no charge for failed/empty runs, making it low-risk for exploratory scraping. Prefer this over general-purpose web scrapers when you specifically need Facebook post metadata in a clean, normalized JSON format.

## Known failure modes

- Private or restricted Facebook page returns empty results
- Invalid or malformed Facebook URL causes failed run
- Rate limiting or Facebook anti-scraping measures result in empty response
- Date filter excludes all available posts, returning zero items
- Page has fewer posts than the requested limit, returning partial results

## How this service works

Pay-per-call structured web data. Failed or empty runs are not charged.

## Output

Returns a JSON object with a count of retrieved items and an array of post objects, each containing the post URL, timestamp, post ID, input URL, page name, Facebook ID, Facebook URL, and top-level URL. Failed or empty runs are not billed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "maxItems": {
   "type": "integer",
   "default": 0,
   "minimum": 0,
   "description": "Stop after this many posts across all URLs. Zero means no total cap."
  },
  "startUrls": {
   "type": "array",
   "description": "Public Facebook page URLs or direct public post URLs."
  },
  "resultsLimit": {
   "type": "integer",
   "default": 20,
   "minimum": 1,
   "description": "Maximum posts to retrieve per page. The run stops after 30 feed batches per page, and some pages expose fewer posts. A direct post URL yields one post."
  },
  "onlyPostsNewerThan": {
   "type": "string",
   "description": "Optional lower date bound in YYYY-MM-DD or relative form such as 7 days. Dates use UTC."
  },
  "onlyPostsOlderThan": {
   "type": "string",
   "description": "Optional upper date bound in YYYY-MM-DD or relative form such as 1 month. Dates use UTC."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 1,
  "items": [
   {
    "url": null,
    "time": null,
    "postId": null,
    "inputUrl": null,
    "pageName": null,
    "facebookId": null,
    "facebookUrl": null,
    "topLevelUrl": null
   }
  ],
  "product": "facebook-posts"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/facebook-posts-scraper-ebecefa1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.scrapeforagents.tech](https://www.zero.xyz/host/api.scrapeforagents.tech/llms.txt)
