#Help limit the number of Columns Extracted on "Instagram Profile Scraper Task"

1 messages · Page 1 of 1 (latest)

hollow onyx
#

Great day everyone. I'm not a programmer or developer and just using Apify to scrape Instagram Profiles. Whenever, I use Instagram Profile Scraper, it returns with 2000 columns of data which I don't really need. I only need it to scrape and only return 3-4 Columns (username, externalUrl, fullName). Can anyone please teach me how to set it up? It would be such a great help and I would greatly appreciate any assistance on this. Tried to chat with their support but been waiting now for hours to get a response. Thank you again in advance

livid hornet
#

Unfortunately, there is no such option to save only particular fields (Columns).
So each time, actor will scrape all available info (columns).
But you can use "Merge, Dedup & Transform Datasets" actor (https://apify.com/lukaskrivka/dedup-datasets) to post-process your dataset, and leave only needed columns.

hollow onyx
#

Oh, that's very unfortunate 😦 Thank you so much still sir for answering. I appreciate it the assistance.

livid hornet
#

if you use "Merge, Dedup & Transform Datasets" actor

in Input > "Transforming functions" > "Pre dedup transform function" use this code:

(items) => items.map((item) => {
  const postItem = {
    username: item.username,
    externalUrl: item.externalUrl,
    fullName: item.fullName,
  }
  return postItem;
})

And you will get required columns.

hollow onyx
#

Such a huge help sir! Thank you sooooo much for the extra assistance! Will use your code