# Facebook Hashtag Scraper: Hashtag Posts, No Login (`automation_craft/facebook-hashtag-scraper`) Actor

Facebook hashtag scraper for public posts by #hashtag, no login: the hashtag page's top and recent posts, then Facebook's post search for the tag month by month, only posts that carry the tag by default. Rows: text, author, reactions, comments, shares, media. JSON, CSV, API; pay per post.

- **URL**: https://apify.com/automation_craft/facebook-hashtag-scraper.md
- **Developed by:** [Automation Craft](https://apify.com/automation_craft) (community)
- **Categories:** Social media, Marketing, News
- **Features:** Limited permissions
- **Stats:** 4 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.51 / 1,000 posts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### Facebook Hashtag Scraper: Hashtag Posts, No Login

**Facebook hashtag scraper** for public posts, with no login, no cookies and no Facebook account: give hashtags (`nike`, `#nike` or a `facebook.com/hashtag/nike` link) and get the public posts Facebook shows for each of them, from the hashtag page's Top and Recent tabs and, past the page's last post, from Facebook's own post search for the tag, month by month. By default every row is a post that really carries the hashtag, and it says where (its text, the post it shares, its link preview or its event). Each row has the post's text, author, time, reactions by type, comment and share counts, video views, photos and videos with their files, link previews and shared posts. Pay per post, from $2.51 per 1,000.

Built for hashtag and campaign tracking, social listening and brand monitoring, influencer and content research, news and topic studies, AI data sets, and scheduled runs in n8n, Make or Zapier. Rows carry what Facebook shows a visitor who is not logged in; use them under the rules that apply to you.

#### At a glance

- **Up to 100 hashtags a run**, in any language and script (`#travel`, `#fútbol`, `#भारत`, `#旅行`), each read on its own and named on every row; a hashtag given twice in two forms is read once.
- **Only posts that carry the tag** (on by default): Facebook's hashtag page is a topic feed, and about half of its posts do not carry the hashtag itself; those are left out free. Turn it off to get every post Facebook shows for the tag, each with `hasHashtag`.
- **Past the hashtag page**: Facebook's hashtag page shows about 90 to 97 posts a tab. The Actor reads the Top tab and the Recent tab, then (Deep search, on by default) Facebook's post search for the `#tag`, then month by month back, so a hashtag gives many more posts than its page.
- **Order, dates, place**: Top posts first, or Most recent first (Facebook's post search for the tag with its most recent filter: newest first by and large, though neighbouring posts can be out of time order); a date window (`2026-10-01`, `7 days`) or a quick time range (day, week, month, year), checked on every post; posts tagged at a place, by Facebook location id or full name.
- **Filters**: post type (photo, album, video, reel, link, share, event, listing, text; or photos, videos, reels), who posted it (a page, a business page, a person, a group post), minimum reactions, comments or shares, words to keep and words to leave out. Posts a filter leaves out are free.
- **Add-ons**: each delivered post's comments as rows, in the order you choose (oldest, newest, most relevant, all), with replies and a cap per comment; the rest of an album's photos and videos.
- **Each post billed once per run**, however many of your hashtags find it. Every hashtag gets a free coverage row that says what was read, from which door, and why it ended.
- **Personal data off by default**: a person author's id, profile link and picture, the ids and links of tagged people and the `phones` and `emails` lists stay empty unless you turn them on. Names and texts are delivered as Facebook shows them.

### Quick start

1. Open the Actor and type your hashtags into **Hashtags**, one per line (the form starts with `nike`).
2. Set **Posts per hashtag** (the form starts at 10; 20 when the field is left out; up to 5,000) and pick an **Order**. Add a date window, a time range, a location or filters if you like.
3. Run, then download the rows from the Output tab (view **Posts**) as JSON, CSV or Excel, or read them through the API.
4. To track a hashtag every day: set **Order** to Most recent first and **Time range** to The last day, and schedule the run with Apify's scheduler.

### What you get

One `post` row per post (`type: "post"`). The fill rates count the 563 full post rows (446 distinct posts, on 12 hashtags such as nike, travel, sourdoughbaking, climatechange, worldcup and भारत, in Top and Most recent order, with and without windows, places and filters) of the 38 runs of the platform test matrix t1 of 2026-10-26 and 27 (on the private test Actor, its build 0.1.2; since then the rows gained `links` and `authorIsVerified`, measured in their own rows below, and with personal data off a link to Facebook is rebuilt with no person in it, as the personal data section says; every other field is built as then); compact rows and the personal data run are left out.

| Field | What it holds | Filled |
|---|---|---|
| `postId`, `url`, `createdAt`, `createdAtUnix` | The post's id, its own link as Facebook serves it, and its creation time (UTC). With personal data off a person's post link is empty when it holds the person's profile name or id; group, photo, video and reel links stay | `postId`, `createdAt` 100%; `url` 444 of 444 page posts (89.3% of all rows) |
| `hashtag`, `foundVia` | The hashtag the post was found for (lower case, without #), and where: `hashtag_page_top`, `hashtag_page_recent` (the hashtag page's tabs), `post_search` or `post_search_month` (Facebook's post search for the tag) | 100% (375 Top tab, 49 Recent tab, 139 post search) |
| `hasHashtag`, `hashtagFoundIn` | Whether the post carries the hashtag itself, and where: `text` (as written or as Facebook links it), `shared_post`, `link`, `event` | 100%; true on every row with the default switch (547 of 563: the other 16 come from the run with the switch off), in the post's own text on all of them |
| `searchRank`, `searchPage`, `sortBy`, `query` | The post's place in the order the hashtag search read it (1 = first), the page it came on (every phase together), the order, the text sent to Facebook (`#nike`) | 100% |
| `searchWindow`, `searchLocation` | The date window and the location id the search was sent with | on every row of a search that sets them |
| `text` | The post's text in full, exactly as Facebook serves it | 558 of 558 posts that are not shares |
| `title` | The post's header line when it has one ("X is at Y", "X is with Y") | 15.6% |
| `postType` | `text`, `photo`, `album`, `video`, `reel`, `link`, `share`, `event`, `listing` or `unavailable_attachment` | 100% (photo 245, album 215, reel 61, link 24, text 12, share 5, video 1) |
| `authorName`, `authorType` | The author's name and kind (`page` or `person`) | 100% (444 pages, 119 persons) |
| `authorIsVerified` | Whether Facebook shows its verified badge beside the author's name in the post's header | known on 224 of 240 posts (65 verified) of a test run of 4 hashtags (the test Actor's build 0.1.6, run IY7Us8ZL74zswmWeD) |
| `authorId`, `authorUrl`, `authorProfilePictureUrl`, `authorPageId`, `authorIsBusinessPage` | A page's id, link, picture, classic page id and whether its business page is active (a person's id, link and picture with personal data on) | 444 of 444 page posts; empty for persons with personal data off |
| `groupId`, `groupName`, `groupUrl`, `isGroupPost` | The public group a post was made in | 45 group posts (8%), every one named |
| `reactionCount`, `reactions` | All reactions, and each type (`like`, `love`, `care`, `haha`, `wow`, `sad`, `angry`) | 100%; the breakdown on 544 of 544 posts with a reaction |
| `commentCount`, `shareCount`, `engagementCount` | Comments and shares as Facebook counts them, and the three counts added | 100% |
| `videoViewCount`, `videoDurationSeconds` | On videos and reels | 62 of 62 video and reel posts |
| `media`, `mediaCount`, `mediaListed`, `additionalMediaCount`, `albumComplete` | Photos and videos: `type`, `id`, `imageUrl`, `videoUrl` (HD) and `videoUrlSd`, `width`, `height`, `durationSeconds`, `altText` (Facebook's own picture description), `captionsUrl`; how many items the post holds and how many the first answer lists | 522 of 522 photo, album, video and reel posts; `imageUrl` and `altText` on 1088 of 1088 photos; `videoUrl` on 62 of 69 videos; 74 of 215 albums hold more items than listed (the **Complete albums** add-on reads the rest) |
| `link` | A link preview: `url`, `title`, `description`, `domain`, `imageUrl` | 24 of 24 link posts |
| `sharedPost` | A share's original post: `postId`, `postUrl`, `authorName`, `authorType`, `text`, `createdAt` | 5 of 5 shares |
| `listing`, `event` | A sale post's listing, an event post's event | where present (none among the posts measured) |
| `hashtags`, `mentions`, `taggedPlace`, `taggedProfiles` | The hashtags of the text (as Facebook links them, then as written); pages and people the text links to; the place and the people or pages the header tags (a person's id and link with personal data on) | hashtags 98.2%, mentions 5.9%, tagged place 10.8%, tagged profiles 4.3% |
| `links` | The web addresses written in the post's text, as Facebook links them, in text order (the address the author wrote; pages and people the text links to are `mentions`, a link preview is `link`). With personal data off, a contact link (WhatsApp, Messenger, Telegram invite), a person's profile link or an address with an e-mail in it is left out | 26 of 240 posts of the same run, among them every post whose text shows a web address (21 of 21) |
| `audience`, `isAiLabelled` | The audience Facebook shows ("Public"), and whether Facebook marks the post as made or edited with AI | 100%; AI label on 30 posts |
| `phones`, `emails` | Phone numbers and e-mail addresses written in the post, as lists (personal data on) | empty with personal data off |
| `rawStory` | Facebook's own story object (with **Include Facebook's raw post data** and personal data on) | on every row of a run that asks for it |
| `storyId`, `feedbackId`, `attachmentKinds`, `subjectKey`, `searchKey`, `albumExpanded`, `scrapedAt` | Facebook's own story and feedback ids (a person author's story id with personal data on only), the attachment styles, the hashtag search the row belongs to, whether the Complete albums add-on read the post's photo set, the time of the run | page posts 100% |

**Compact rows** (**Row form** set to Compact, for AI agents and sheets) carry one level only: `type`, `postId`, `url`, `hashtag`, `foundVia`, `hasHashtag`, `hashtagFoundIn` (as text), `searchRank`, `createdAt`, `text`, `postType`, `authorName`, `authorType`, `authorUrl`, `groupName`, `reactionCount`, `commentCount`, `shareCount`, `videoViewCount`, `imageUrl`, `videoUrl`, `linkUrl`, `sharedPostUrl`, `taggedPlace`, `searchLocationId`, `searchLocationInput`, `subjectKey`, `searchKey`, `scrapedAt`.

#### Comment rows (add-on)

With **Comments per post** above 0, one `comment` row per comment of each delivered post (`type: "comment"`, the Comment event), in the **Comment order** you choose (oldest first by default; newest first; most relevant; all, ranked), up to 1,000 a post; replies too with **Include replies** or **Replies per comment** (a cap for each comment's replies; replies count toward the post's number): `commentId`, `postId`, `postUrl`, `hashtag`, `query`, `parentCommentId`, `threadCommentId`, `depth`, `text`, `language`, `createdAt`, `authorName`, `authorIsPostAuthor`, `authorBadges`, `reactionCount`, `reactions`, `replyCount`, `attachments`, `isEdited`, `mentions`, `commentUrl` (a person commenter's `authorId` and `authorUrl` with personal data on).

#### Coverage, status and summary rows (free)

- **Coverage** (`type: "coverage"`), one per hashtag (and location): `hashtag`, `query`, `sortBy`, `window`, `location`, `pagesRead`, `hashtagPagePages`, `monthWindowsWalked`, `postsRead`, `taggedRead` (posts read that carry the tag), `postsDelivered`, `postsCharged`, `repeated`, `deliveredByAnotherSearch`, `beyondCap`, `filtered` (by the tag, window, type, source, counts and keywords), `hashtagPageEmpty` (the tabs that showed no post: a made up or unused tag, or one Facebook hides from visitors who are not logged in, such as `fitness`), `postSearchEnd` and `phasesEndedUntagged` (where pages in a row without the tag ended the post search or its windows), `reachedEndOfResults`, `newestPostAt`, `oldestPostAt`, `stopReason` (`max_posts_per_query`, `end_of_results`, `no_tagged_posts`, `max_pages_per_query`, `max_posts`, `charge_limit`, `location_not_found` and others), `complete`, and `resumeEntry` (this hashtag's part of the run's resume token, below).
- **Status** (`type: "status"`): `invalid` (an input that cannot be used as given: nothing is fetched, only the start fee is charged), `values_skipped` (hashtag values that are not one hashtag, beside usable ones, named by position), `location_not_found` (a place name that names no single place, with Facebook's suggestions), `lookup_failed`, `skipped` (hashtags not started because the run stopped), `place_changed`, `addon_unavailable`, `comments_incomplete`.
- **Summary** (`type: "summary"`), the last row: every counter, the requests made, the billing the platform confirmed, and `resumeToken` when a hashtag stopped before its end.

#### Example post row

A post of a test run (4 hashtags, 60 posts each) on 2026-10-27 on the test Actor's build 0.1.6, found for `nike` via `hashtag_page_top`; the image links are shortened here:

```json
{
  "type": "post",
  "postId": "1575198044649683",
  "url": "https://www.facebook.com/CampusNouvelleCaledonie/posts/pfbid02UEpURH1M5paA5kRvkAr6BT9oYizCzY6KGP2ookz58W9RPwRTiZAxUzcAKRoeYVdMl",
  "query": "#nike",
  "sortBy": "top",
  "searchLocation": null,
  "searchRank": 18,
  "searchPage": 5,
  "searchWindow": null,
  "hashtag": "nike",
  "foundVia": "hashtag_page_top",
  "hasHashtag": true,
  "hashtagFoundIn": [
    "text"
  ],
  "createdAt": "2026-10-24T07:00:11.000Z",
  "createdAtUnix": 1792825211,
  "text": "Le style Nike dès les premiers pas 👟 \nLes Court Borough Low Recraft se déclinent en trois coloris pour les tout-petits. \n\nEn magasin à 5 999 F\n\n📍 Campus Dumbéa Mall, Campus Païta & Campus Anse Vata\n🛍️ www.campus.nc \n\n#CampusNC #Nike #CourtBorough",
  "title": null,
  "hashtags": [
    "CampusNC",
    "Nike",
    "CourtBorough"
  ],
  "mentions": [],
  "links": [
    "http://www.campus.nc/"
  ],
  "postType": "photo",
  "authorName": "Campus Nouvelle-Calédonie",
  "authorId": "100064785066436",
  "authorUrl": "https://www.facebook.com/CampusNouvelleCaledonie",
  "authorType": "page",
  "authorIsVerified": false,
  "authorPageId": "2077615655849995",
  "authorIsBusinessPage": false,
  "authorProfilePictureUrl": "https://scontent-arn2-1.xx.fbcdn.net/v/t39.30808-1/340631391_934130354296653_3110020524664666954_n.jpg?...",
  "groupId": null,
  "groupName": null,
  "groupUrl": null,
  "isGroupPost": false,
  "taggedPlace": null,
  "taggedProfiles": [],
  "audience": "Public",
  "isAiLabelled": true,
  "reactionCount": 16,
  "reactions": {
    "like": 8,
    "love": 7,
    "care": 1
  },
  "commentCount": 0,
  "shareCount": 3,
  "engagementCount": 19,
  "videoViewCount": null,
  "videoDurationSeconds": null,
  "media": [
    {
      "type": "photo",
      "id": "1575198034649684",
      "url": "https://www.facebook.com/photo/?fbid=1575198034649684",
      "imageUrl": "https://scontent-arn2-1.xx.fbcdn.net/v/t39.99422-6/853930262_1508130714696474_6876656867900222414_n.png?...",
      "videoUrl": null,
      "videoUrlSd": null,
      "width": 1122,
      "height": 1402,
      "durationSeconds": null,
      "altText": "May be an image of shoes and text",
      "captionsUrl": null
    }
  ],
  "mediaCount": 1,
  "mediaListed": 1,
  "additionalMediaCount": 0,
  "albumComplete": true,
  "albumExpanded": false,
  "link": null,
  "event": null,
  "sharedPost": null,
  "listing": null,
  "phones": null,
  "emails": null,
  "attachmentKinds": [
    "Photo"
  ],
  "storyId": "UzpfSTEwMDA2NDc4NTA2NjQzNjoxNTc1MTk4MDQ0NjQ5NjgzOjE1NzUxOTgwNDQ2NDk2ODM=",
  "feedbackId": "ZmVlZGJhY2s6MTU3NTE5ODA0NDY0OTY4Mw==",
  "subjectKey": "s:ebed475cf6718cd9",
  "searchKey": "c:ebed475cf6718cd9",
  "scrapedAt": "2026-10-27T08:29:52.585Z"
}
```

#### How fast and how deep

Measured on Apify runs of 2026-10-27 (256 MB, the Apify datacenter pool, the platform test matrix on this Actor's build 0.1.4, whose walk is this version's): the prefill (10 posts of nike) in 14 seconds; 5 posts of coffee in 23 seconds; 200 tagged posts of nike in 178 seconds and 1,000 in 1,657 seconds (the hashtag page's two tabs, then the post search for #nike and month windows back); 20 hashtags of 3 posts each in 97 seconds; 50 hashtags of one post each in 154 seconds. Facebook answers about 6 posts a page on the hashtag page and about 5 on its post search, a page every 2 to 5 seconds. How deep a hashtag goes and how fast depends on the tag and on Facebook: past the hashtag page, its post search answers many posts that do not carry the tag (left out free with the default) and month windows answer posts already read.

### How much does it cost to scrape Facebook hashtags?

Pay per event: you pay for the posts delivered (and the add-ons you turn on), never for a repeat, a post a filter leaves out (the tag check included), a failed call or a place name that names no place; an input that cannot be used pays only the start fee.

| Event | Free | Bronze | Silver | Gold |
|---|---|---|---|---|
| Post (`post`), per 1,000 posts | $3.51 | $3.21 | $2.91 | $2.51 |
| Comment (`comment`), per 1,000 comments, add-on | $0.27 | $0.24 | $0.22 | $0.19 |
| Complete album (`complete_album`), per 1,000 albums, add-on | $0.42 | $0.38 | $0.35 | $0.30 |
| Actor start (`apify-actor-start`), once per run | $0.0075 | $0.0075 | $0.0075 | $0.0075 |

Platinum and Diamond plans pay the Gold price. There is no discount on the Actor start event. The Store pricing card shows these same prices per 1,000 events: "$3.51 / 1,000" on the Post row means one post costs about a third of a cent on the Free plan ($0.00351), and "$2.51 / 1,000" means one post costs about a quarter of a cent on the Gold plan ($0.00251).

- **Post** is charged once per post per run: a post that two of your hashtags find is delivered and charged once. Posts left out by the tag check, the date window, the post type, the source, the minimum counts or your words are not charged and get no row.
- **Comment** is charged per comment or reply row, only with **Comments per post** above 0.
- **Complete album** is charged only with **Complete albums** on, and only when the post's photo set added photos or videos the first answer did not list.

Worked examples, start fee included:

| Run | Free | Bronze | Silver | Gold |
|---|---|---|---|---|
| The prefill: 10 posts of one hashtag | $0.0426 | $0.0396 | $0.0366 | $0.0326 |
| 1,000 posts | $3.5175 | $3.2175 | $2.9175 | $2.5175 |
| A daily scheduled run of 20 hashtags x 20 posts (400 posts a run) | $1.4115 a day | $1.2915 a day | $1.1715 a day | $1.0115 a day |
| The same daily run for 30 days | $42.345 | $38.745 | $35.145 | $30.345 |
| 100 posts with 20 comments each (2,000 comment rows) | $0.8985 | $0.8085 | $0.7385 | $0.6385 |

Every run reads its hashtags fresh: a post a scheduled run delivered yesterday is delivered and charged again today when it is found again. Narrow a daily run with **Time range** (The last day) and Most recent first to keep repeats down, and dedupe on `postId` in your own sheet or workflow.

#### The work allowance

Work that earns nothing (hashtags whose posts every filter leaves out, a made up hashtag, refused calls, long stretches of repeats) is bounded by an allowance in real cost that grows with every event the run bills. When it is spent the run stops: the hashtag it was reading ends with `work_allowance` in its coverage row, the hashtags not started get one free `skipped` row, and every row already delivered is kept. A hashtag that shows no post is cheap: its hashtag page is asked a few times, and Facebook's post search for it ends after 8 pages in a row without a post that carries the tag (`no_tagged_posts`). The **Complete albums** add-on reads from a small allowance of its own, so album reads that fail never stop the hashtag they serve.

### Input

| Field | What it does | Default |
|---|---|---|
| `hashtags` | Up to 100 hashtags, one per line: a word (`nike`), the word with `#`, or its hashtag page link (`facebook.com/hashtag/nike`). Letters of any language, digits and `_`; case does not matter. A value that is not one hashtag (a phrase with spaces, another link) is skipped free and named by its position in a `values_skipped` row; it is never cut or joined into another tag. Also read: `keywordList`, `searchQuery`, `hashtag`, `startUrls` (hashtag page links, as text or `{ "url": ... }`). | none (the form starts with `nike`) |
| `sortBy` | `top`: the hashtag page's Top tab first, then its Recent tab, then (Deep search) Facebook's post search for the tag. `recent`: Facebook's post search for the tag newest first, then the Recent and Top tabs. Also read: `searchType` (`latest` and `newest` read as `recent`). | `top` |
| `maxPostsPerHashtag` | The most posts delivered per hashtag (and per location), 1 to 5,000. Also read: `resultsLimit`, `maxResultsPerHashtag`, `resultsCount`, `maxResults`. | 20 (the form starts at 10) |
| `maxPosts` | A cap of post rows for the whole run, across hashtags. Also read: `maxItems`, `maxTotalItems`. | no cap |
| `deepSearch` | Past the hashtag page: Facebook's post search for the `#tag`, then month by month backwards (back to the start date, or 24 months); the month walk ends after 3 months in a row that bring no new post with the tag. Facebook's post search answers many posts without the tag: while it has shown none with the tag, 8 pages in a row without it end the post search (a made up or unused tag costs little); once it has shown one, 8 such pages in a row end only that window and the walk goes on with the next month. Off: the hashtag page only (in Recent order the post search newest first is still read first). | on |
| `onlyPostsWithHashtag` | Deliver only posts that carry the hashtag in their text, the post they share, their link preview or their event (`hashtagFoundIn` says where). Off: every post Facebook shows for the tag, each with `hasHashtag`. | on |
| `startDate`, `endDate` | The date window, UTC: `YYYY-MM-DD`, `today`, `yesterday`, or a time back such as `7 days`, `3 weeks`, `2 months`, `1 year`. Checked on every post; the post search gets it as Facebook's own date filter. Also read: `postedAfter`, `dateFrom`, `onlyPostsNewerThan`, `postedBefore`, `dateTo`, `onlyPostsOlderThan`. | no window |
| `timeRange` | A quick window back from the run's start: `day`, `week`, `month`, `year` (`lastMonth`, `lastYear` read the same); `any` for none. Not with a start date. Also read: `timeFilter`. | none |
| `locations` | Up to 20 places: a Facebook location id (`108424279189115` is New York, New York) or a place's full name as Facebook writes it (`London, United Kingdom`). The hashtag page takes no location, so a hashtag with a location is read through Facebook's post search for the tag only. Each hashtag is read once per place: hashtags times places may be at most 300 a run (100 hashtags with 3 places; with 4 places the input is refused with one free `invalid` row, only the start fee is charged). Also read: `location`, `locationUid`, `locationId`. | none |
| `postTypes` | Only these kinds: `text`, `photo`, `album`, `video`, `reel`, `link`, `share`, `event`, `listing`, `unavailable_attachment`; or the format names `photos` (a photo or an album), `videos`, `reels`; `any` alone for every kind. Also read: `postType`, `postFormats`. | every kind |
| `postSources` | Only posts by `page`, `business_page`, `person` or `group` (a post made in a public group). Also read: `postSource`. | every source |
| `minReactions`, `minComments`, `minShares` | Only posts with at least this many. | none |
| `includeKeywords`, `excludeKeywords` | Up to 50 words or phrases to keep (any of them) and to leave out (any of them), as whole words, case and accents aside. Also read: `keywordFilter`, `keywords`. | none |
| `maxPagesPerHashtag` | The most pages read per hashtag, every phase together (about 6 posts a page), 1 to 1,000. | no page limit |
| `maxCommentsPerPost`, `commentsSort`, `includeReplies`, `maxRepliesPerComment` | Comments of each delivered post, up to this many (0 to 1,000), each as its own row (Comment event), in this order (`oldest`, `newest`, `relevant`, `all`); replies too, with a cap per comment when you set one. Also read: `maxComments`, `commentOrder`. | 0 (off), `oldest`, off, no cap |
| `includeAllPhotos` | The photos and videos of a post that its first answer does not list, read from the post's photo set page (Complete album event; `albumComplete` says whether every item was read). Needs full rows. Also read: `scrapePhotos`. | off |
| `outputFormat` | `full` or `compact` (one level rows). Also read: `compact` (true or false). | `full` |
| `includePersonalData` | The personal data switch (below). | off |
| `includeRawData` | Facebook's own story object of each post as `rawStory` (tens of kilobytes a post). Needs `includePersonalData` on and full rows. Also read: `includeRaw`. | off |
| `maxConcurrency` | How many hashtags are read at the same time, 1 to 5, each on its own exit. Prices do not change. | 1 |
| `requestDelayMs` | The pause between two calls of one hashtag search, 300 to 10,000 ms. | 400 |
| `maxRunSeconds` | Stop starting new work after this many seconds (60 to 86,400) and end with the coverage rows and the summary. | the run's own timeout |
| `proxyConfiguration` | Apify Proxy: the datacenter pool (default), the `RESIDENTIAL` group with a two letter country, your own proxies (`http(s)://user:password@host:port` links, each new exit takes the next one; never shown in logs or rows), or no proxy (the run's own address). | Apify datacenter pool |
| `resumeToken` | The `resumeToken` of an earlier run's summary row, to go on with its hashtags where they stopped (below). | none |

#### Resume tokens

When a hashtag of a run stops before its end (its post number, its page limit, the charge limit, the run deadline, a refusal), the run's summary row carries a `resumeToken`. Run the same hashtags again, given the same way (the same hashtags, order, date window, and the same place ids or place names), with that token in `resumeToken`: each hashtag starts where it stopped (the same tab or search phase, the same page), a hashtag that run read to its end is not read again, and each skips, free, the posts IT delivered in that run. A post another hashtag of the earlier run delivered can come again, as in any two separate runs, and a hashtag the input adds beside the token starts fresh. A post search the earlier run closed (pages in a row without the tag) stays closed; the walk's own stopping counts (pages without the tag in a row, months in a row with no new post) start again in the new run, so a resumed hashtag can read a little further than one uninterrupted run would have, never less. Nothing is stored on Apify between runs: the token is yours to keep. With personal data off, a token holds no person's id.

```json
{ "hashtags": ["travel"], "maxPostsPerHashtag": 100, "resumeToken": "fbr1.eyJ2..." }
```

A value sent as `null` or `""` counts as left out, except on the three pick lists (`sortBy`, `commentsSort`, `outputFormat`): the platform itself refuses `null` there before the run starts (free; leave the key out instead). Two keys of one meaning sent together, a setting name the Actor does not know, or a value it cannot use as given refuse the input with one free `invalid` row (only the start fee is charged).

Examples:

```json
{ "hashtags": ["sourdoughbaking", "#breadmaking"], "maxPostsPerHashtag": 50 }
```

```json
{
  "hashtags": ["worldcup"],
  "sortBy": "recent",
  "timeRange": "week",
  "postSources": ["page", "group"],
  "minReactions": 10
}
```

```json
{
  "hashtags": ["https://www.facebook.com/hashtag/nike"],
  "postFormats": ["reels", "videos"],
  "maxPostsPerHashtag": 100,
  "maxCommentsPerPost": 20,
  "commentsSort": "newest"
}
```

### Personal data

Off by default. Rows then carry the names of post authors and commenters as Facebook shows them (they are part of the content) and each post's and comment's own link, and leave empty the fields that name or reach a private person: a person author's id, profile link and picture (`authorId`, `authorUrl`, `authorProfilePictureUrl`), a person author's `storyId`, a person's post link (and its photo, video and comment links, and a shared person's post link) when it holds the person's profile name or id, the ids and links of people tagged or mentioned and of commenters, a listing's seller, the `phones` and `emails` lists, and a link field (a link preview, an attachment, an address in `links`) that points to a person's profile, is a contact link (WhatsApp, Messenger) or holds an e-mail address; a link to Facebook itself is kept only in a shape that holds no person (a group post, photo, watch video, reel or event). A person in Facebook's professional mode is a person here (only an author Facebook flags as a Page is a page), and a post whose author Facebook does not name has its links judged as a person's. Texts are never masked: what someone wrote in a post or comment is delivered exactly as Facebook serves it. A page's id and link are not personal data and are always delivered. With **Include personal data** (`includePersonalData: true`) those fields are filled and **Include Facebook's raw post data** can be turned on; you are responsible for a lawful use of personal data (GDPR included).

### What this Actor does NOT do

- No login, no cookies and no Facebook account: it reads what Facebook's hashtag page and post search show a visitor who is not logged in. No private or friends only posts, and no posts of private groups.
- No monitor or "new posts only" mode across runs (owner decision): every run reads its hashtags fresh; schedule runs with Apify's scheduler and dedupe on `postId` in your own sheet or workflow. Inside one run each post is delivered once. An input with `memoryName`, `monitorStoreName`, `resetMemory` or `onlyNewPosts` is refused with a free row that says so (only the start fee is charged).
- No hashtag post count: Facebook's hashtag page shows a visitor who is not logged in no total for a tag.
- Facebook hides some popular hashtags from visitors who are not logged in (`fitness` in our tests): their hashtag page and post search answer no post, so the run delivers none for them, free; the coverage row names the empty tabs (`hashtagPageEmpty`).
- No Instagram, TikTok or YouTube hashtags: Facebook only.
- No posts found through web search engines: every post comes from Facebook itself (its hashtag page and its post search).
- Facebook decides which posts its hashtag page shows and in which order. Its Recent tab is Facebook's own mix, not a time order; for the most recent posts the Actor reads Facebook's post search (Order: Most recent first), whose order is newest first by and large, not strictly (sort by `createdAt` when the exact order matters).
- Facebook's hashtag page is a topic feed: about half its posts do not carry the hashtag. By default only the posts that carry it are delivered; a post that carries the tag only in a comment is not counted as carrying it.
- A date window is checked on every post, and Facebook's post search gets it as its own filter, which is soft: posts outside the window are left out and not charged, so a narrow window can end with fewer posts than asked for.
- An album lists the items its first answer shows; `mediaCount` says how many it holds, and **Complete albums** reads the rest from the post's photo set page (one page of the set; `albumComplete` says whether every item was read).
- No speech is turned into text and no text is read from images (Facebook's own alt text and caption links are delivered).
- Counts (reactions, comments, shares, views) are the ones Facebook shows at the moment of the run.

### API examples

Run and get the rows (replace `<APIFY_TOKEN>`):

```bash
curl -X POST "https://api.apify.com/v2/acts/automation_craft~facebook-hashtag-scraper/run-sync-get-dataset-items?token=<APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"hashtags":["travel"],"maxPostsPerHashtag":20}'
```

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('automation_craft/facebook-hashtag-scraper').call({ hashtags: ['#worldcup'], sortBy: 'recent', timeRange: 'week', maxPostsPerHashtag: 50 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.filter((r) => r.type === 'post'));
```

```python
from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("automation_craft/facebook-hashtag-scraper").call(run_input={"hashtags": ["sourdoughbaking"], "maxPostsPerHashtag": 30})
posts = [r for r in client.dataset(run["defaultDatasetId"]).iterate_items() if r["type"] == "post"]
```

### FAQ

#### How do I search Facebook by hashtag without logging in?

Give the hashtag to this Actor (`travel`, `#travel` or `facebook.com/hashtag/travel`): it reads Facebook's hashtag page and its post search as a visitor who is not logged in, with no account, no cookies and no login, and returns the public posts as rows.

#### Why does Facebook's hashtag page show posts without the hashtag?

The hashtag page is a topic feed: next to the posts that carry the tag it shows related posts about the topic. In our measurements 386 of 780 posts of hashtag pages carried the tag itself. This Actor delivers only the posts that carry it by default (`hasHashtag`, `hashtagFoundIn`); turn **Only posts that carry the hashtag** off to get the whole feed, each row flagged.

#### How do I track a hashtag on Facebook?

Schedule a run with **Order** Most recent first and **Time range** The last day (or a start date), and keep the rows by their `postId` in your sheet or workflow; every run reads the hashtag fresh and charges each post once.

#### Can I see how many posts a Facebook hashtag has?

No. Facebook shows a visitor who is not logged in no post count on a hashtag page. This Actor reads the posts themselves: each hashtag's coverage row counts the posts read, the posts that carry the tag and the posts delivered.

#### How do I export Facebook hashtag posts to CSV or Excel?

Run the Actor, open the Output tab and download the **Posts** view as CSV or Excel: one row per post with the hashtag, where it was found, the time, author, text and counts as columns. The same rows are available as JSON through the API, and **Row form** set to Compact gives one level rows for sheets.

#### Why does this Actor run with limited permissions?

It runs with the least privilege Apify offers: it reads and writes only its own run's dataset and key-value store. It cannot see your other Actors, datasets or account data.

### More data tools by Automation Craft

- [Facebook Search Scraper: Keyword Posts, No Login](https://apify.com/automation_craft/facebook-search-scraper): public posts by keyword or phrase
- [Facebook Video Search Scraper: Reels, No Login](https://apify.com/automation_craft/facebook-video-search-scraper): public videos and reels by keyword
- [Facebook Posts Scraper - Page Posts, No Login](https://apify.com/automation_craft/facebook-posts-scraper): the posts of public pages you name
- [Facebook Comments Scraper: Replies, No Login](https://apify.com/automation_craft/facebook-comments-scraper): every comment of public posts
- [Facebook Groups Scraper: Posts of Public Groups](https://apify.com/automation_craft/facebook-groups-scraper): the feed of public groups
- [Facebook Reels Scraper: Views, Likes, No Login](https://apify.com/automation_craft/facebook-reels-scraper): the reels of public pages
- [Facebook Photos Scraper: Albums, Dates, No Login](https://apify.com/automation_craft/facebook-photos-scraper): the photos of public pages
- [Threads Search Scraper: Keywords, Hashtags, Dates](https://apify.com/automation_craft/threads-search-scraper)
- [Instagram Posts Scraper: Profiles, Reels, No Login](https://apify.com/automation_craft/instagram-posts-scraper)
- [Facebook Ads Library Scraper - Ad Library & Spy](https://apify.com/automation_craft/facebook-ads-library-scraper)

### Changelog

- 0.1 (2026-10-27): first build: public Facebook posts by hashtag, logged out: the hashtag page's Top and Recent tabs, Facebook's post search for the tag and its month windows; only posts that carry the tag by default, with the evidence on every row; Top or Most recent order, a date window and time ranges, tagged locations, post type, source, count and word filters; comments (in a chosen order, with replies and a cap per comment) and complete albums as add-ons; Facebook's raw story with personal data on; personal data off by default.

# Changelog

This Actor's version history is a separate document: https://apify.com/automation_craft/facebook-hashtag-scraper/changelog.md

# Actor input Schema

## `hashtags` (type: `array`):

The Facebook hashtags to read, one per line (up to 100): a word (nike), the word with # (#nike), or the link of its hashtag page (facebook.com/hashtag/nike). Letters of any language, digits and \_ ; case does not matter. A value that is not one hashtag (a phrase with spaces, another link) is skipped free and named by its position in a row. Each hashtag is read on its own and every row names it. Also read from keywordList, searchQuery, hashtag and startUrls (hashtag page links).

## `maxPostsPerHashtag` (type: `integer`):

The most new posts delivered per hashtag (and per location). Left empty: 20. Facebook's hashtag page shows about 90 to 97 posts a tab; with Deep search on, the walk goes on through Facebook's post search for the #tag and then month by month. Also read from resultsLimit, maxResultsPerHashtag, resultsCount and maxResults.

## `maxPosts` (type: `integer`):

The most posts delivered in the whole run, across hashtags. Left empty: no cap beyond the per hashtag number and your charge limit. Also read from maxItems and maxTotalItems.

## `sortBy` (type: `string`):

top: the hashtag page's Top tab, then its Recent tab, then (Deep search) Facebook's post search for the #tag. recent: Facebook's post search for the #tag newest first, then the hashtag page's Recent and Top tabs (the hashtag page's own Recent tab is Facebook's mix, not a time order). Left empty: top. Also read from searchType (latest and newest read as recent).

## `deepSearch` (type: `boolean`):

When the hashtag page's posts run out before the hashtag's post number, go on with Facebook's post search for the #tag, then month by month backwards (this month, the month before, back to the start date or 24 months), each month a search of its own. Every post is still checked for the tag. Repeats are free. Off: the hashtag page only (in Recent order the post search newest first is read first either way).

## `onlyPostsWithHashtag` (type: `boolean`):

On (the default): a post is delivered only when it carries the hashtag itself, in its text, the post it shares, its link preview or its event (hashtagFoundIn says where); Facebook's hashtag page is a topic feed and about half of its posts do not carry the tag. Those posts are left out and not charged. Off: every post Facebook shows for the hashtag is delivered, and hasHashtag says whether it carries the tag.

## `startDate` (type: `string`):

The first day of a date window (UTC): YYYY-MM-DD, today, yesterday, or a time back from the run's start such as 7 days, 3 weeks, 2 months, 1 year. Checked on every post (the hashtag page takes no date filter; the post search gets it as Facebook's own filter); posts outside the window are left out and not charged. Left empty: no start. Also read from postedAfter, dateFrom and onlyPostsNewerThan.

## `endDate` (type: `string`):

The last day of the date window (UTC), in the same forms as the start. Left empty: today. Also read from postedBefore, dateTo and onlyPostsOlderThan.

## `timeRange` (type: `string`):

A quick date window counted back from the run's start: day, week, month or year (lastMonth and lastYear read the same); any: no window. Do not send it with a start date. Also read from timeFilter.

## `locations` (type: `array`):

Only posts tagged at a place, one per line: a Facebook location id (108424279189115 is New York, New York) or a place's full name as Facebook writes it (New York, New York; London, United Kingdom), looked up in Facebook's own place list. The hashtag page takes no location, so a hashtag with a location is read through Facebook's post search for the #tag only. A name that names no single place gets a free row with Facebook's suggestions and its searches are not run. Up to 20. Also read from location, locationUid and locationId.

## `postTypes` (type: `array`):

Only these kinds of post (any of them). Left empty: every kind. Posts of other kinds are left out and not charged. The format names photos (one photo or an album), videos and reels are read too, and any or all alone means every kind. Also read from postType and postFormats.

## `postSources` (type: `array`):

Only posts by these sources (any of them): a page, a business page (a page with a business account), a person, or a post made in a public group. Left empty: every source. Also read from postSource.

## `minReactions` (type: `integer`):

Only posts with at least this many reactions (posts with fewer, or with no count shown, are left out and not charged).

## `minComments` (type: `integer`):

Only posts with at least this many comments.

## `minShares` (type: `integer`):

Only posts with at least this many shares.

## `includeKeywords` (type: `array`):

Only posts whose text holds at least one of these words or phrases (whole words, case and accents aside). Up to 50. Also read from keywordFilter and keywords.

## `excludeKeywords` (type: `array`):

Posts whose text holds any of these words or phrases are left out and not charged (the same matching rule). Up to 50.

## `maxPagesPerHashtag` (type: `integer`):

The most pages read per hashtag search, every phase together (about 6 posts a page). Left empty: no page limit (the posts per hashtag cap and Facebook's own end decide).

## `maxCommentsPerPost` (type: `integer`):

Read the comments of each delivered post, up to this many (replies included), each as its own row (the Comment event). 0 or empty: no comments are read. Also read from maxComments.

## `commentsSort` (type: `string`):

The order Facebook lists the comments in, when comments are read. Left empty: oldest first. Also read from commentOrder.

## `includeReplies` (type: `boolean`):

With comments on: read the replies of each comment too (they count toward the number per post).

## `maxRepliesPerComment` (type: `integer`):

With comments on: read up to this many replies of each comment (they count toward the number per post too); above 0 turns replies on. 0 or empty: replies follow Include replies, with no cap per comment.

## `includeAllPhotos` (type: `boolean`):

For a post whose first answer lists only its first photos, read the post's photo set page and add the photos and videos it holds that were not listed (the Complete album event, charged only when the set added items; albumComplete says whether every item of the post was read). Also read from scrapePhotos.

## `outputFormat` (type: `string`):

full: every field; compact: the main fields of a post one level deep (text, author, counts, first image or video, link). Left empty: full. Also read from compact (true or false).

## `includePersonalData` (type: `boolean`):

Off (the default): the fields that name or reach a private person are empty: a person author's id, profile link, picture and story id, the ids and links of people tagged or mentioned and of commenters, a listing's seller, and the phones and emails lists read from a text; a person's post link (and its photo, video and comment links) is kept only in a form without the person's profile name or id (a group post, photo, video or reel link), else empty; so is any other link to Facebook (a link preview, an attachment, an address in `links`), and contact links (WhatsApp, Messenger) and addresses with an e-mail in them are emptied. The names of authors, commenters and people tagged or mentioned, and every text, are delivered as Facebook shows them, either way. On: those fields are filled (and Include Facebook's raw post data may be turned on); you are responsible for a lawful use of personal data (GDPR included).

## `includeRawData` (type: `boolean`):

Add Facebook's own story object of each post as rawStory (large: tens of kilobytes a post). It names the people in the post, so it needs Include personal data on. Also read from includeRaw.

## `maxConcurrency` (type: `integer`):

How many hashtag searches are read at the same time, each on its own exit. Left empty: 1 (one after another).

## `requestDelayMs` (type: `integer`):

The pause between two calls of one hashtag search, in milliseconds. Left empty: 400.

## `maxRunSeconds` (type: `integer`):

Stop starting new work after this many seconds and end with the coverage rows and the summary (what was delivered stays delivered and charged). Left empty: the run's own timeout.

## `proxyConfiguration` (type: `object`):

Apify Proxy, the datacenter pool by default; choose the RESIDENTIAL group with a country for exits of that country, your own proxies (http(s) links with their port; each new exit takes the next one), or no proxy for the run's own address. Also read from proxy.

## `resumeToken` (type: `string`):

Go on with the hashtag searches an earlier run stopped before their end (its post number, its page limit, the charge limit, the run deadline, a refusal): paste the resumeToken of that run's summary row here and run the same hashtags again, given the same way (the same hashtags, order, date window, and the same place ids or place names). Each hashtag search starts where it stopped (the phase and the page), those that run read to the end are not read again, and each skips, free, the posts it delivered in that run. A post another hashtag of that run delivered can come again and is charged, as in any two separate runs. Left empty: every hashtag starts at its first page.

## Actor input object example

```json
{
  "hashtags": [
    "nike"
  ],
  "maxPostsPerHashtag": 10,
  "deepSearch": true,
  "onlyPostsWithHashtag": true,
  "includeReplies": false,
  "outputFormat": "full",
  "includePersonalData": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `items` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "hashtags": [
        "nike"
    ],
    "maxPostsPerHashtag": 10,
    "outputFormat": "full",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation_craft/facebook-hashtag-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "hashtags": ["nike"],
    "maxPostsPerHashtag": 10,
    "outputFormat": "full",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("automation_craft/facebook-hashtag-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "hashtags": [
    "nike"
  ],
  "maxPostsPerHashtag": 10,
  "outputFormat": "full",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call automation_craft/facebook-hashtag-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation_craft/facebook-hashtag-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/w9E6pnK9eVvGYVDdw/builds/gDiPEgiETxxshTTOV/openapi.json
