Sources › Social media › Facebook › Post Comments

Facebook Post Comments API

First page of comments (~10-50) of a public Facebook post/reel/video by URL, with real total comment count.

FacebookGET /commentsAll plans2 Zap

Request

GET
https://api.zapi.ink/v1/social-media:facebook-scraper/comments

Send your key in the x-api-key header. The response is JSON in the { project, data, timestamp } envelope, and an identical request is served from cache for 5 minutes.

Parameters

NameTypeInRequiredDescription
urlstringqueryYesURL post/reel/video/foto Facebook publik. Example: https://www.facebook.com/KOMPAScom/posts/pfbid0E8hZTGFLNC2piAGGWkM8GL2KK3ofVWfMVcy1d21hCevwzTbQPRzrgAVt5BmMufyvl
limitnumberqueryNoMaks komentar (permalink memuat ±10–50). Example: 20

Code examples

cURL
curl -X GET "https://api.zapi.ink/v1/social-media:facebook-scraper/comments?url=https%3A%2F%2Fwww.facebook.com%2FKOMPAScom%2Fposts%2Fpfbid0E8hZTGFLNC2piAGGWkM8GL2KK3ofVWfMVcy1d21hCevwzTbQPRzrgAVt5BmMufyvl&limit=20" \
  -H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
JavaScript
const res = await fetch("https://api.zapi.ink/v1/social-media:facebook-scraper/comments?url=https%3A%2F%2Fwww.facebook.com%2FKOMPAScom%2Fposts%2Fpfbid0E8hZTGFLNC2piAGGWkM8GL2KK3ofVWfMVcy1d21hCevwzTbQPRzrgAVt5BmMufyvl&limit=20", {
  method: "GET",
  headers: {
    "x-api-key": "zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
  },
});
const data = await res.json();
console.log(data);
Python
import requests

res = requests.get(
    "https://api.zapi.ink/v1/social-media:facebook-scraper/comments",
    params={"url":"https://www.facebook.com/KOMPAScom/posts/pfbid0E8hZTGFLNC2piAGGWkM8GL2KK3ofVWfMVcy1d21hCevwzTbQPRzrgAVt5BmMufyvl","limit":"20"},
    headers={"x-api-key":"zpi_xxxxxxxxxxxxxxxxxxxxxxxx"},
)
print(res.json())

Frequently asked questions

How do I call the Facebook Post Comments API?

Send a GET request to https://api.zapi.ink/v1/social-media:facebook-scraper/comments?url=https%3A%2F%2Fwww.facebook.com%2FKOMPAScom%2Fposts%2Fpfbid0E8hZTGFLNC2piAGGWkM8GL2KK3ofVWfMVcy1d21hCevwzTbQPRzrgAVt5BmMufyvl with your Zapi key in the x-api-key header. Parameters — required: url; optional: limit. The response is JSON in the { project, data, timestamp } envelope.

What does the Facebook Post Comments API return?

First page of comments (~10-50) of a public Facebook post/reel/video by URL, with real total comment count.

Is the Facebook Post Comments API free?

Yes. It is on the Zapi free tier: 600 Zap a month with one API key and no credit card. Each call costs 2 Zap. Paid plans raise the limits.

Can an AI assistant call the Facebook Post Comments API?

Yes. Add the Zapi MCP server (https://mcp.zapi.ink/mcp) to Claude, Cursor or another MCP client and ask in plain words; it calls run_scraper with scraper "facebook-scraper" and endpoint "comments".

What other Facebook API endpoints are there?

It has 5 endpoints. Besides Post Comments: Post Detail, Page Profile, Profile Videos, Video Transcript.