SocialAPIs Facebook Posts API
Facebook posts and videos: details, attachments, comments and replies.
Facebook posts and videos: details, attachments, comments and replies.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/socialapis:socialapis-facebook-posts-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: SocialAPIs Facebook Posts API
version: 1.0.0
summary: REST API for public Facebook and Instagram data.
description: 'Public Facebook and Instagram data over one REST API: pages, posts, comments, groups, the Meta Ads Library, Marketplace, Instagram profiles, posts, reels and locations. Authenticate with your API key in the `x-api-token` header. Most calls cost 1 credit; each operation states its price. The free plan includes 200 credits a month. Also available as an MCP server at https://mcp.socialapis.io/mcp.'
termsOfService: https://socialapis.io/terms
contact:
name: SocialAPIs support
url: https://socialapis.io/contact-us
email: support@socialapis.io
servers:
- url: https://api.socialapis.io
security:
- ApiKey: []
tags:
- name: Facebook Posts
description: 'Facebook posts and videos: details, attachments, comments and replies.'
paths:
/facebook/posts/id:
get:
operationId: facebook_get_post_id
summary: Extract the Facebook post ID from a given post link
description: 'Extract the numeric post ID from a Facebook post URL. Use it to get the post_id that facebook_get_post_attachments needs. Pricing: 1 credit per call.'
tags:
- Facebook Posts
parameters:
- name: link
in: query
required: true
description: Facebook post URL
schema:
type: string
responses:
'200':
description: The requested data. Most responses include a `meta` block with `creditsCharged` and `creditsRemaining`.
headers:
X-SocialAPIs-Credits-Deducted:
$ref: '#/components/headers/CreditsDeducted'
X-SocialAPIs-Credits-Remaining:
$ref: '#/components/headers/CreditsRemaining'
content:
application/json:
schema:
type: object
additionalProperties: true
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimited'
'502':
$ref: '#/components/responses/UpstreamError'
'504':
$ref: '#/components/responses/UpstreamTimeout'
/facebook/posts/details:
get:
operationId: facebook_get_post_details
summary: Get detailed data about a Facebook post including reactions, media, and user…
description: 'Get a Facebook post''s text, author, timestamp, media, and reaction, comment and share counts. Start here for any post. If you need view counts, video download URLs or audio metadata (common for reels and videos), use facebook_get_post_details_extended instead. Pricing: 1 credit per call.'
tags:
- Facebook Posts
parameters:
- name: link
in: query
required: true
description: Facebook post URL
schema:
type: string
responses:
'200':
description: The requested data. Most responses include a `meta` block with `creditsCharged` and `creditsRemaining`.
headers:
X-SocialAPIs-Credits-Deducted:
$ref: '#/components/headers/CreditsDeducted'
X-SocialAPIs-Credits-Remaining:
$ref: '#/components/headers/CreditsRemaining'
content:
application/json:
schema:
type: object
additionalProperties: true
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimited'
'502':
$ref: '#/components/responses/UpstreamError'
'504':
$ref: '#/components/responses/UpstreamTimeout'
/facebook/posts/details/extended:
get:
operationId: facebook_get_post_details_extended
summary: Get extended details about a Facebook post including views, video URLs, music…
description: 'Get everything facebook_get_post_details returns plus view counts, HD/SD video URLs, music/audio metadata and author verification status. Use it for reels and video posts, or when the standard details lack view_count, video_hd_src or attached_track. Pricing: 1 credit per call.'
tags:
- Facebook Posts
parameters:
- name: link
in: query
required: true
description: Facebook post URL (works for reels, video posts, and regular posts)
schema:
type: string
responses:
'200':
description: The requested data. Most responses include a `meta` block with `creditsCharged` and `creditsRemaining`.
headers:
X-SocialAPIs-Credits-Deducted:
$ref: '#/components/headers/CreditsDeducted'
X-SocialAPIs-Credits-Remaining:
$ref: '#/components/headers/CreditsRemaining'
content:
application/json:
schema:
type: object
additionalProperties: true
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimited'
'502':
$ref: '#/components/responses/UpstreamError'
'504':
$ref: '#/components/responses/UpstreamTimeout'
/facebook/posts/attachments:
get:
operationId: facebook_get_post_attachments
summary: Get details of all media attachments for a given Facebook post
description: 'List every media attachment (images and videos, with URLs and dimensions) on a Facebook post, including all items in multi-photo posts. Needs the numeric post_id from facebook_get_post_id. For the post''s text and engagement, use facebook_get_post_details. Pricing: 5 credits per call (deeper scrape than standard post details).'
tags:
- Facebook Posts
parameters:
- name: post_id
in: query
required: true
description: Numeric Facebook post ID, from facebook_get_post_id
schema:
type: string
responses:
'200':
description: The requested data. Most responses include a `meta` block with `creditsCharged` and `creditsRemaining`.
headers:
X-SocialAPIs-Credits-Deducted:
$ref: '#/components/headers/CreditsDeducted'
X-SocialAPIs-Credits-Remaining:
$ref: '#/components/headers/CreditsRemaining'
content:
application/json:
schema:
type: object
additionalProperties: true
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimited'
'502':
$ref: '#/components/responses/UpstreamError'
'504':
$ref: '#/components/responses/UpstreamTimeout'
/facebook/posts/video:
get:
operationId: facebook_get_video_details
summary: Retrieve video metadata, feedback stats, and post context for a Facebook video…
description: 'Get a Facebook video post''s metadata: title, message text and hashtags, owner, reactions and view count. Needs the numeric video_id (the number in a facebook.com/.../videos/ URL, or from facebook_get_page_videos). Pricing: 1 credit per call.'
tags:
- Facebook Posts
parameters:
- name: video_id
in: query
required: true
description: Numeric Facebook video ID, e.g. the number in a facebook.com/.../videos/<id> URL
schema:
type: string
responses:
'200':
description: The requested data. Most responses include a `meta` block with `creditsCharged` and `creditsRemaining`.
headers:
X-SocialAPIs-Credits-Deducted:
$ref: '#/components/headers/CreditsDeducted'
X-SocialAPIs-Credits-Remaining:
$ref: '#/components/headers/CreditsRemaining'
content:
application/json:
schema:
type: object
additionalProperties: true
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimited'
'502':
$ref: '#/components/responses/UpstreamError'
'504':
$ref: '#/components/responses/UpstreamTimeout'
/facebook/posts/comments:
get:
operationId: facebook_get_post_comments
summary: Retrieve top-level comments from a Facebook post or reel
description: 'List top-level comments on a Facebook post or reel, with author, text, timestamp and reaction count. Returns up to 30 per call plus an end_cursor for the next page. Set include_reply_info=true to get the comment_feedback_id and expansion_token that facebook_get_comment_replies needs. Pricing: 1 credit per call.'
tags:
- Facebook Posts
parameters:
- name: link
in: query
required: true
description: Facebook post or reel URL
schema:
type: string
- name: end_cursor
in: query
required: false
description: Pagination cursor for next page of comments
schema:
type: string
- name: include_reply_info
in: query
required: false
description: When "true", includes comment_feedback_id and expansion_token for fetching replies
schema:
type: boolean
responses:
'200':
description: The requested data. Most responses include a `meta` block with `creditsCharged` and `creditsRemaining`.
headers:
X-SocialAPIs-Credits-Deducted:
$ref: '#/components/headers/CreditsDeducted'
X-SocialAPIs-Credits-Remaining:
$ref: '#/components/headers/CreditsRemaining'
content:
application/json:
schema:
type: object
additionalProperties: true
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimited'
'502':
$ref: '#/components/responses/UpstreamError'
'504':
$ref: '#/components/responses/UpstreamTimeout'
/facebook/posts/comments/replies:
get:
operationId: facebook_get_comment_replies
summary: Fetch replies to a specific comment on a Facebook post
description: 'List replies to one Facebook comment. Needs comment_feedback_id and expansion_token, which facebook_get_post_comments returns when called with include_reply_info=true. Pricing: 1 credit per call.'
tags:
- Facebook Posts
parameters:
- name: comment_feedback_id
in: query
required: true
description: Feedback ID from the comments endpoint with include_reply_info=true
schema:
type: string
- name: expansion_token
in: query
required: true
description: Expansion token from the comments endpoint with include_reply_info=true
schema:
type: string
responses:
'200':
description: The requested data. Most responses include a `meta` block with `creditsCharged` and `creditsRemaining`.
headers:
X-SocialAPIs-Credits-Deducted:
$ref: '#/components/headers/CreditsDeducted'
X-SocialAPIs-Credits-Remaining:
$ref: '#/components/headers/CreditsRemaining'
content:
application/json:
schema:
type: object
additionalProperties: true
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimited'
'502':
$ref: '#/components/responses/UpstreamError'
'504':
$ref: '#/components/responses/UpstreamTimeout'
components:
responses:
RateLimited:
description: Rate limit exceeded for your plan. Retry after the limit resets.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
UpstreamTimeout:
description: The data source took too long to respond. No credits are charged.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unauthorized:
description: Missing or invalid API key.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Forbidden:
description: Insufficient credits, expired subscription or paused account.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
UpstreamError:
description: The data source returned an error. No credits are charged.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
BadRequest:
description: A required parameter is missing or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
headers:
CreditsRemaining:
description: Credits left on your account after this call.
schema:
type: integer
CreditsDeducted:
description: Credits charged for this call.
schema:
type: integer
schemas:
Error:
type: object
properties:
success:
type: boolean
error:
type: string
message:
type: string
code:
type: string
additionalProperties: true
securitySchemes:
ApiKey:
type: apiKey
in: header
name: x-api-token
description: Your API key from https://socialapis.io/dashboard
externalDocs:
description: Documentation
url: https://docs.socialapis.io