Fetch Instagram user posts on demand for $0.06 per request via pay-per-call social media API.
What it does
This endpoint (`POST /api/instagram/posts`) retrieves posts for a given Instagram user. It is part of StableSocial, a unified pay-per-request social media data API covering TikTok, Instagram, Facebook, and Reddit — 36 endpoints total. Every call costs a flat $0.06 USD, settled via USDC on Base, Solana, or Tempo (MPP/x402). No API keys, no subscriptions; payment itself serves as authentication.
The API uses an async two-step flow. First, you POST to `/api/instagram/posts` with a JSON body containing the Instagram `handle` and optional parameters like `max_posts` (up to 300), `order_by` (date_desc, date_asc, id_desc), `max_page_size`, and a pagination `cursor`. On success, you receive a 202 response with a signed JWT token. Second, you poll `GET /api/jobs?token=...` (free, but requires SIWX wallet auth proving you are the paying wallet) until the job status is "finished" and your data is returned. Jobs typically complete in 5–60 seconds; tokens expire after 30 minutes.
This endpoint depends on the Instagram profile having been collected first — you should call `POST /api/instagram/profile` for the same handle before fetching posts. Pagination is supported: each page requires a new paid POST using the `cursor` from the previous response's `page_info`. If the trigger POST itself fails (e.g., bad parameters), you are not charged. Payment only settles on 2xx responses.
Capabilities
Use cases
- —Collecting an Instagram user's recent posts for competitive analysis or brand monitoring
- —Building social media dashboards that aggregate post data across accounts
- —Feeding Instagram post data into AI agents for sentiment analysis or content research
- —Monitoring influencer posting activity and engagement over time
- —Archiving or indexing Instagram content for compliance or research purposes
Fit
Best for
- —AI agents needing on-demand Instagram post data without managing credentials
- —Developers who want pay-per-call pricing instead of monthly subscriptions
- —Applications requiring cross-platform social data from a single unified API
Not for
- —High-frequency real-time streaming of Instagram content (async polling adds latency)
- —Bulk historical data dumps of millions of posts (pagination at $0.06/page adds up)
- —Use cases requiring official Instagram Graph API features like publishing or insights
Quick start
# Step 1: Trigger post collection (requires payment header)
curl -X POST https://stablesocial.dev/api/instagram/posts \
-H 'Content-Type: application/json' \
-d '{"handle": "natgeo", "max_posts": 10}'
# → 202 {"token": "eyJ..."}
# Step 2: Poll for results (requires SIWX wallet auth)
curl 'https://stablesocial.dev/api/jobs?token=eyJ...' \
-H 'SIGN-IN-WITH-X: <wallet-signature>'
# → 200 {"status": "finished", "data": {...}}Example
Request
{
"handle": "natgeo",
"order_by": "date_desc",
"max_posts": 20,
"max_page_size": 20
}Response
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}Endpoint
Quality
Full OpenAPI schema with clear request parameters, detailed guidance docs embedded in the spec, and consistent pricing. The endpoint returned 405 on HEAD/GET probes, which is expected since it only accepts POST. No response schema is documented (only "Successful response"), and the /docs page 404s, so actual response data shape is unknown.
Warnings
- —Probe returned 405 on HEAD and GET — endpoint only accepts POST, which is expected behavior, not a failure.
- —No response schema documented in OpenAPI spec — the shape of returned post data is unspecified.
- —The /docs page returns 404; detailed documentation beyond the OpenAPI x-guidance is unavailable.
- —This endpoint depends on first calling POST /api/instagram/profile for the same handle.
- —Data is scraped from Instagram on demand — availability may depend on Instagram's own access controls.
Citations
- —Every endpoint costs $0.06 per request, settled via USDC on Base, Solana, or Tempo.https://stablesocial.dev
- —The API uses an async two-step flow: POST to trigger (paid), then poll GET /api/jobs with SIWX wallet auth (free).https://stablesocial.dev
- —Instagram posts endpoint accepts handle, max_posts (up to 300), order_by, max_page_size, and cursor parameters.https://stablesocial.dev/openapi.json
- —Tokens expire after 30 minutes; jobs typically finish in 5–60 seconds.https://stablesocial.dev
- —Payment only settles on 2xx responses; failed triggers are not charged.https://stablesocial.dev
- —StableSocial covers 4 platforms with 36 endpoints total.https://stablesocial.dev