Facebook Hashtag Scraper avatar

Facebook Hashtag Scraper

Try for free

Pay $5.00 for 1,000 Posts

View all Actors
Facebook Hashtag Scraper

Facebook Hashtag Scraper

apify/facebook-hashtag-scraper
Try for free

Pay $5.00 for 1,000 Posts

Extract data from hundreds of Facebook posts using one or multiple hashtags. Get post text&URL, time of posting, basic poster info, image&video URLs, OCR text, likes, comments and shares count, and more. Download the data in JSON, CSV, Excel and use it in apps, spreadsheets, and reports.

Do you want to learn more about this Actor?

Get a demo

What is Facebook Hashtag Scraper?

It's a simple and powerful tool that allows you to extract Facebook posts which include hashtags of your choice. The scraped posts could be from either Facebook Pages or Facebook Groups, as long as they contain the hashtag. To get that data, just type in or paste a hashtag and click "Save & Start" button.

What Facebook hashtags data can I extract?

With this Facebook API, you will be able to extract the following hashtag data from Facebook:

🔗 Post URL 📝 Post text
🖼 Image URLs ⏰ Time of posting
▶️ Video URLs 👍 Likes, comments and shares count
🦾 OCR text from images 🥷 Basic info about the posting account

Why scrape Facebook hashtags?

🤬 Analyze social media and identify hot spots of misinformation or hate speech

🔎 Conduct market research or product analysis

🤺 Monitor competition

🤔 Track brand sentiment and shifts in customer engagement

How do I use Facebook Hashtag Scraper?

Facebook Hashtag Scraper was designed to be easy to start with even if you've never extracted data from the web before. Here's how you can scrape Facebook data with this tool:

  1. Create a free Apify account using your email.
  2. Open Facebook Hashtag Scraper.
  3. Add one or more hashtags to scrape Facebook posts by.
  4. Click "Start" and wait for the data to be extracted.
  5. Download your data in JSON, XML, CSV, Excel, or HTML.

Input

The input for Facebook Hashtag Scraper should be keyword hashtags by which you want to scrape Facebook pages and groups. Click on the input tab for a full explanation of input in JSON.

1{
2  "keywordList": [
3    "sustainability"
4  ],
5  "resultsLimit": 25,
6  "maxRequestRetries": 5
7}
8...

Output sample

The results will be wrapped into a dataset which you can find in the Storage tab. Here's an excerpt from the dataset you'd get if you apply the input parameters above:

Scraping Facebook Hashtags

And here is the same data but in JSON. You can choose in which format to download your Facebook data: JSON/JSONL, Excel, HTML table, CSV, or XML.

1[{
2  "id": "UzpfSTEwMDA4ODIwMzI0Nzg1MTpWSzo1NzY0NjkzOTYzNjI5Nzgx",
3  "postId": "5764693963629781",
4  "feedbackId": "ZmVlZGJhY2s6NTc2NDY5Mzk2MzYyOTc4MQ==",
5  "user": {
6    "id": "100088203247851",
7    "name": "Swayam Polyplast Private Limited",
8    "profileUrl": "https://www.facebook.com/people/Swayam-Polyplast-Private-Limited/100088203247851/",
9    "profilePic": "https://scontent-hou1-1.xx.fbcdn.net/v/t39.30808-1/325752910_1358968068289721_1012420025108287726_n.jpg?stp=cp0_dst-jpg_p40x40&_nc_cat=102&ccb=1-7&_nc_sid=c6021c&_nc_ohc=NeOna5oU5JIAX_-W-Ic&_nc_ht=scontent-hou1-1.xx&oh=00_AfAY3NX_L7vvSbA9okKTZhGyH8S31QLKeVu-ZA_KM1SxHA&oe=644B6B11"
10  },
11  "date": "2023-03-21T07:12:00.000Z",
12  "url": "https://www.facebook.com/groups/1516336221798931/posts/5764693963629781/",
13  "text": "Imagination is the beginning of creation. You imagine what you desire, you will what you imagine and at last you create what you will.\n\nWe at Swayam Polyplast Private Limited always aim to improvise and advance ourselves and market with new creations and varieties.\n\nSo we are launching new pure virgin Printed textured exclusive designs in the market.\n\nThese all designs are exclusive, innovative and only available with us.\n\nThe purpose is to grow creations in Non-woven industry.Our mission is always to provide market with new varieties.\n\nYou can contact us for printed rolls or any types of customized bags in these designs.\n\nBest quality with best rates at SPPL.\n\nKindly drop your enquiries on 9512035351 or you can drop you number in comment section.\n\n#finestprinting #innovation #creations \n#ecofriendly #sustainability #topmanufacturer",
14  "attachments": [
15    {
16      "mediaset_token": "pcb.5764693963629781",
17      "url": "https://www.facebook.com/media/set/?set=pcb.5764693963629781&type=1",
18      "all_subattachments": {
19        "count": 13,
20        "nodes": [
21          {
22            "deduplication_key": "ad5c8c14b059626c0bf923f3ea3a55f2",
23            "media": {
24              "__typename": "Photo",
25              "is_playable": false,
26              "image": {
27                "uri": "https://scontent-hou1-1.xx.fbcdn.net/v/t39.30808-6/336264212_101824346200960_6964377692391995933_n.jpg?stp=dst-jpg_p720x720&_nc_cat=100&ccb=1-7&_nc_sid=5cd70e&_nc_ohc=Lwci4G5bp5AAX-1rNK1&_nc_ht=scontent-hou1-1.xx&oh=00_AfDrs8AblxtR4n-W-FwdBgubJl_H9ktcLsU7wAfsv_dQpQ&oe=644B22EE",
28                "height": 720,
29                "width": 960
30              },
31              "viewer_image": {
32                "height": 768,
33                "width": 1024,
34                "uri": "https://scontent-hou1-1.xx.fbcdn.net/v/t39.30808-6/336264212_101824346200960_6964377692391995933_n.jpg?_nc_cat=100&ccb=1-7&_nc_sid=5cd70e&_nc_ohc=Lwci4G5bp5AAX-1rNK1&_nc_ht=scontent-hou1-1.xx&oh=00_AfCx1ddzmrBj6NUusFyHeC3FVbS6CKXk6vpfifr-NA9Zig&oe=644B22EE"
35              },
36              "id": "158116530471788",
37              "__isMedia": "Photo",
38              "photo_cix_screen": null,
39              "copyright_banner_info": null,
40              "accessibility_caption": "May be an image of leather",
41              "focus": {
42                "x": 0.5,
43                "y": 0.33
44              },
45              "owner": {
46                "__typename": "User",
47                "id": "100088203247851"
48              },
49              "__isNode": "Photo"
50            },
51            "url": "https://www.facebook.com/photo.php?fbid=158116530471788&set=gm.5764693966963114&type=3"
52          },
53          {
54            "deduplication_key": "ee499fb3dc9a91529974aa9f6121d32f",
55            "media": {
56              "__typename": "Photo",
57              "is_playable": false,
58              "image": {
59                "uri": "https://scontent-hou1-1.xx.fbcdn.net/v/t39.30808-6/336446233_625284332767236_4583409278292740172_n.jpg?_nc_cat=107&ccb=1-7&_nc_sid=5cd70e&_nc_ohc=iqJr1dGO_ogAX_0NPaa&_nc_ht=scontent-hou1-1.xx&oh=00_AfCzMh_GtwSB-ChAgha-0w2EWZqkGnCol3iwMU5CxWJq7g&oe=644B3837",
60                "height": 720,
61                "width": 960
62              },
63              "viewer_image": {
64                "height": 720,
65                "width": 960,
66                "uri": "https://scontent-hou1-1.xx.fbcdn.net/v/t39.30808-6/336446233_625284332767236_4583409278292740172_n.jpg?_nc_cat=107&ccb=1-7&_nc_sid=5cd70e&_nc_ohc=iqJr1dGO_ogAX_0NPaa&_nc_ht=scontent-hou1-1.xx&oh=00_AfCzMh_GtwSB-ChAgha-0w2EWZqkGnCol3iwMU5CxWJq7g&oe=644B3837"
67              },
68              "id": "158116583805116",
69              "__isMedia": "Photo",
70              "photo_cix_screen": null,
71              "copyright_banner_info": null,
72              "accessibility_caption": "May be an image of leather",
73              "focus": {
74                "x": 0.5,
75                "y": 0.33
76              },
77              "owner": {
78                "__typename": "User",
79                "id": "100088203247851"
80              },
81              "__isNode": "Photo"
82            },
83            "url": "https://www.facebook.com/photo.php?fbid=158116583805116&set=gm.5764693980296446&type=3"
84          },
85          {
86            "deduplication_key": "d407d0d54d13bd745cb18032e3bfb708",
87            "media": {
88              "__typename": "Photo",
89              "is_playable": false,
90              "image": {
91                "uri": "https://scontent-hou1-1.xx.fbcdn.net/v/t39.30808-6/336234431_889361365613919_4464042913417039303_n.jpg?stp=dst-jpg_p720x720&_nc_cat=109&ccb=1-7&_nc_sid=5cd70e&_nc_ohc=liyrjoqzh7IAX_J_2Yg&_nc_ht=scontent-hou1-1.xx&oh=00_AfAU9Uv2yW6O4maVaoYjWpjrFev9d8HMmoTuK_IlGY9Fsg&oe=644BD292",
92                "height": 720,
93                "width": 960
94              },
95              "viewer_image": {
96                "height": 768,
97                "width": 1024,
98                "uri": "https://scontent-hou1-1.xx.fbcdn.net/v/t39.30808-6/336234431_889361365613919_4464042913417039303_n.jpg?_nc_cat=109&ccb=1-7&_nc_sid=5cd70e&_nc_ohc=liyrjoqzh7IAX_J_2Yg&_nc_ht=scontent-hou1-1.xx&oh=00_AfAgQ3Be632U7L5lyOAg85xHpEJM_zzs9Xc4g6ZJhDcGdQ&oe=644BD292"
99              },
100              "id": "158116620471779",
101              "__isMedia": "Photo",
102              "photo_cix_screen": null,
103              "copyright_banner_info": null,
104              "accessibility_caption": "No photo description available.",
105              "focus": {
106                "x": 0.5,
107                "y": 0.33
108              },
109              "owner": {
110                "__typename": "User",
111                "id": "100088203247851"
112              },
113              "__isNode": "Photo"
114            },
115            "url": "https://www.facebook.com/photo.php?fbid=158116620471779&set=gm.5764693970296447&type=3"
116          },
117          {
118            "deduplication_key": "4733cb8e1f609221928315958ea51bb4",
119            "media": {
120              "__typename": "Photo",
121              "is_playable": false,
122              "image": {
123                "uri": "https://scontent-hou1-1.xx.fbcdn.net/v/t39.30808-6/336667789_1652797935150959_6266386453042740413_n.jpg?stp=dst-jpg_p720x720&_nc_cat=101&ccb=1-7&_nc_sid=5cd70e&_nc_ohc=fDUWATsUVfUAX_a3BYT&_nc_ht=scontent-hou1-1.xx&oh=00_AfBfmaCFR6T-D1N_00LhFmPRIK7DtgJ2dhAI64Mj_QvdkA&oe=644ACFDF",
124                "height": 720,
125                "width": 960
126              },
127              "viewer_image": {
128                "height": 768,
129                "width": 1024,
130                "uri": "https://scontent-hou1-1.xx.fbcdn.net/v/t39.30808-6/336667789_1652797935150959_6266386453042740413_n.jpg?_nc_cat=101&ccb=1-7&_nc_sid=5cd70e&_nc_ohc=fDUWATsUVfUAX_a3BYT&_nc_ht=scontent-hou1-1.xx&oh=00_AfAYFM-riZUpsGySeuJ5TAwT4rBlA24FgbMU-Y1t-ol1Aw&oe=644ACFDF"
131              },
132              "id": "158116663805108",
133              "__isMedia": "Photo",
134              "photo_cix_screen": null,
135              "copyright_banner_info": null,
136              "accessibility_caption": "May be an image of leather",
137              "focus": {
138                "x": 0.5,
139                "y": 0.33
140              },
141              "owner": {
142                "__typename": "User",
143                "id": "100088203247851"
144              },
145              "__isNode": "Photo"
146            },
147            "url": "https://www.facebook.com/photo.php?fbid=158116663805108&set=gm.5764693983629779&type=3"
148          },
149          {
150            "deduplication_key": "e7d31b0e34996643be42717a5efca88d",
151            "media": {
152              "__typename": "Photo",
153              "is_playable": false,
154              "image": {
155                "uri": "https://scontent-hou1-1.xx.fbcdn.net/v/t39.30808-6/330051922_250246050666382_2390286419083183853_n.jpg?stp=dst-jpg_p720x720&_nc_cat=110&ccb=1-7&_nc_sid=5cd70e&_nc_ohc=T-BBZCh-7C8AX83C-7X&_nc_ht=scontent-hou1-1.xx&oh=00_AfASKa71V-gpULkx2wQbp1MPk8aZgAsqdk3ftcmrZ2tT0w&oe=644AEB79",
156                "height": 720,
157                "width": 960
158              },
159              "viewer_image": {
160                "height": 768,
161                "width": 1024,
162                "uri": "https://scontent-hou1-1.xx.fbcdn.net/v/t39.30808-6/330051922_250246050666382_2390286419083183853_n.jpg?_nc_cat=110&ccb=1-7&_nc_sid=5cd70e&_nc_ohc=T-BBZCh-7C8AX83C-7X&_nc_ht=scontent-hou1-1.xx&oh=00_AfAmtR2s36rbqhaqjmUGKqCHIx5vDc2zhUDjqgCdP3eIkg&oe=644AEB79"
163              },
164              "id": "158116720471769",
165              "__isMedia": "Photo",
166              "photo_cix_screen": null,
167              "copyright_banner_info": null,
168              "accessibility_caption": "No photo description available.",
169              "focus": {
170                "x": 0.5,
171                "y": 0.33
172              },
173              "owner": {
174                "__typename": "User",
175                "id": "100088203247851"
176              },
177              "__isNode": "Photo"
178            },
179            "url": "https://www.facebook.com/photo.php?fbid=158116720471769&set=gm.5764693986963112&type=3"
180          }
181        ]
182      },
183      "comet_product_tag_feed_overlay_renderer": null
184    }
185  ],
186  "likesCount": 5,
187  "sharesCount": 0,
188  "commentsCount": 21
189}]
190...

Do I need proxies to scrape Facebook hashtags?

If you run the scraper on the Apify platform, for successful Facebook scraping you will need residential proxies which are included in Apify's monthly Starter plan ($49).

For more details about how our pricing works, platform credits, proxies, and usage, see the platform pricing page.

Want to scrape Facebook Groups or Pages?

You can use the dedicated scrapers below if you want to scrape specific Facebook data. Each of them is built particularly for the relevant Facebook scraping case be it group posts, events, pages or images. Feel free to browse them:

👥 Facebook Groups Scraper🏞 Facebook Photos Scraper
💬 Facebook Comments Scraper📱 Facebook Pages Info Scraper
🕹 Facebook Games Scraper👀 Facebook Marketplace Scraper
🗓 Facebook Events Scraper📝 Facebook Posts Scraper
🚩 Facebook Pages Scraper🌟 Facebook Reviews Scraper
📢 Facebook Ads Scraper👍 Facebook Likes and Reactions Scraper
🕵️‍♀️ Facebook Search Scraperℹ️ Facebook Page Posts Checker

Integrations and Facebook Hashtag Scraper

Last but not least, Facebook Hashtag Scraper can be connected with almost any cloud service or web app thanks to integrations on the Apify platform. You can integrate with LangChain, Make, Trello, Zapier, Slack, Airbyte, GitHub, Google Sheets, Google Drive, Asana, and more.

You can also use webhooks to carry out an action whenever an event occurs, e.g., get a notification whenever Facebook Hashtag Scraper successfully finishes a run.

Using Facebook Hashtags Scraper with the Apify API

The Apify API gives you programmatic access to the Apify platform. The API is organized around RESTful HTTP endpoints that enable you to manage, schedule, and run Apify Actors. The API also lets you access any datasets, monitor Actor performance, fetch results, create and update versions, and more. To access the API using Node.js, use the apify-client NPM package. To access the API using Python, use the apify-client PyPI package.

Check out the Apify API reference docs for full details or click on the API tab for code examples.

Our Facebook scrapers are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. However, you should be aware that your results could contain personal data. You should not scrape personal data unless you have a legitimate reason to do so.

If you're unsure whether your reason is legitimate, consult your lawyers. You can also read our blog post on the legality of web scraping and ethical scraping.

Your feedback

We’re always working on improving the performance of our Actors. So if you’ve got any technical feedback for Facebook Hashtag Scraper or simply found a bug, please create an issue on the Actor’s Issues tab in Apify Console.

How many results can you scrape with Facebook Hashtag scraper?

Facebook Hashtag scraper can return around 200 results on average. However, you have to keep in mind that scraping facebook.com has many variables to it and may cause the results to fluctuate case by case. There’s no one-size-fits-all-use-cases number. The maximum number of results may vary depending on the complexity of the input, location, and other factors. Some of the most frequent cases are:

  • website gives a different number of results depending on the type/value of the input
  • website has an internal limit that no scraper can cross
  • scraper has a limit that we are working on improving

Therefore, while we regularly run Actor tests to keep the benchmarks in check, the results may also fluctuate without our knowing. The best way to know for sure for your particular use case is to do a test run yourself.

How much will scraping Facebook Hashtag cost you?

When it comes to scraping, it can be challenging to estimate the resources needed to extract data as use cases may vary significantly. That's why the best course of action is to run a test scrape with a small sample of input data and limited output. You’ll get your price per scrape, which you’ll then multiply by the number of scrapes you intend to do.

Watch this video for a few helpful tips. And don't forget that choosing a higher plan will save you money in the long run.

Not your cup of tea? Build your own scraper

Facebook Hashtag Scraper doesn’t exactly do what you need? You can always build your own! We have various scraper templates in Python, JavaScript, and TypeScript to get you started. Alternatively, you can write it from scratch using our open-source library Crawlee. You can keep the scraper to yourself or make it public by adding it to Apify Store (and find users for it).

Or let us know if you need a custom scraping solution.

Your feedback

We’re always working on improving the performance of our Actors. So if you’ve got any technical feedback for Facebook Hashtag Scraper or simply found a bug, please create an issue on the Actor’s Issues tab in Apify Console.

Developer
Maintained by Apify
Actor metrics
  • 342 monthly users
  • 22 stars
  • 99.9% runs succeeded
  • 20 hours response time
  • Created in Apr 2023
  • Modified 2 days ago