Search Facebook posts by keyword — $0.06 per request, pay with USDC via MPP/x402
What it does
This endpoint searches Facebook posts by keyword through StableSocial's unified social media data API. It is one of 36 endpoints covering TikTok, Instagram, Facebook, and Reddit. You POST a JSON body with your search keywords and optional pagination/limit parameters, pay $0.06 per request in USDC (settled on Base, Solana, or Tempo), and receive a 202 response containing a JWT token. You then poll a separate free endpoint (GET /api/jobs?token=...) with SIWX wallet authentication to retrieve results once the async job completes (typically 5–60 seconds).
The API uses an async two-step flow: Step 1 is a paid POST that triggers data collection and returns a job token; Step 2 is free polling with wallet auth until the job finishes. Tokens expire after 30 minutes. If the trigger itself fails (bad params, entity not found), you are not charged — payment only settles on 2xx responses. Pagination is supported via a cursor field in the response's page_info object; each subsequent page requires a new paid POST.
No API keys or signup required — payment via the MPP or x402 protocol header serves as authentication. The endpoint accepts parameters including `keywords` (required), `max_posts` (default 50), `max_page_size` (default 50), and `cursor` for pagination. The MPP method is "tempo" with intent "charge", settling in pathUSD on Tempo L2.
Capabilities
Use cases
- —Searching Facebook posts by keyword for brand monitoring or sentiment analysis
- —Collecting Facebook post data for market research or competitive intelligence
- —Building social listening dashboards that aggregate Facebook content
- —Automated agents performing social media research across platforms
- —Gathering Facebook posts about specific topics for content curation
Fit
Best for
- —AI agents needing on-demand Facebook post search without API key management
- —Pay-per-use social media data collection without monthly subscriptions
- —Developers who want a unified API across TikTok, Instagram, Facebook, and Reddit
Not for
- —High-volume bulk scraping where per-request pricing becomes expensive
- —Real-time streaming of Facebook content (this is async polling-based)
- —Accessing private or non-public Facebook data
Quick start
# Step 1: Trigger search (requires MPP/x402 payment header)
curl -X POST https://stablesocial.dev/api/facebook/search \
-H 'Content-Type: application/json' \
-d '{"keywords": "artificial intelligence", "max_posts": 10}'
# → 202 {"token": "eyJ..."}
# Step 2: Poll for results (free, requires SIWX wallet auth)
curl https://stablesocial.dev/api/jobs?token=eyJ...Example
Request
{
"keywords": "artificial intelligence",
"max_posts": 10,
"max_page_size": 10
}Response
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}Endpoint
Quality
Full OpenAPI schema with clear request parameters, pricing, and protocol details. The 402 challenge was not captured directly (endpoint requires POST, probe tried HEAD/GET which returned 405), but the OpenAPI spec confirms the endpoint is live and documents the MPP payment flow. No response schema or example response data is available for the actual search results.
Warnings
- —Probe returned 405 on HEAD/GET because this endpoint only accepts POST — this is expected, not an error
- —No response schema defined for successful (200) responses — actual data structure of search results is undocumented in the OpenAPI spec
- —The /docs page returns 404 — documentation is only available via the OpenAPI spec and the landing page
- —Async two-step flow requires SIWX wallet authentication for polling, which adds integration complexity
Citations
- —Each endpoint costs $0.06 per request in USDC on Base, Solana, or Tempohttps://stablesocial.dev
- —The API uses an async two-step flow: paid POST trigger returns a JWT token, then free GET polling with SIWX wallet authhttps://stablesocial.dev
- —Tokens expire after 30 minutes; jobs typically finish in 5–60 secondshttps://stablesocial.dev
- —Payment only settles on 2xx responses; failed triggers are not chargedhttps://stablesocial.dev
- —facebook_search endpoint accepts keywords (required), max_posts, max_page_size, and cursor parametershttps://stablesocial.dev/openapi.json
- —36 endpoints across TikTok, Instagram, Facebook, and Reddithttps://stablesocial.dev