petrovich

n8n community node for searching products and reading prices/stock from petrovich.ru

Documentation

n8n-nodes-petrovich

n8n community node for low-volume product lookup on petrovich.ru.

The public storefront is protected by Qrator/captcha, so this package is built
around Petrovich JSON API responses instead of scraping HTML. Configure the API
base URL, search path, product path, city code, and optional API key in the
credential.

Nodes

  • Petrovich — standard workflow node. Resource Product, operations
    Search, Get Product, and Get Price and Stock.
  • Petrovich Product Card — reads one product by ID, code, path, or URL.
  • Petrovich Tool — the same lookups exposed as an n8n AI Agent tool.

Credentials

Petrovich API stores:

  • Storefront Base URL — defaults to https://petrovich.ru, used for product links.
  • API Base URL — defaults to https://api.petrovich.ru.
  • Search Path — defaults to /catalog/v5/search.
  • Product Path — defaults to /catalog/v5/products/{id}.
  • City Code — defaults to spb, used for regional price/stock lookup.
  • API Key — optional, sent as both Authorization: Bearer ... and X-Api-Key.
  • User Agent — browser-like User-Agent sent with requests.

If Petrovich provides a different endpoint version, update Search Path and
Product Path in credentials without changing node code.

Output

Search emits one item per product:

{
  "name": "Цемент М500 50 кг",
  "path": "/catalog/123/123456/",
  "url": "https://petrovich.ru/catalog/123/123456/",
  "productId": "123456",
  "code": "123456",
  "article": "ABC-1",
  "brand": "Петрович",
  "image": "https://petrovich.ru/images/123456.jpg",
  "price": 412.5,
  "priceText": "412.5 RUB",
  "currency": "RUB",
  "availability": "InStock",
  "availabilityText": "В наличии",
  "stock": 12,
  "unit": "шт",
  "raw": {}
}

Get Product adds:

{
  "description": "Портландцемент для строительных работ",
  "properties": [{ "name": "Вес", "value": "50 кг" }]
}

The normalizer accepts several common response shapes: products, items,
results, data.products, data.items, result.products, and
catalog.products.

Development

pnpm run build
pnpm test
pnpm run lint

Discussion