Facebook Posts Scraper avatar
Facebook Posts Scraper
Try for free

7 days trial then $35.00/month - No credit card required now

View all Actors
Facebook Posts Scraper

Facebook Posts Scraper

apify/facebook-posts-scraper
Try for free

7 days trial then $35.00/month - No credit card required now

Extract data from hundreds of Facebook posts from one or multiple Facebook pages and profiles. Get post URL, post text, page or profile URL, timestamp, number of likes, shares, comments, and more. Download the data in JSON, CSV, and Excel and use it in apps, spreadsheets, and reports.

Do you want to learn more about this Actor?

Get a demo
JO

Dataset no same number of columns

Closed

johnzhu1 opened this issue
2 months ago

I scrape different Facebook accounts with the same actor and requirements, but the output results are different. Some have 134 columns and other 2000 columns. How to download all files in the same number of columns so that I can unify them? (the merge actor does not work, because mismatch of data)

alexey avatar

Hi!

Columns amount is different for cases of shared posts and attached media. Just exclude both from output to reduce amount of columns and keep it "normal". Please share run which caused issue with columns amount and I will send you sample URL to illustrate how to filter out extra values.

JO

johnzhu1

2 months ago

Hi Alexey, Here are my runs:

  1. https://console.apify.com/view/runs/Fc3UWgzIkXyrY9av3 This first run has 19 results and 238 columns
  2. https://console.apify.com/view/runs/W9WXGRq74LDXlgjCg This second run has 10227 results and 2110 columns

I have 538 runs and they all have different column numbers. I need them to be in just one consistent number of columns so that I can combine them into one Excel. Will you please help me?

alexey avatar

Hi!

URL pattern (based on first run) is https://api.apify.com/v2/datasets/noCFS9fIkdUg2M8M1/items?clean=true&format=json&omit=media,pageAdLibrary,sharedPost - "format=json" to quick check results in browser, for CSV please use "format=csv"

For other runs replace dataset ID "noCFS9fIkdUg2M8M1" to what you see in Storage as dataset ID, i.e. for second run its https://api.apify.com/v2/datasets/SAcFVHw3uFIPu7tPX/items?clean=true&format=json&omit=media,pageAdLibrary,sharedPost

Last but not least: "media,pageAdLibrary,sharedPost" omitted however you might want keep shared post, so please try "media,pageAdLibrary" as well

alexey avatar

p.s. All options suggested above available also in interface of "Export dataset" dialog, so please use UI or custom URL, whatever works better for you

alexey avatar

I´m going to close the issue now, but if there would be anything else we could help with, please let us know.

Developer
Maintained by Apify
Actor metrics
  • 1.3k monthly users
  • 115 stars
  • 99.4% runs succeeded
  • 3.2 days response time
  • Created in Nov 2022
  • Modified 1 day ago