Get all products from Woocommerce using REST API

woocommerce rest api v3 get all products
woocommerce rest api get products by category
woocommerce api postman
woocommerce rest api plugin
woocommerce rest api example php
woocommerce wishlist rest api
woocommerce api key

I am trying to retrieve all products using rest api. I have read this question. I am using postman to make calls. Here is my query[posts_per_page] =-1

The query shows only 10 results.

This isn't the latest API endpoint:


You have to fetch page per page to get all the products:

$page = 1;
$products = [];
$all_products = [];
  try {
    $products = $wc->get('products',array('per_page' => 100, 'page' => $page));
  }catch(HttpClientException $e){
    die("Can't get products: $e");
  $all_products = array_merge($all_products,$products);
} while (count($products) > 0);

WooCommerce REST API Documentation, Hi, I would like to use the REST API to get ALL the products. By default the Search forums. Support � Plugin: WooCommerce � REST API get all products� Introduction. WooCommerce (WC) 2.6+ is fully integrated with the WordPress REST API. This allows WC data to be created, read, updated, and deleted using requests in JSON format and using WordPress REST API Authentication methods and standard HTTP verbs which are understood by most HTTP clients.

I was able to find the data using the following solution,[limit] =-1

REST API get all products, I was close to the answer here, but held back by being unfamiliar with how global Wordpress can be, and how that can be used to extend� Note: legacy REST API was found at WooCommerce > Settings > API prior to WooCommerce 3.4. Legacy REST API is deprecated and should be removed from WooCommerce soon, as alternative there’s a new REST API that is an integration the WordPress REST API, this the WooCommerce current REST API and it’s also enabled by default.

The filter parameter is no longer supported, see the Docs. So you really need to loop the pages.

Here is how to get all products in JavaScript (for a Gutenberg Block store):

let allProducts = [],
    page = 1

while (page !== false) {
    const products = yield actions.receiveProducts(`/wc-pb/v3/products?per_page=100&page=${page}`)

    if (products.length) {
        allProducts = allProducts.concat(products)
    } else {
        page = false // last page

return actions.setProducts(allProducts)

Getting all woocommerce products from REST API call in plugin , Steps to start using the WooCommerce API. Enable API access in WooCommerce. Add a API key with Read/Write access. Download an API client Insomnia. Connect to Insomnia with the API keys. Make your first GET request to view all orders. Make your first PUT request to update a single order. Learn how to get started using the WooCommerce API. Use the WooCommerce API to add, update, and delete orders, products, customers in your online store. Later in the tutorial, I include plenty of examples of GET and PUT requests that you can copy or modify on your own for your own use.




both seems to work, but to get certain number of products I'm using


put the number of products there. -1 for all products

How To Use The WooCommerce API Without Knowing How to Code, 1 write context requires WooCommerce v3.0+ and Product delete, boolean, write 1, Set to true to delete the bundled item with the specified ID. title, string, read write 1, Title of the bundled product to display instead of the original allowed_variations, array, read write 1, List of enabled� Introduction. Introduced in WooCommerce 2.1, the REST API allows WooCommerce data to be created, read, updated, and deleted using JSON format. Requirements

add code to function.php

function maximum_api_filter($query_params) {
    return $query_params;

add_filter('rest_product_collection_params', 'maximum_api_filter');

REST API Reference, Select Generate API Key, and WooCommerce creates API keys for that user. Now that keys have been generated, you should see Consumer Key and Consumer� Problem summary. I am trying to fetch all customers with POSTMAN using the latest woocommerce API (v3):. GET/customers Yet only a small segment is returned.The number of customers returned is 28 (X-WP-Total) which is much less than the 150+ customers I have in the system.

WooCommerce REST API, Ideally you'd use the pagination parameters to request exactly what you needed. On your site with 426 products, it sounds like there might be an error -- can you� I am using WooCommerce.NET wrapper class to communicate to WooCommerce API v2. I am trying to GetAll() the orders but it has a limit on returning 10 per page.. This is what I have so far:

Get all products � Issue #27 � kloon/WooCommerce-REST-API-Client , WooCommerce REST API – Create, Update or Remove Products To work with WooCommerce API you should have a consumer key and a print_r( $body ) or print_r( $api_response ) to view all parameters returned. Unlike the Woocommerce REST API, the client get() function either returns a stdClass object or as an associative array, depending on the value of the return_as_array option. If you still want JSON output, you just have to run the object(s) through json_encode().

Create, update, delete products with WooCommerce REST API, I have used WCMP rest api for getting all products by vendor. but it /wp-json/wc /v2/products/?vendor=[vendor_id] ” with using this api. Does it have any limitation on getting response from woocommerce for WCMP rest api? Overview All Products for WooCommerce Subscriptions (APfS) allows you to add subscription plans to existing products. It also introduces features that give customers more freedom to create and manage subscriptions. With APfS, customers can: Add subscription plans to existing products. Sell any product one-time, or on subscription. Add products to existing subscriptions. Purchase entire carts …