WbAnalytics icon

WbAnalytics

n8n node to interact with WB API

Overview

This node interacts with a search analytics API to retrieve grouped search report data filtered and sorted by various criteria. It is designed to generate detailed reports on product search performance over specified time periods, allowing comparison between current and past periods.

Typical use cases include:

  • Monitoring how products rank in search results within an e-commerce platform.
  • Comparing search position trends over different date ranges.
  • Filtering reports by product IDs, brands, tags, or subject categories.
  • Sorting and paginating large sets of grouped search data for analysis.

For example, a user might request the top 130 product groups ranked by average search position during a recent week, filtering only certain brands and tags, and comparing these results against a previous period to identify trends.

Properties

Name Meaning
Current Period The date range representing the current period for which the search report is generated. JSON object with start and end dates.
Past Period The date range representing the past period used for comparison. Should be equal or shorter in length than the current period. JSON object with start and end dates.
Nm Ids List of product article numbers (WB-specific) to filter the report by. JSON array of numeric IDs.
Subject Ids List of subject category IDs to filter the report by. JSON array of numeric IDs.
Brand Names List of brand names to filter the report by. JSON array of strings.
Tag Ids List of tag IDs to filter the report by. JSON array of numeric IDs.
Order By Sorting parameters for the report. JSON object specifying the field to sort by (e.g., avgPosition) and the mode (asc or desc).
Position Cluster Filter products by their average search position cluster:
- all: all positions
- firstHundred: positions 1 to 100
- secondHundred: positions 101 to 200
- below: positions 201 and below
Limit Number of product groups to return in the response. Numeric value.
Offset Pagination offset indicating after which element to start returning data. Numeric value.

Output

The node outputs JSON data containing grouped search report information based on the provided filters and sorting. Each item in the output typically represents a group of products with aggregated search metrics such as average position, counts, and other relevant statistics.

If binary data were involved (not indicated here), it would represent downloadable report files or similar content, but this node focuses on structured JSON responses.

Dependencies

  • Requires access to the WB Analytics API or equivalent search analytics service.
  • Needs an API authentication token or key configured in n8n credentials to authorize requests.
  • The base URL and endpoints are derived from bundled Swagger/OpenAPI definitions.
  • Proper network connectivity to the external API endpoint.

Troubleshooting

  • Invalid Date Ranges: Ensure that the Past Period is not longer than the Current Period. Mismatched or incorrectly formatted dates may cause errors.
  • Empty Results: If filters like Nm Ids, Brand Names, or Tag Ids are too restrictive, the response may be empty. Try broadening filters.
  • Authentication Errors: Verify that the API key or token is correctly set up in n8n credentials and has sufficient permissions.
  • Pagination Issues: Incorrect Limit or Offset values may lead to unexpected subsets of data or no data. Adjust accordingly.
  • Sorting Errors: The Order By field must correspond to valid sortable fields supported by the API; otherwise, the request may fail.

Links and References

Discussion