api.parserdata.ru
Документация
Контакты
Партнеры
Вход
Регистрация
Еще

Получение цен из поисковой выдачи

мониторинг в реальном времени

1. Авторизация по ключу

Для передачи ключа, в запросе необходимо использовать HTTP заголовок с параметром Authorization. Authorization: Token xxxxxxxxxxxxxxxxxxxx

2. HTTP методы

POST - для создания таска GET - для получения информации

3. Создание таска

POST запрос по URL: https://apimarket.parserdata.ru/task/text-search/ В теле запроса необходимо передать город мониторинга и список названий товаров: 1. Город передается параметром region_ids (список городов), можно передать как один, так и несколько городов. 2. Названия товаров передаются параметром product_name в массиве site_products.
Пример передачи товаров 1 Тело запроса с названиями товаров, город мониторинга Москва: { "region_ids":[213], "site_products":[ {"product_name":"KN-980013"}, {"product_name":"KN-982501SL"}, {"product_name":"KN-9855SB"} ] }
Пример передачи товаров 2 Тело запроса с названиями товаров, город мониторинга Москва и Санкт-Петербург: { "region_ids":[213, 2], "site_products":[ {"product_name":"KN-980013"}, {"product_name":"KN-982501SL"}, {"product_name":"KN-9855SB"} ] }
Пример передачи товаров 3 Для дополнительной идентификации переданных товаров, возможно передать внутренний код или любые другие дополнительные данные вместе с товаром в параметре custom_field_1 (доступно до 5 custom_field по каждому товару). { "region_ids":[213, 2], "site_products":[ {"product_name":"KN-980013", "custom_field_1": "000001"}, {"product_name":"KN-982501SL", "custom_field_1": "000002", "custom_field_2": "акционный товар"}, {"product_name":"KN-9855SB"} ] }
Пример ответа на успешный запрос созданного таска: { "task_id": 123 } где 123, номер созданного таска

4. Проверка статуса таска

GET запрос по URL: https://apimarket.parserdata.ru/task/TASK_ID/text-search/?page=1 где TASK_ID, номер созданного таска Пример ответа, во время парсинга: { "count": 0, "next": null, "previous": null, "results": [ ], "status": "PARSING" }
Возможные статусы: SAVE_PRODUCTS – подготовка IN_PROGRESS – отправка PARSING – парсинг DONE – завершено

5. Получение результатов по таску

Проверку статуса у таска, рекомендуем проводить с задержкой в 1 секунду. При смене статуса на DONE, в теле ответа выводятся результаты, где: count – количество переданных названий товаров next – следующая страница с результатами (на одной странице 25 товаров) previous – предыдущая страница с результатами (если значение на странице null, вы находитесь на последней странице) results – массив с полученными данными status – статус задания
Пример ответа с данными после парсинга. Пример сокращен по количеству офферов для визуального удобства. В реальном ответе будут все офферы полученные на первой странице по каждому товару. По умолчанию предложения магазинов отсортированы от мин до макс по параметру price_min. Если необходимо отобразить предложения магазинов в порядке по популярности (сортировка маркета), необходимо добавить параметр ?sort=2 https://apimarket.parserdata.ru/task/TASK_ID/text-search/?sort=2&page=1 { "count": 50, "next": "https://apimarket.parserdata.ru/task/TASK_ID/text-search/?page=2", "previous": null, "results": [{ "site_product_name": "KN-980013", "site_product_url": "", "region_id": 213, "region_name": "Москва", "custom_fields": { "custom_field_1": "000001", "custom_field_2": null, "custom_field_3": null, "custom_field_4": null, "custom_field_5": null }, "price_min": "1747.0", "price_max": "2297.0", "price_avg": "2114.0", "bought_n_times": null, "viewed_n_times": null, "offers": [{ "price": 1747.0, "price_discount": null, "price_promo": null, "price_card": null, "price_min": 1747.0, "promo": null, "gift": null, "origin_shop_name": null, "shop_name": "Yoza", "shop_id": 378143, "buy_market": null, "delivery_cost": 350.0, "delivery_region": "Доставка из Москвы", "delivery_partner_type": null, "is_priority_region": true, "price_with_delivery_cost": 2097.0, "offer_name": "Ключ рожковый KNIPEX KN-980013 (13 мм) 130 мм", "offer_id": "...", "model_id": null, "url": "", "warranty": false, "on_stock": false, "weight": null }, { "price": 2297.0, "price_discount": null, "price_promo": null, "price_card": null, "price_min": 2297.0, "promo": null, "gift": null, "origin_shop_name": null, "shop_name": "ВДЛ-Электро", "shop_id": 170175, "buy_market": null, "delivery_cost": 300.0, "delivery_region": "Доставка из Москвы", "delivery_partner_type": null, "is_priority_region": true, "price_with_delivery_cost": 2597.0, "offer_name": "Ключ гаечный рожковый 13мм Knipex диэлектрический VDE 1000V (KN-980013)", "offer_id": "...", "model_id": null, "url": "", "warranty": false, "on_stock": false, "weight": null }, { "price": 2297.0, "price_discount": null, "price_promo": null, "price_card": null, "price_min": 2297.0, "promo": null, "gift": null, "origin_shop_name": null, "shop_name": "Магазин Knipex", "shop_id": 402494, "buy_market": null, "delivery_cost": 300.0, "delivery_region": "Доставка из Москвы", "delivery_partner_type": null, "is_priority_region": true, "price_with_delivery_cost": 2597.0, "offer_name": "Ключ гаечный рожковый KNIPEX KN-980013", "offer_id": "...", "model_id": null, "url": "", "warranty": true, "on_stock": true, "weight": null } ] }, { "site_product_name": "KN-982501SL", "site_product_url": "", "region_id": 213, "region_name": "Москва", "custom_fields": { "custom_field_1": "000002", "custom_field_2": "акционный товар", "custom_field_3": null, "custom_field_4": null, "custom_field_5": null }, "price_min": "998.0", "price_max": "998.0", "price_avg": "998.0", "bought_n_times": null, "viewed_n_times": null, "offers": [{ "price": 998.0, "price_discount": null, "price_promo": null, "price_card": null, "price_min": 998.0, "promo": null, "gift": null, "origin_shop_name": null, "shop_name": "ОНЛАЙН ТРЕЙД.РУ", "shop_id": 255, "buy_market": null, "delivery_cost": 0.0, "delivery_region": "Доставка из Москвы", "delivery_partner_type": null, "is_priority_region": false, "price_with_delivery_cost": 998.0, "offer_name": "Отвертка диэлектрическая KNIPEX 982501SL", "offer_id": "...", "model_id": null, "url": "", "warranty": true, "on_stock": true, "weight": null }, { "price": 998.0, "price_discount": null, "price_promo": null, "price_card": null, "price_min": 998.0, "promo": null, "gift": null, "origin_shop_name": null, "shop_name": "Магазин Knipex", "shop_id": 402494, "buy_market": null, "delivery_cost": 300.0, "delivery_region": "Доставка из Москвы", "delivery_partner_type": null, "is_priority_region": true, "price_with_delivery_cost": 1298.0, "offer_name": "Отвертка для винтов с крестообразным шлицем Pozidriv® KNIPEX 982501SL", "offer_id": "...", "model_id": null, "url": "", "warranty": true, "on_stock": true, "weight": null }, { "price": 998.0, "price_discount": null, "price_promo": null, "price_card": null, "price_min": 998.0, "promo": null, "gift": null, "origin_shop_name": null, "shop_name": "KNIPEX в России", "shop_id": 607135, "buy_market": null, "delivery_cost": 300.0, "delivery_region": "Доставка из Москвы", "delivery_partner_type": null, "is_priority_region": true, "price_with_delivery_cost": 1298.0, "offer_name": "Отвертка для винтов с крестообразным шлицем 982501SL", "offer_id": "...", "model_id": null, "url": "", "warranty": true, "on_stock": false, "weight": null } ] }, { "site_product_name": "KN-9855SB", "site_product_url": "", "region_id": 213, "region_name": "Москва", "custom_fields": null, "price_min": "1325.0", "price_max": 2397".0", "price_avg": "1892.5", "bought_n_times": null, "viewed_n_times": null, "offers": [{ "price": 1325.0, "price_discount": null, "price_promo": null, "price_card": null, "price_min": 1325.0, "promo": null, "gift": null, "origin_shop_name": null, "shop_name": "ВсеИнструменты.ру", "shop_id": 4106, "buy_market": null, "delivery_cost": 190.0, "delivery_region": "Доставка из Москвы", "delivery_partner_type": null, "is_priority_region": true, "price_with_delivery_cost": 1515.0, "offer_name": "Кабельный нож Knipex KN-9855SB", "offer_id": "...", "model_id": null, "url": "", "warranty": false, "on_stock": true, "weight": null }, { "price": 1844.0, "price_discount": null, "price_promo": null, "price_card": null, "price_min": 1844.0, "promo": null, "gift": null, "origin_shop_name": null, "shop_name": "TZE1.RU", "shop_id": 584493, "buy_market": null, "delivery_cost": 350.0, "delivery_region": "Доставка из Москвы", "delivery_partner_type": null, "is_priority_region": true, "price_with_delivery_cost": 2194.0, "offer_name": "Стриппер для коаксиала Knipex, 125 мм {KN-9855SB}", "offer_id": "...", "model_id": null, "url": "", "warranty": false, "on_stock": false, "weight": null }, { "price": 1862.0, "price_discount": null, "price_promo": null, "price_card": null, "price_min": 1862.0, "promo": null, "gift": null, "origin_shop_name": null, "shop_name": "KNIPEX в России", "shop_id": 607135, "buy_market": null, "delivery_cost": 300.0, "delivery_region": "Доставка из Москвы", "delivery_partner_type": null, "is_priority_region": true, "price_with_delivery_cost": 2162.0, "offer_name": "Резак для кабеля KNIPEX 98 52 KN-9855SB", "offer_id": "...", "model_id": null, "url": "", "warranty": true, "on_stock": false, "weight": null }, { "price": 1862.0, "price_discount": null, "price_promo": null, "price_card": null, "price_min": 1862.0, "promo": null, "gift": null, "origin_shop_name": null, "shop_name": "ВсеИнструменты.ру", "shop_id": 4106, "buy_market": null, "delivery_cost": 190.0, "delivery_region": "Доставка из Москвы", "delivery_partner_type": null, "is_priority_region": true, "price_with_delivery_cost": 2052.0, "offer_name": "Кабельный нож Knipex KN-9855SB", "offer_id": "...", "model_id": null, "url": "", "warranty": false, "on_stock": true, "weight": null }, { "price": 2065.0, "price_discount": null, "price_promo": null, "price_card": null, "price_min": 2065.0, "promo": null, "gift": null, "origin_shop_name": null, "shop_name": "KNIPEX в России", "shop_id": 607135, "buy_market": null, "delivery_cost": 300.0, "delivery_region": "Доставка из Москвы", "delivery_partner_type": null, "is_priority_region": true, "price_with_delivery_cost": 2365.0, "offer_name": "Нож для снятия изоляции KNIPEX 98 53 13 KN-9855", "offer_id": "...", "model_id": null, "url": "", "warranty": true, "on_stock": false, "weight": null }, { "price": 2397.0, "price_discount": null, "price_promo": null, "price_card": null, "price_min": 2397.0, "promo": null, "gift": null, "origin_shop_name": null, "shop_name": "KNIPEX в России", "shop_id": 607135, "buy_market": null, "delivery_cost": 300.0, "delivery_region": "Доставка из Москвы", "delivery_partner_type": null, "is_priority_region": true, "price_with_delivery_cost": 2697.0, "offer_name": "Стриппер для снятия изоляции с коаксиальных кабелей KNIPEX 16 60 05 SB KN-166005SB", "offer_id": "...", "model_id": null, "url": "", "warranty": true, "on_stock": false, "weight": null } ] } ], "status": "DONE" }
ПОПРОБОВАТЬ БЕСПЛАТНО