Discover/5ka API
live

5ka API5ka.ru

Access Pyaterochka's product catalog, real-time pricing, nutritional info, special offers, and store locations via the 5ka.ru API.

Endpoints
5
Updated
2mo ago

What is the 5ka API?

The 5ka.ru API covers Pyaterochka's grocery catalog across 5 endpoints, giving you access to product listings, category trees, per-product nutritional values, active promotions, and physical store locations. The get_products endpoint accepts keyword search, category filtering, price sorting, and store-scoped queries, while get_product_detail returns per-100g macronutrient breakdowns including proteins, fats, carbohydrates, and calories.

Try it

No input parameters required.

api.parse.bot/scraper/aae3e5f6-fa2a-444d-9fb9-c4bbdf7aced1/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/aae3e5f6-fa2a-444d-9fb9-c4bbdf7aced1/get_categories' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace 5ka-ru-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""
Pyaterochka (5ka.ru) API Client

This module provides a Python client for the Parse API to interact with
Pyaterochka (5ka.ru) product catalog, categories, pricing, and store information.

Get your API key from: https://parse.bot/settings
"""

import os
import requests
from typing import Optional, Any, Dict, List


class ParseClient:
    """Client for interacting with Pyaterochka Parse API."""

    def __init__(self, api_key: Optional[str] = None):
        """
        Initialize the Parse API client.

        Args:
            api_key: API key for authentication. If not provided, reads from PARSE_API_KEY env var.
        """
        self.base_url = "https://api.parse.bot"
        self.scraper_id = "ae4a3593-8723-4991-8373-5de87af48eed"
        self.api_key = api_key or os.getenv("PARSE_API_KEY")

        if not self.api_key:
            raise ValueError(
                "API key not provided. Set PARSE_API_KEY environment variable or pass it directly."
            )

    def _call(
        self, endpoint: str, method: str = "POST", **params
    ) -> Dict[str, Any]:
        """
        Make an API call to the Parse API.

        Args:
            endpoint: The API endpoint name.
            method: HTTP method (GET or POST).
            **params: Additional parameters for the request.

        Returns:
            Response data as a dictionary.
        """
        url = f"{self.base_url}/scraper/{self.scraper_id}/{endpoint}"
        headers = {"X-API-Key": self.api_key, "Content-Type": "application/json"}

        if method.upper() == "GET":
            response = requests.get(url, headers=headers, params=params)
        elif method.upper() == "POST":
            response = requests.post(url, headers=headers, json=params)
        else:
            raise ValueError(f"Unsupported HTTP method: {method}")

        response.raise_for_status()
        return response.json()

    def get_categories(self) -> Dict[str, Any]:
        """
        Fetch all top-level product categories.

        Returns:
            Dictionary containing categories with 'count' and 'results' fields.
        """
        return self._call("get_categories", method="GET")

    def get_products(
        self,
        query: Optional[str] = None,
        store_id: Optional[str] = None,
        page: int = 1,
        limit: int = 20,
        category_code: Optional[str] = None,
        order_by: Optional[str] = None,
    ) -> Dict[str, Any]:
        """
        Fetch a paginated list of products with optional filters.

        Args:
            query: Search keyword.
            store_id: Filter by store ID (SAP code).
            page: Page number (default: 1).
            limit: Number of items per page (default: 20).
            category_code: Filter by category ID/code.
            order_by: Field to sort by (e.g., 'price', '-price').

        Returns:
            Dictionary containing products with pagination info and 'results' field.
        """
        params = {
            "page": page,
            "limit": limit,
        }
        if query:
            params["query"] = query
        if store_id:
            params["store_id"] = store_id
        if category_code:
            params["category_code"] = category_code
        if order_by:
            params["order_by"] = order_by

        return self._call("get_products", method="GET", **params)

    def get_product_detail(self, product_id: str) -> Dict[str, Any]:
        """
        Fetch full detail for a single product, including nutritional values.

        Args:
            product_id: Unique product ID (PLU).

        Returns:
            Dictionary containing product details including nutritional information.
        """
        return self._call("get_product_detail", method="GET", product_id=product_id)

    def get_special_offers(
        self, store_id: Optional[str] = None, page: int = 1, limit: int = 20
    ) -> Dict[str, Any]:
        """
        Fetch products currently on sale or promotion.

        Args:
            store_id: Store ID (SAP code).
            page: Page number (default: 1).
            limit: Number of items per page (default: 20).

        Returns:
            Dictionary containing promotional products with 'results' field.
        """
        params = {
            "page": page,
            "limit": limit,
        }
        if store_id:
            params["store_id"] = store_id

        return self._call("get_special_offers", method="GET", **params)

    def get_stores(self) -> Dict[str, Any]:
        """
        Fetch store locations and details.

        Returns:
            Dictionary containing store information with 'results' field.
        """
        return self._call("get_stores", method="GET")


def main():
    """Demonstrate practical usage of the ParseClient."""
    # Initialize the client
    client = ParseClient()

    print("=" * 60)
    print("Pyaterochka (5ka.ru) API Client - Practical Usage Example")
    print("=" * 60)

    # Step 1: Get all available stores
    print("\n1. Fetching available stores...")
    stores_data = client.get_stores()
    stores = stores_data.get("results", [])
    print(f"   Found {len(stores)} stores")

    if stores:
        first_store = stores[0]
        print(f"   Example store: {first_store.get('address')} (ID: {first_store.get('id')})")
        store_id = str(first_store.get("id"))
    else:
        store_id = None
        print("   No stores found, proceeding without store filter")

    # Step 2: Get product categories
    print("\n2. Fetching product categories...")
    categories_data = client.get_categories()
    categories = categories_data.get("results", [])
    print(f"   Found {categories_data.get('count', 0)} categories")

    if categories:
        # Show first few categories
        for i, category in enumerate(categories[:3]):
            print(f"   - {category.get('name')} (ID: {category.get('id')})")

    # Step 3: Get special offers/promotions
    print("\n3. Fetching special offers and promotions...")
    params = {"limit": 5}
    if store_id:
        params["store_id"] = store_id
    offers_data = client.get_special_offers(**params)
    offers = offers_data.get("results", [])
    print(f"   Found {len(offers)} promotional items")

    if offers:
        print("\n   Promotional Products:")
        for offer in offers:
            regular_price = offer.get("price_regular")
            promo_price = offer.get("price_promo")
            discount = (
                ((regular_price - promo_price) / regular_price * 100)
                if regular_price
                else 0
            )
            print(
                f"   - {offer.get('name')}: {promo_price} ₽ (was {regular_price} ₽, -{discount:.0f}%)"
            )

    # Step 4: Search for products (e.g., dairy products)
    print("\n4. Searching for 'milk' products...")
    search_params = {"query": "milk", "limit": 5}
    if store_id:
        search_params["store_id"] = store_id
    search_results = client.get_products(**search_params)
    products = search_results.get("results", [])
    print(f"   Found {search_results.get('count', 0)} products matching 'milk'")

    # Step 5: Get details for each product from search
    if products:
        print("\n5. Fetching detailed information for search results...")
        for i, product in enumerate(products[:3]):
            product_id = str(product.get("id"))
            print(f"\n   Product {i + 1}: {product.get('name')}")
            print(f"   - Price: {product.get('price')} ₽")

            # Get detailed information including nutritional data
            try:
                detail = client.get_product_detail(product_id)
                nutritional = detail.get("nutritional_value", {})

                if nutritional:
                    print(
                        f"   - Nutritional Info (per 100g):"
                    )
                    print(
                        f"     • Calories: {nutritional.get('calories')} kcal"
                    )
                    print(
                        f"     • Proteins: {nutritional.get('proteins')} g"
                    )
                    print(
                        f"     • Fats: {nutritional.get('fats')} g"
                    )
                    print(
                        f"     • Carbohydrates: {nutritional.get('carbohydrates')} g"
                    )
            except Exception as e:
                print(f"   - Could not fetch details: {e}")

    # Step 6: Browse products by category with sorting
    if categories:
        sample_category = categories[0]
        category_id = str(sample_category.get("id"))
        print(f"\n6. Browsing products in category '{sample_category.get('name')}'...")

        params = {"category_code": category_id, "limit": 5, "order_by": "price"}
        if store_id:
            params["store_id"] = store_id

        category_products = client.get_products(**params)
        category_results = category_products.get("results", [])

        if category_results:
            print(f"   Found {category_products.get('count', 0)} products in this category")
            print("   Top 5 cheapest products in category:")
            for i, product in enumerate(category_results[:5], 1):
                print(
                    f"   {i}. {product.get('name')} - {product.get('price')} ₽"
                )
        else:
            print("   No products found in this category")

    print("\n" + "=" * 60)
    print("API Usage Example Complete!")
    print("=" * 60)


if __name__ == "__main__":
    main()
All endpoints · 5 totalmissing one? ·

Fetch all top-level product categories.

Input

No input parameters required.

Response
{
  "type": "object",
  "fields": {
    "next": "string (nullable)",
    "count": "integer",
    "results": "array of objects (id, parent_group, name, image_url)",
    "previous": "string (nullable)"
  },
  "sample": {
    "next": null,
    "count": 100,
    "results": [
      {
        "id": 1,
        "name": "Milk & Eggs",
        "image_url": "https://...",
        "parent_group": null
      }
    ],
    "previous": null
  }
}

About the 5ka API

Product Catalog and Search

The get_products endpoint returns a paginated list of Pyaterochka products. You can filter by category_code, pass a free-text query for keyword search, sort with order_by (e.g. price or -price), and scope results to a specific store using its SAP code via store_id. Responses include product id, name, price, and a nutritional_value object. Pagination is handled through page and limit parameters, with next and previous cursor URLs returned alongside a total count.

Product Detail and Nutrition

get_product_detail accepts a single product_id (PLU code) and returns the full record for that item: id, name, price, and a structured nutritional_value object containing proteins, fats, carbohydrates, and calories. This makes it suitable for building nutrition-tracking applications or enriching a product database with macro data at scale.

Categories, Promotions, and Stores

get_categories returns the full top-level category tree, where each entry includes an id, optional parent_group, name, and image_url. The category_code returned here maps directly to the filter parameter on get_products. get_special_offers exposes products currently under promotion, returning both the regular price and a promo_price for each item; results can be filtered by store_id and paginated. get_stores returns a list of Pyaterochka locations with each store's id, address, city, and geographic coordinates (lat, lon).

Reliability & maintenance

The 5ka API is a managed, monitored endpoint for 5ka.ru — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when 5ka.ru changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official 5ka.ru API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a grocery price tracker that monitors Pyaterochka product prices and flags drops using get_products with order_by=price.
  • Power a nutrition calculator app by pulling per-product macronutrient data (proteins, fats, carbohydrates, calories) from get_product_detail.
  • Aggregate active promotional deals across stores using get_special_offers filtered by store_id to compare promo prices.
  • Populate a store-locator feature with Pyaterochka branch addresses and GPS coordinates from get_stores.
  • Synchronize a category-browse interface by mapping get_categories results to product listings via the category_code filter on get_products.
  • Alert users to weekly promotions by diffing get_special_offers responses over time and surfacing new promo_price entries.
  • Research grocery assortment by querying get_products with a keyword and paginating through results to collect SKU-level data.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does 5ka.ru have an official public developer API?+
Pyaterochka does not publish an official public developer API or documented API portal for third-party use.
What does `get_special_offers` return, and can I filter it by region?+
get_special_offers returns products currently on promotion, including both the regular price and the discounted promo_price for each item. You can filter results to a specific store by passing its SAP code as store_id, which effectively gives you store-scoped deal data. Pagination is available via page and limit.
Does the API expose product reviews, ratings, or user-generated content?+
Not currently. The API covers catalog data, pricing, nutritional values, promotions, and store locations. You can fork it on Parse and revise to add an endpoint targeting product review or rating data.
Can I look up stores by city or geographic bounding box?+
get_stores returns all store locations at once with lat and lon fields for each record, but it does not accept filter parameters for city or geographic bounds. Client-side filtering by city name or proximity math against the coordinates is needed. You can fork the API on Parse and revise to add server-side geo filtering if needed.
How fresh is the pricing and promotional data?+
Prices and promotions reflect the state of the Pyaterochka catalog at the time of each request; there is no built-in caching layer that ages the data on Parse's side. Promotional offers at Pyaterochka typically rotate weekly, so polling get_special_offers regularly is advisable if you need timely deal data.
Page content last updated . Spec covers 5 endpoints from 5ka.ru.
Related APIs in Food DiningSee all →
perekrestok.ru API
Browse Perekrestok.ru's grocery catalog, search for products, view detailed information and customer reviews, and explore items organized by category. Get instant access to product details, pricing, and shopper feedback to help you find exactly what you need from Russia's leading supermarket chain.
vkusvill.ru API
Search and browse products from VkusVill, a Russian grocery retailer, including detailed product information, customer reviews, current offers, and category-filtered offer listings. Get real-time access to product categories, pricing, and availability across the store's full range of items.
krasnoeibeloe.ru API
Search for products from Krasnoe & Beloe, locate nearby shops across different cities, and check real-time stock availability to find what you need. View detailed product information and discover which stores have items in stock so you can plan your shopping trip efficiently.
online.metro-cc.ru API
Search and browse products from Russian METRO Cash & Carry online store with detailed attributes, pricing, and availability information. Explore product categories and look up specific items to compare features and find what you need.
kaufland.de API
Search for current deals and discounts at Kaufland Germany stores, viewing detailed pricing information and offer validity periods. Find nearby store locations and browse the latest promotional products all in one place.
megamarket.ru API
Search and browse products across MegaMarket.ru's catalog, view detailed product information with customer reviews, and explore catalog categories to discover items available on Sber's Russian marketplace. Get real-time search suggestions and product recommendations to help you find exactly what you're looking for.
silpo.ua API
Browse Silpo's complete product catalog by category or keyword search to compare prices and find items from Ukraine's leading online supermarket. Access the full category tree and retrieve detailed product listings with current pricing information to help you shop and make purchasing decisions.
checkers.co.za API
Search for groceries, browse product categories, and find Checkers store locations across South Africa all in one place. Get detailed product information, discover popular items, and locate the nearest store to shop conveniently.