Facebook Posts Search avatar

Facebook Posts Search

Pricing

from $2.00 / 1,000 result items

Go to Apify Store
Facebook Posts Search

Facebook Posts Search

✨ Search for Facebook posts using keywords or hashtags. Retrieve post URLs, content, publication dates, author details, and engagement metrics. Ideal for monitoring brand mentions on Facebook over time.

Pricing

from $2.00 / 1,000 result items

Rating

4.2

(14)

Developer

Scraper One

Scraper One

Maintained by Community

Actor stats

74

Bookmarked

26K

Total users

2.4K

Monthly active users

0.6 hours

Issues response

a day ago

Last modified

Security

Limited permissions

Share

Search Facebook posts by keywords or hashtags with this Apify Actor. Collect post URLs, text, publication dates, author details, engagement metrics, and attachments when available.

Use the results to monitor brand mentions, follow topics, and analyze public discussions. 🚀

Quick Start

  1. Open Facebook Posts Search in Apify Console.
  2. Enter a search query and the maximum number of results.
  3. Run the Actor and monitor its progress in the logs.
  4. View the results in the run's dataset and export them as JSON, CSV, or Excel.

For a first run, use:

{
"query": "Tesla",
"resultsCount": 10
}

Features

  • 🔍 Search by keywords or hashtags.
  • Request Facebook's default search order or recent posts.
  • 📅 Filter by a tagged location and publication date range.
  • 📊 Extract reactions, comments and shares counts, author details, and 🖼️ attachments.
  • Identify reshared posts and retrieve original-post details when available.

Input Parameters

ParameterTypeRequiredDescription
querystring✅Search term, keyword, or hashtag. Use 1–100 characters, excluding braces, dollar signs, angle brackets, and backticks. Leading and trailing whitespace is ignored.
resultsCountinteger❌Maximum number of posts to return. Minimum: 1. Defaults to 5 when omitted. Subject to the limits below.
searchTypestring❌top (default) uses Facebook's default search order. latest enables Facebook's recent-posts filter.
locationstring❌Tagged location to search for. Accepts a name (for example, London) or a Facebook Location ID containing 10–20 digits. Maximum input length: 20 characters. See location behavior below.
startDatestring❌Start of the publication date filter, in YYYY-MM-DD format. When only endDate is supplied, the start is 2004-01-01.
endDatestring❌End of the publication date filter, in YYYY-MM-DD format. When only startDate is supplied, the end is the current UTC date.

Location Behavior

The filter targets locations tagged in posts. For names, the Actor uses the first location suggested by Facebook; for example, Alaska may resolve to Anchorage, Alaska. Use a numeric Location ID to select a specific location.

If it cannot resolve a location, the search may continue without a location filter.

Date and Search Behavior

If both dates are omitted, no date filter is applied. Date boundaries use UTC calendar dates. Results follow Facebook's search order; latest uses its recent-posts order.

Usage Examples

Search Recent Posts

{
"query": "#electricvehicles",
"resultsCount": 50,
"searchType": "latest"
}

Search by Location and Date Range

{
"query": "coffee",
"resultsCount": 20,
"location": "London",
"startDate": "2025-01-01",
"endDate": "2025-01-31"
}

Search by Facebook Location ID

Pass the Location ID as a string to select a specific location.

{
"query": "coffee",
"resultsCount": 20,
"location": "108343052523582"
}

Output Data

The Actor stores one JSON object per post in the run's dataset. JSON exports contain an array of these objects. The examples below use illustrative names, identifiers, and shortened media URLs.

FieldDescription
url, postId, postTextPost URL, identifier, and text.
timestampPublication time as a Unix timestamp in milliseconds.
authorAuthor identifier, name, profile URL, and profile picture when available.
reactionsCount, reactionsTotal reactions and available counts by reaction type.
commentsCount, sharesCountComment and share counts.
attachmentsAvailable attachment details, such as photos and videos.
taggedLocationIdOptional identifier of a location tagged in the post.
isReshareWhether the post is a reshare; may be null if undetermined.
sharedPostOriginal-post details for a reshare, or null when unavailable.

Fields depend on what Facebook returns. Unavailable top-level fields may be omitted; unavailable fields within sharedPost are null.

Example Post

[
{
"url": "https://www.facebook.com/example/posts/123456789012345",
"postId": "123456789012345",
"timestamp": 1743735597000,
"postText": "A new electric vehicle launch! #electricvehicles",
"reactionsCount": 25,
"reactions": {
"like": 20,
"love": 5
},
"commentsCount": 3,
"sharesCount": 2,
"author": {
"id": "100000000000001",
"name": "Example Author",
"profileUrl": "https://www.facebook.com/example",
"profilePicture": "https://example.com/profile.jpg"
},
"attachments": [
{
"type": "photo",
"url": "https://example.com/photo.jpg",
"id": "123456789012346",
"accessibilityCaption": "An electric vehicle"
}
],
"isReshare": false,
"sharedPost": null
}
]

Example Reshare

For a reshare, author identifies the person sharing the post, while sharedPost describes the original post. This abbreviated example highlights those fields:

{
"url": "https://www.facebook.com/example/posts/123456789012347",
"postId": "123456789012347",
"postText": "Sharing this recipe!",
"author": {
"id": "100000000000001",
"name": "Example Author"
},
"isReshare": true,
"sharedPost": {
"postId": "123456789012348",
"url": "https://www.facebook.com/examplepage/posts/123456789012348",
"postText": "Try these avocado sushi cups.",
"author": {
"id": "100000000000002",
"name": "Example Page"
},
"timestamp": 1776080822000,
"attachments": null
}
}

Limits and Availability

  • Accounts that Apify identifies as non-paying are limited to 100 results per search query. Requests above this limit are reduced to 100.
  • When no result limit is supplied, the Actor requests 5 results. The Console's prefilled resultsCount value is 10; keeping that value explicitly requests 10 results.
  • The run's maximum cost per run can further reduce the result limit. A run requires enough remaining budget for at least one result.
  • An initialization charge applies to each run. Returned posts are billed separately.
  • Usage limits may prevent a run from starting. The Actor then asks you to try again later or upgrade.
  • The requested result count is an upper bound. Facebook may return fewer matching posts, and data availability can vary between searches.

Works Best With

To maximize the effectiveness of this scraper, use it in combination with Facebook Comments Scraper.

By first extracting Facebook posts with this scraper, you can then pass the collected post URLs into the Facebook Comments Scraper, allowing you to retrieve comments associated with those posts.

Best Use Case Scenario

  • 🔎 Run Facebook Posts Search actor → Collect a list of posts based on keywords.
  • 📥 Feed post URLs into Facebook Comments Scraper → Extract comments from the collected posts for deeper analysis.
  • 📊 Get full post insights → Combine post metadata and comments for a complete dataset.

This workflow is ideal for social media monitoring, sentiment analysis, and engagement tracking. 🚀

If you're working with multiple platforms or want additional data sources, check out these scrapers:

Support & Contact

✉️ For help or additional output fields, open an issue or contact scraper1one@gmail.com. 🤙