PHPackages                             oxcom/magento2-top-products - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. oxcom/magento2-top-products

ActiveMagento2-module[API Development](/categories/api)

oxcom/magento2-top-products
===========================

This is a module that extends Magento2 API to get list of TOP products.

v1.1.0(5y ago)73595LGPL-3.0PHPPHP &gt;=5.6

Since Oct 25Pushed 5y ago3 watchersCompare

[ Source](https://github.com/OxCom/magento2-top-products)[ Packagist](https://packagist.org/packages/oxcom/magento2-top-products)[ Docs](https://github.com/OxCom/magento2-top-products)[ RSS](/packages/oxcom-magento2-top-products/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (8)Dependencies (8)Versions (9)Used By (0)

Magento2 Top Products API
=========================

[](#magento2-top-products-api)

This is a module that extends Magento2 API to get list of TOP products by next filters:

- TOP selling products
- TOP Free products
- TOP Rated products

Top selling and free products are fetching from Magento2 reports.

Top rated products are fetching from Rates module and results are based on aggregated data.

Install
-------

[](#install)

```
$ composer require oxcom/magento2-top-products
$ bin/magento module:enable OxCom_MagentoTopProducts
$ bin/magento setup:upgrade
$ bin/magento setup:di:compile
```

API requests
------------

[](#api-requests)

`GET /V1/products/top/{type}` - Get list of top products by type. Where `type` can be:

- **selling** - TOP selling products
- **free** - TOP Free products
- **rated** - TOP Rated products

###### Search criteria params

[](#search-criteria-params)

**pageSize** - Page size

**currentPage** - Current page

**ratingCode** - filter by rating type. This options is related ony for `rated` type. Possible values can be found in `rating` table.

**period** - filter by period. This options is related only for `selling` or `free` type. Possible values are:

- yearly - annual report (default)
- monthly - monthly report
- daily - daily report

**filter\_groups** - As product search criteria this filter will allow you to process products collection with more requirements.

###### Search criteria examples:

[](#search-criteria-examples)

Filter top selling products by:

- period: daily
- price &gt; 10
- visibility = 4
- pageSize = 10
- currentPage = 2

```
$ curl -X GET \
  'https://example.com/rest/all/V1/products/top/selling?searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bfield%5D=visibility&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bvalue%5D=4&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bcondition_type%5D=eq&searchCriteria%5BpageSize%5D=10&searchCriteria%5BcurrentPage%5D=2&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B1%5D%5Bfield%5D=price&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B1%5D%5Bvalue%5D=10&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B1%5D%5Bcondition_type%5D=gt&searchCriteria%5Bperiod%5D=daily' \
  -H 'authorization: Bearer {api-token}' \
  -H 'cache-control: no-cache'
```

Filter top rated products by:

- ratingCode: Rating
- status = 2
- visibility = 4
- pageSize = 10
- currentPage = 2

```
$ curl -X GET \
  'https://example.com/rest/all/V1/products/top/rated?searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bfield%5D=visibility&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bvalue%5D=4&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bcondition_type%5D=eq&searchCriteria%5BpageSize%5D=10&searchCriteria%5BcurrentPage%5D=2&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B1%5D%5Bfield%5D=status&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B1%5D%5Bvalue%5D=1&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B1%5D%5Bcondition_type%5D=eq&searchCriteria%5BratingCode%5D=Rating' \
  -H 'authorization: Bearer {api-token}' \
  -H 'cache-control: no-cache'
```

Dependencies
------------

[](#dependencies)

This module is using exists functionality of next modules:

- **magento/module-catalog**
- **magento/module-review**
- **magento/module-sales**

Bugs and Issues
---------------

[](#bugs-and-issues)

Please, if You found a bug or something, that is not working properly, contact me and tell what's wrong. It's nice to have an example how to reproduce a bug, or any idea how to fix it in Your request. I'll take care about it ASAP.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

Established project with proven stability

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~195 days

Recently: every ~216 days

Total

7

Last Release

1949d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f3ee281d38daa8fe645f6db7ab48a482667b454e85381c69122d381bbac20e8?d=identicon)[OxCom](/maintainers/OxCom)

---

Tags

apimagento2magento2-moduleproducts-marketapimagento2top products

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/oxcom-magento2-top-products/health.svg)

```
[![Health](https://phpackages.com/badges/oxcom-magento2-top-products/health.svg)](https://phpackages.com/packages/oxcom-magento2-top-products)
```

###  Alternatives

[mollie/magento2

Mollie Payment Module for Magento 2

1121.6M10](/packages/mollie-magento2)[smile/elasticsuite

Magento 2 merchandising and search engine built on ElasticSearch

8044.5M33](/packages/smile-elasticsuite)[dotdigital/dotdigital-magento2-extension

Dotdigital for Magento 2

50374.2k18](/packages/dotdigital-dotdigital-magento2-extension)[opengento/module-category-import-export

This module add the capability to import and export the categories from the back-office.

119.1k](/packages/opengento-module-category-import-export)[mage-os/module-inventory-reservations-grid

Add a grid with the list of inventory reservations.

126.8k](/packages/mage-os-module-inventory-reservations-grid)[mage-os/module-admin-activity-log

The Admin Activity extension makes it easy to track all admin activity with comprehensive audit logging.

261.4k](/packages/mage-os-module-admin-activity-log)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
