WbAnalytics icon

WbAnalytics

n8n node to interact with WB API

Overview

This node interacts with a search analytics API to retrieve detailed report data about product search queries within specified time periods. It is designed to generate a table of search report details filtered and sorted by various criteria such as date ranges, product IDs, brand names, tags, and search position clusters.

Common scenarios for this node include:

  • Comparing search performance metrics between two time periods (current vs past).
  • Analyzing product visibility and ranking in search results.
  • Filtering products by brand, tag, or specific article numbers.
  • Sorting and paginating large sets of search data for reporting or dashboarding.

For example, a user might use this node to get the top 150 products ranked by average search position during a recent week, comparing it against the previous week to identify trends or changes in search visibility.

Properties

Name Meaning
Current Period The current date range for the report, specified as JSON with start and end dates. Example: { "start": "2024-02-10", "end": "2024-02-10" }.
Past Period The past date range for comparison, also JSON with start and end dates. The number of days must be less than or equal to the current period. Example: { "start": "2024-02-08", "end": "2024-02-08" }.
Subject Id Numeric ID representing the subject/category of products to filter the report by.
Brand Name String specifying the brand name of the products to include in the report.
Tag Id Numeric ID of a tag used to filter products in the report.
Nm Ids JSON array of numeric article numbers (WB product IDs) to specifically include in the report. Example: [162579635, 166699779].
Order By JSON object defining sorting parameters with fields: field (e.g., "avgPosition") and mode ("asc" or "desc"). Example: { "field": "avgPosition", "mode": "asc" }.
Position Cluster Option to 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 specifying how many products to return in the response.
Offset Number specifying the offset from which to start returning products (for pagination).

Output

The node outputs JSON data containing detailed search report table entries based on the input filters and sorting. Each entry typically includes product identifiers, search position metrics, and other relevant analytics fields as defined by the underlying API schema.

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

Dependencies

  • Requires an API key credential for authenticating with the WB Analytics API.
  • The node uses a base URL and OpenAPI specification bundled internally to construct requests.
  • No additional external dependencies beyond standard HTTP request capabilities and the provided API credentials.

Troubleshooting

  • Invalid Date Range: Ensure that the pastPeriod does not exceed the length of the currentPeriod. Mismatched or incorrectly formatted JSON dates may cause errors.
  • Missing Required Fields: Properties marked as required (e.g., currentPeriod, orderBy, positionCluster, limit, offset) must be provided; otherwise, the node will fail validation.
  • API Authentication Errors: Verify that the API key credential is correctly configured and has sufficient permissions.
  • Pagination Issues: Using an offset larger than the available dataset size may result in empty responses.
  • Incorrect Filter Values: Providing invalid IDs or brand names that do not exist in the system will yield no results.

Links and References

Discussion