Shopify Scraper avatar
Shopify Scraper
Try for free

No credit card required

View all Actors
Shopify Scraper

Shopify Scraper

pocesar/shopify-scraper
Try for free

No credit card required

Automate monitoring prices on the most popular solution for building online stores and selling products online. Crawl arbitrary Shopify-powered online stores and extract a list of all products in a structured form, including product title, price, description, etc.

The code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn mode

Node.js

Python

curl

1import { ApifyClient } from 'apify-client';
2
3// Initialize the ApifyClient with your Apify API token
4const client = new ApifyClient({
5    token: '<YOUR_API_TOKEN>',
6});
7
8// Prepare Actor input
9const input = {
10    "startUrls": [
11        {
12            "url": "https://www.decathlon.com"
13        }
14    ],
15    "maxRequestsPerCrawl": 10,
16    "proxyConfig": {
17        "useApifyProxy": true
18    },
19    "extendOutputFunction": async ({ data, item, product, images, fns, name, request, variants, context, customData, input, Apify }) => {
20      return item;
21    },
22    "extendScraperFunction": async ({ fns, customData, Apify, label }) => {
23     
24    },
25    "customData": {},
26    "maxConcurrency": 10,
27    "maxRequestRetries": 3
28};
29
30(async () => {
31    // Run the Actor and wait for it to finish
32    const run = await client.actor("pocesar/shopify-scraper").call(input);
33
34    // Fetch and print Actor results from the run's dataset (if any)
35    console.log('Results from dataset');
36    const { items } = await client.dataset(run.defaultDatasetId).listItems();
37    items.forEach((item) => {
38        console.dir(item);
39    });
40})();
Developer
Maintained by Community
Actor metrics
  • 87 monthly users
  • 98.1% runs succeeded
  • 11.5 days response time
  • Created in Jul 2021
  • Modified 10 months ago
Categories