foreign-sapphire
foreign-sapphire•3y ago

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

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
5 Replies
Oleg V.
Oleg V.•3y ago
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.
foreign-sapphire
foreign-sapphireOP•3y ago
Oh, that's very unfortunate 😦 Thank you so much still sir for answering. I appreciate it the assistance.
Oleg V.
Oleg V.•3y ago
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;
})
(items) => items.map((item) => {
const postItem = {
username: item.username,
externalUrl: item.externalUrl,
fullName: item.fullName,
}
return postItem;
})
And you will get required columns.
foreign-sapphire
foreign-sapphireOP•3y ago
Such a huge help sir! Thank you sooooo much for the extra assistance! Will use your code
Lukas Krivka
Lukas Krivka•3y ago
You can also pick columns in the Export button (advanced options)

Did you find this page helpful?