API Direct
Endpoints
Facebook Search Posts

Facebook Search Posts

GET /v1/facebook/posts

Search Facebook posts by keyword across all of Facebook. Returns post content, engagement metrics (reactions, comments, shares), author data, and media. Supports pagination and date filtering.

Cost
$0.008 per page
Free tier
50 requests/month

Parameters

query *
Search keyword (max 500 characters)
pages
Number of pages to fetch (1-10, default 1). Billed per page.
start_date
Filter posts from this date (YYYY-MM-DD)
end_date
Filter posts until this date (YYYY-MM-DD)
sort_by
Sort order: most_recent or relevance (default: relevance)
location_id
Facebook location ID to scope results to a place (resolve one via Search Locations)
get_sentiment
Set to true to add AI emotion analysis (+$0.001/page)

Example Request

curl "https://apidirect.io/v1/facebook/posts?query=artificial%20intelligence&start_date=2026-01-01" \
  -H "X-API-Key: YOUR_API_KEY"

Example Response

{
  "posts": [
    {
      "post_id": "100087654321_998877665544",
      "url": "https://www.facebook.com/permalink.php?id=100087654321&story_fbid=998877665544",
      "message": "The latest breakthroughs in artificial intelligence are truly remarkable. Here is what caught my attention this week...",
      "sentiment": {
        "emotions": {
          "joy": 40,
          "trust": 55,
          "fear": 0,
          "surprise": 10,
          "sadness": 0,
          "disgust": 0,
          "anger": 0,
          "anticipation": 30
        },
        "dominant_emotion": "trust",
        "emotional_intensity": 5,
        "polarity": "positive"
      },
      "date": "2026-03-01 11:00:00",
      "timestamp": 1772445600,
      "author_name": "Tech Daily",
      "author_id": "100087654321",
      "author_url": "https://www.facebook.com/TechDaily",
      "author_profile_picture": "https://scontent.xx.fbcdn.net/v/t39.30808-1/...",
      "comments_count": 89,
      "reactions_count": 1540,
      "reshare_count": 320,
      "reactions": {"like": 900, "love": 350, "wow": 180, "haha": 10, "sad": 50, "angry": 50},
      "image_url": "https://scontent.xx.fbcdn.net/v/t39.30808-6/...",
      "video": null,
      "external_url": null
    }
  ],
  "count": 1,
  "pages": 1
}

Your Usage

Free tier this month
Loading...
Recent Activity