Shopify API Get All Products | GraphQL API in Node.js (With Pagination)

Опубликовано: 01 Май 2026
на канале: Fayyaz Ahmed | Shopify Developer
299
6

Learn how to fetch all Shopify products using the GraphQL Admin API and save them into a JSON file — step by step in Node.js.
In this tutorial, you’ll discover how to connect to your Shopify store, handle cursor-based pagination, and export thousands of products (including variants, images, tags, and more) automatically.

We’ll start from scratch — get your total product count using the REST API, then fetch all product details via GraphQL with clean logs showing progress for each batch.
Finally, we’ll save the complete product data into a local JSON file that you can use for analysis, automation, or bulk editing.

What You’ll Learn

How to use Shopify GraphQL API in Node.js

Fetch all products with pagination

Combine REST + GraphQL for better control

Save Shopify product data into JSON

Fetch variants, tags, and images

Build scalable Shopify data automation

Tools & Libraries Used

Node.js

Axios

dotenv

Shopify Admin GraphQL API

REST API for product count


🕒 Chapters / Timestamps
Time Chapter
0:00 Intro — What we’re building
0:30 Get total product count using Shopify REST API
1:15 Setting up environment and API credentials
2:00 Writing the GraphQL query for products
3:00 Creating Node.js script to fetch all products
4:00 Understanding pagination and cursors
5:00 Logging progress: fetched vs remaining products
6:30 Saving products into JSON file
8:00 Fetching variants, images, and tags
10:00 Full run with 77,000+ products
12:00 Final results & next steps

Please connect with Me:
Please hire me on Upwork: https://www.upwork.com/freelancers/fa...
Please hire me on Fiverr: https://www.fiverr.com/fayyaz_raza