YouTube Scraper avatar
YouTube Scraper

Pricing

$5.00 / 1,000 videos

Go to Store
YouTube Scraper

YouTube Scraper

Developed by

Streamers

Maintained by Apify

YouTube crawler and video scraper. Alternative YouTube API with no limits or quotas. Extract and download channel name, likes, number of views, and number of subscribers.

4.6 (28)

Pricing

$5.00 / 1,000 videos

699

Monthly users

3k

Runs succeeded

>99%

Response time

2.4 days

Last modified

a day ago

GE

Dataset is not sorted

Open

GeorgS opened this issue
a month ago

Why the dataset comes in an unsorted way? I think I'm not the only one who needs the videos sorted by date. I tried this also by adding the dataset sort actor, but it didnt work - maybe because of the date format of youtube scraper...?

how can I sort the dataset for direct URL videos by date? doesn't matter how...

Sort by newest doesn't work by the way...

I would appreciate your help very much, thanks in advance

lukas.prusa avatar

Hi, thanks for opening this issue!

The data is scraped asynchronously, with multiple requests finishing simultaneously at different times, so by nature the dataset will be unsorted. We should hoverer add in a order field, which would keep track of the items index. We will add that in :)

In the meantime, consider using the Merge, Dedup & Transform Datasets utility Actor, to sort the dataset for you. Input it this sorting code in the postDedupTransformFunction function:

1async (items, { Apify }) => {
2    items.sort((a, b) => {
3        if (a.date < b.date) return -1;
4        if (a.date > b.date) return 1;
5        return 0;
6    });
7
8    return items;
9};

Also, make sure to set the parallelPushes to 1 to get your dataset sorted :)

I will keep you updated here, thanks!

Pricing

Pricing model

Pay per result 

This Actor is paid per result. You are not charged for the Apify platform usage, but only a fixed price for each dataset of 1,000 items in the Actor outputs.

Price per 1,000 items

$5.00