Skip to main content

ya-market-api codecov

Python3 client for public API of yandex market

Installation

# Sync only mode
pip install ya-market-api[sync]
# Async only mode
pip install ya-market-api[async]
# All modes
pip install ya-market-api[all]

Instantiating

There are several ways to work with the API (synchronous and asynchronous). Both interfaces have the same signatures, the only difference is the need to use async/await keywords.

from ya_market_api.sync_api import SyncAPI		# Sync mode
from ya_market_api.async_api import AsyncAPI		# Async mode


def main() -> None:
	api = SyncAPI.build(
		api_key="...",
		base_url=...,		# (optional) may be used for test circuits
		business_id=...,		# (optional) required for the Feedback API
		campaign_id=...,		# (optional) required for the Order API
	)

	# Do things here...


async def main() -> None:
	api = await AsyncAPI.build(
		api_key="...",
		base_url=...,		# (optional) may be used for test circuits
		business_id=...,		# (optional) required for the Feedback API
		campaign_id=...,		# (optional) required for the Order API
	)

	# Do things here...

	await api.close()

Where can I get api key?

See official docs.

Guide API

Get token info

# Sync mode
from ya_market_api.sync_api import SyncAPI


api = SyncAPI.build(...)
response = api.guide.get_token_info()

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/auth/getAuthTokenInfo

Get delivery services

# Sync mode
from ya_market_api.sync_api import SyncAPI


api = SyncAPI.build(...)
response = api.guide.get_delivery_services()

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/orders/getDeliveryServices

Guide Region API

Get region countries

# Sync mode
from ya_market_api.sync_api import SyncAPI


api = SyncAPI.build(...)
response = api.guide.region.get_region_countries()

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/regions/getRegionsCodes

Search region

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.guide.region.dataclass import RegionSearchRequest


api = SyncAPI.build(...)
request = RegionSearchRequest(name="Москва", limit=100, page_token=None)
response = api.guide.region.search_region(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/regions/searchRegionsByName

Get region info

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.guide.region.dataclass import RegionInfoRequest


api = SyncAPI.build(...)
request = RegionInfoRequest(region_id=1)
response = api.guide.region.get_region_info(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/regions/searchRegionsById

Get region children

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.guide.region.dataclass import RegionChildrenRequest


api = SyncAPI.build(...)
request = RegionChildrenRequest(region_id=1, page=1, page_size=10)
response = api.guide.region.get_region_children(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/regions/searchRegionChildren

Feedback API

Get feedback list

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.feedback.dataclass import FeedbackListRequest

from arrow import get


api = SyncAPI.build(...)
response = api.feedback.get_feedback_list()
# or
request = FeedbackListRequest(datetime_from=get(2025, 1, 1), date_to=get(2025, 1, 31))
response = api.feedback.get_feedback_list(request)

See signature of the FeedbackListRequest class and the docs to get info about all available params.

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/goods-feedback/getGoodsFeedbacks

Get feedback comment list

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.feedback.dataclass import FeedbackCommentListRequest


api = SyncAPI.build(...)
request = FeedbackCommentListRequest(feedback_id=512)
response = api.feedback.get_feedback_comment_list(request)

See signature of the FeedbackCommentListRequest class and the docs to get info about all available params.

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/goods-feedback/getGoodsFeedbackComments

Create feedback comment

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.feedback.dataclass import FeedbackCommentCreateRequest


api = SyncAPI.build(...)
request = FeedbackCommentCreateRequest.create(feedback_id=512, text="COMMENT_TEXT", parent_id=1024)
response = api.feedback.create_feedback_comment(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/goods-feedback/updateGoodsFeedbackComment

Update feedback comment

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.feedback.dataclass import FeedbackCommentUpdateRequest


api = SyncAPI.build(...)
request = FeedbackCommentUpdateRequest.create(feedback_id=512, comment_id=2048, text="COMMENT_TEXT")
response = api.feedback.update_feedback_comment(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/goods-feedback/updateGoodsFeedbackComment

Delete feedback comment

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.feedback.dataclass import FeedbackCommentDeleteRequest


api = SyncAPI.build(...)
request = FeedbackCommentDeleteRequest(id=512)
response = api.feedback.delete_comment_feedback(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/goods-feedback/deleteGoodsFeedbackComment

Skip feedback reaction

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.feedback.dataclass import FeedbackReactionSkipRequest


api = SyncAPI.build(...)
request = FeedbackReactionSkipRequest(feedback_ids=(64, 128, 256))
response = api.feedback.skip_feedback_reaction(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/goods-feedback/skipGoodsFeedbacksReaction

Offer API

Get offer list by business id

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.offer.dataclass import OfferListByBusinessRequest


api = SyncAPI.build(...)
response = api.offer.get_offer_list_by_business()
# or
request = OfferListByBusinessRequest(category_ids=[1, 2, 3], limit=10)
response = api.offer.get_offer_list_by_business(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/business-assortment/getOfferMappings

Campaign API

Get campaign list

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.campaign.dataclass import CampaignListRequest


api = SyncAPI.build(...)
response = api.campaign.get_campaign_list()
# or
request = CampaignListRequest(page=1)
response = api.campaign.get_campaign_list(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/campaigns/getCampaigns

Order API

(DEPRECATED) Get order

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.order.dataclass import OrderGetRequest


api = SyncAPI.build(...)
request = OrderGetRequest(order_id=...)
response = api.order.get_order(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/orders/getOrder

Get orders

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.order.dataclass import OrderListRequest


api = SyncAPI.build(...)
request = OrderListRequest(order_ids={...})
response = api.order.get_order_list(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/orders/getBusinessOrders

Question API

Get question list

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.question.dataclass import QuestionListRequest


api = SyncAPI.build(...)
response = api.question.get_question_list()
# OR
request = QuestionListRequest(...)
response = api.question.get_question_list(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/goods-questions/getGoodsQuestions

Get question answer list

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.question.dataclass import QuestionAnswerListRequest


api = SyncAPI.build(...)
request = QuestionAnswerListRequest(...)
response = api.question.get_question_answer_list(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/goods-questions/getGoodsQuestionAnswers

Create question answer

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.question.dataclass import QuestionAnswerCreateRequest


api = SyncAPI.build(...)
request = QuestionAnswerCreateRequest(question_id=..., text=...)
response = api.question.create_question_answer(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/goods-questions/updateGoodsQuestionTextEntity

Update question answer

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.question.dataclass import QuestionAnswerUpdateRequest


api = SyncAPI.build(...)
request = QuestionAnswerUpdateRequest(answer_id=..., text=...)
response = api.question.update_question_answer(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/goods-questions/updateGoodsQuestionTextEntity

Delete question answer

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.question.dataclass import QuestionAnswerDeleteRequest


api = SyncAPI.build(...)
request = QuestionAnswerDeleteRequest(answer_id=...)
response = api.question.delete_question_answer(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/goods-questions/updateGoodsQuestionTextEntity

Chat API

Get chat list

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.chat.dataclass import ChatListRequest


api = SyncAPI.build(...)
response = api.chat.get_chat_list()
# OR
request = ChatListRequest(...)
response = api.chat.get_chat_list(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/chats/getChats

Get chat

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.chat.dataclass import ChatGetRequest


api = SyncAPI.build(...)
request = ChatGetRequest(chat_id=...)
response = api.chat.get_chat(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/chats/getChat

Get chat message list

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.chat.dataclass import ChatMessageListRequest


api = SyncAPI.build(...)
request = ChatMessageListRequest(chat_id=...)
response = api.chat.get_chat_message_list(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/chats/getChatHistory

Get chat message

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.chat.dataclass import ChatMessageGetRequest


api = SyncAPI.build(...)
request = ChatMessageGetRequest(chat_id=..., message_id=...)
response = api.chat.get_chat_message(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/chats/getChatMessage

Create chat text-message

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.chat.dataclass import ChatMessageCreateTextRequest


api = SyncAPI.build(...)
request = ChatMessageCreateTextRequest(chat_id=..., message=...)
response = api.chat.create_chat_message_text(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/chats/sendMessageToChat

Create chat file-message

# Sync mode
from ya_market_api.sync_api import SyncAPI
from ya_market_api.chat.dataclass import ChatMessageCreateFileRequest


api = SyncAPI.build(...)

with open(".../image.png", mode="rb") as file:
	file_content = file.read()

request = ChatMessageCreateFileRequest(chat_id=..., file=file_content)
response = api.chat.create_chat_message_file(request)

Docs: https://yandex.ru/dev/market/partner-api/doc/ru/reference/chats/sendFileToChat

Metadata

Release files for ya-market-api 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ya-market-api 3.0.0
File Size Uploaded Provenance Actions
ya_market_api-3.0.0.tar.gz 178.2 kB With provenance Details for ya_market_api-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ya-market-api 3.0.0
File Interpreter ABI Platform Actions
ya_market_api-3.0.0-py3-none-any.whl Python 3 none any Details for ya_market_api-3.0.0-py3-none-any.whl

Total release size: 248.4 kB

Release files / ya_market_api-3.0.0.tar.gz

Download URL ya_market_api-3.0.0.tar.gz
Size 178.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f6e084051906a5436ca6d3004589205b082de03e9b45b727a5a0086c3b179c10
BLAKE2b-256 checksum
How to use checksums
eaa521f61b3e71abb15df488fe39691a8c33a65edc88439136c0384629f53b97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.

Transparency log

Release files / ya_market_api-3.0.0-py3-none-any.whl

Download URL ya_market_api-3.0.0-py3-none-any.whl
Size 70.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
05ed65c54d1ca9ed6fd4e790517cf970c73922c731467a96f50a33358274840f
BLAKE2b-256 checksum
How to use checksums
922aaced6451461d124c1de376183b574e3cf7a9e6bc817b6dc1e0604d12826c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.

Transparency log

Security for ya-market-api 3.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ya_market_api-3.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page