Facebook Brand Safety API. On each item you fetch.
The item's risk for an advertiser in each of the 12 categories of GARM's brand safety framework, every category with its level (none, low, medium, high, floor) and the probability that is right. Add analysis=brand_safety to any of 9 Facebook endpoints that offer it.
GET /v1/facebook/post?analysis=brand_safety
One param on the request. Brand safety on each item.
The Facebook Post API returns each post with analysis.brand_safety beside its fields.
curl -G 'https://socialtap.dev/v1/facebook/post' \
--data-urlencode 'url=https://www.facebook.com/reel/4075684206061398/' \
--data-urlencode 'analysis=brand_safety' \
-H "x-api-key: $SOCIALTAP_API_KEY"// Node 18+: save this as app.mjs (an ES module) and run: node app.mjs
const params = new URLSearchParams({
url: "https://www.facebook.com/reel/4075684206061398/",
analysis: "brand_safety",
});
const res = await fetch(`https://socialtap.dev/v1/facebook/post?${params}`, {
headers: { "x-api-key": process.env.SOCIALTAP_API_KEY ?? "" },
});
const body = await res.json();
if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
const { data, meta } = body;
console.log(data, meta.credits_charged);import os
import requests
res = requests.get(
"https://socialtap.dev/v1/facebook/post",
params={"url": "https://www.facebook.com/reel/4075684206061398/", "analysis": "brand_safety"},
headers={"x-api-key": os.environ["SOCIALTAP_API_KEY"]},
)
body = res.json()
if not res.ok:
raise RuntimeError(f"{body['error']['code']}: {body['error']['message']}")
data, meta = body["data"], body["meta"]
print(data, meta["credits_charged"]){
"brand_safety": [
{
"category": "adult_explicit",
"level": "none",
"probability": 0.95
}
]
}Values are examples.
GET https://socialtap.dev/v1/facebook/postDocs What the value means.
A list of objects with the fields below. Each entry carries its own probability, from 0 to 1.
| Field | Meaning |
|---|---|
category | The category. (adult_explicit, arms_ammunition, crime, death_injury_conflict, online_piracy, hate_speech, obscenity_profanity, drugs_alcohol_tobacco, spam_harmful, terrorism, sensitive_social_issues, misinformation) |
level | Its risk: none, low, medium, high, or floor (never suitable for ads). (none, low, medium, high, floor) |
probability | How likely the level is right, from 0 to 1. |
Keep only what matches.
On a list, where keeps the items that pass. Every item judged is charged whether or not it passes, so a page can be short.
https://socialtap.dev/v1/facebook/posts?handle=NASA&analysis=brand_safety&where=analysis.brand_safety[].level=high9 Facebook endpoints offer it.
Each adds the analysis to the posts, comments and transcripts it returns. Text analyses cost one flat amount per request, or per page on a list, however many you ask for.
-
Post
Facebook Post API
Post, photo, video or reel with exact counts
1 credit$0.75–$1.97 per 1,000 requestsGET /v1/facebook/post -
Post
Facebook Profile Posts API
Newest first, with exact reactions and shares
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/facebook/posts -
Post
Facebook Group Posts API
Public group posts with exact counts
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/facebook/group_posts -
Post
Facebook Profile Photos API
Full-size photos, uploaded or tagged
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/facebook/photos -
Post
Facebook Reels API
Newest first, with views and video files
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/facebook/reels -
Comment
Facebook Comments API
Top-level, with exact reactions and reply counts
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/facebook/comments -
Comment
Facebook Comment Replies API
Thread under a comment, both levels
1 credit / page$0.75–$1.97 per 1,000 pagesGET /v1/facebook/replies -
Transcript
Facebook Video Transcript API
Timed transcript of a video or reel
From 1 credit$0.75–$1.97 per 1,000 requestsGET /v1/facebook/transcript -
Transcript
Facebook Ad Transcript API
Timed transcript of what a video ad says
From 2 credits$1.50–$3.93 per 1,000 requestsGET /v1/facebook/ad_transcript
| Endpoint | Adds |
|---|---|
| Facebook Post API | +2 credits per request |
| Facebook Profile Posts API | +6 credits per page of 3 |
| Facebook Group Posts API | +6 credits per page of 3 |
| Facebook Profile Photos API | +14 credits per page of 8 |
| Facebook Reels API | +18 credits per page of 10 |
| Facebook Comments API | +16 credits per page of 10 |
| Facebook Comment Replies API | +16 credits per page of 10 |
| Facebook Video Transcript API | +6 credits per request |
| Facebook Ad Transcript API | +6 credits per request |
More analyses on Facebook and beyond.
The same answer on other platforms, and other answers here.
Questions about Facebook brand safety
The analyses guide has the rest.
Which Facebook endpoints offer brand safety?
How much does an analysis cost?
Do I pay when an analysis can't answer?
Can I get only the items that match?
Which languages do analyses answer in?
Can I use my own categories or questions?
Send your first request in a minute.
Get a key, send a link you already have and see what comes back. The same key works on every platform.
- No credit card
- Failed requests are free
- Works on all 319 endpoints