Actor picture

Sort Dataset Items

lukaskrivka/sort-dataset-items

Add this actor as a webhook to your scraper to sort the dataset by index field

No credit card required

Author's avatarLukáš Křivka
  • Modified
  • Users2
  • Runs128
Actor picture
Sort Dataset Items

Dataset items are immutable but this actor will create a new dataset with ordered items. This is useful if you need to keep the same order as your Start URLs.

  1. Make sure that items from your scraper in your original dataset have an index property, e.g.
{
    index: 1,
    price: 2.35,
    title: 'my product',
    // your other data 
}
  1. Add this actor as a webhook to your scraper. URL: https://api.apify.com/v2/acts/lukaskrivka~sort-dataset-items/runs?token=YOUR_TOKEN (replace with your real token)
  2. After your scraper finishes, it will automatically launch this actor. Once this actor finishes, it will produce dataset with sorted items.

Memory

If you need to sort large dataset, you might need to increase memory of this actor. You can change default memory by making it into a task.

Industries

See how Sort Dataset Items is used in industries around the world