Merge, Dedup & Transform Datasets avatar

Merge, Dedup & Transform Datasets

Try for free

No credit card required

View all Actors
Merge, Dedup & Transform Datasets

Merge, Dedup & Transform Datasets

lukaskrivka/dedup-datasets
Try for free

No credit card required

The ultimate dataset processor. Extremely fast merging, deduplications & transformations all in a single run.

Do you want to learn more about this Actor?

Get a demo
SM

How to search for keywords in given dataset?

Closed

sensible_market opened this issue
6 months ago

Hi, I was told I can use your tool to do the following: I use facebook groups posts scraper tool on Apify and it produces a dataset. Now I want to search for several keywords within this dataset and to have an output of only found keywords information. I was told your tool can do this with the dataset, but i don't know how to use it, thanks

lukaskrivka avatar

Hello,

It requires writing a little bit of JavaScript to filter the data. The same can be achieved if you download the dataset and filter it locally using Excel.

Where should the keyword be in, the text of the post?

SM

sensible_market

5 months ago

Hi, I rather need JS code. The keywords should be searched in the text of the post, yes, thanks

lukaskrivka avatar

Hello,

I'm sorry for a late reply.

This is possible by adding this Post dedup transform function

1async (items, { Apify }) => {
2    const REQUIRED_KEYWORDS = ['election', 'protest']
3    return items.filter((item) => {
4        return REQUIRED_KEYWORDS.some((keyword) => item.text?.includes(keyword))
5    });
6}
Developer
Maintained by Apify

Actor Metrics

  • 164 monthly users

  • 54 stars

  • 97% runs succeeded

  • 3.6 days response time

  • Created in Apr 2020

  • Modified 2 months ago