Avito.ru API workflow: from a city name to a search page
A city search takes two calls:
- Call
avito-locationswith the city name inbody.queryand read theslugof the entry you want fromlocations. - Call
avito-searchwith that slug inbody.locationand the keyword inbody.query. - Read the matching rows from
listingsand checkhas_moreto see whether another page follows.
Major city names such as Москва also work directly in body.location, which saves the first call for the biggest cities. The region of each location entry tells which region a town belongs to, and location_id identifies the place.
Narrowing Avito.ru results with a category from the tree
A category confines a keyword search to one branch of the marketplace:
- Call
avito-categorieswith a fragment of the category name or path inbody.query. - Pick the node you want and take its path, its
node_idor its Russianname. - Send that value as
body.categorytoavito-search.
Paths read like telefony/mobilnye_telefony, and level with parent_node_id show where a node sits in the tree. When a keyword such as iphone should remain a plain keyword search, set body.category_detection to false so that Avito does not turn it into a category with filters.
From a search row to the full Avito.ru ad record
Search rows are summaries, so a full record needs a second call:
- Run
avito-searchand keep thead_idof each row of interest. - Call
avito-listingwith that value inbody.ad_id; the full ad URL works as well. - Read
status,expires_atandviewsto see whether the ad is still open and how often it was viewed, thenparamsanddescriptionfor the details.
Cars and apartments gain extra blocks in this record: vehicle for cars, and property for apartments. The market_estimate inside property carries estimated, lowest, highest and a verdict.
Paging through Avito.ru results within the 30-page window
Paging is driven by body.page and the 50 rows that each page holds:
- Start at page 1 and read
listings,countandhas_more. - Raise
body.pagewhilehas_moreshows another page, up to page 30. - Compare
totalwithpageable_totalto see how much of the match count paging can reach. - Tighten
body.price_min,body.price_maxorbody.categorywhen the window is too small, so that each query stays within its own 1,500 rows.
Keep body.sort and every filter identical between pages, because a changed filter or order starts a different result set.
Building a used-car price check with Avito.ru cars search
A price check for one model uses avito-cars-search with a few filters:
- Set
body.makeandbody.model, for exampletoyotaandcamry, since the year, mileage, fuel and drive filters depend onbody.make. - Add
body.condition, a year range inbody.year_minandbody.year_max, and a mileage ceiling inbody.mileage_max. - Set
body.sorttoprice_ascto start from the cheapest rows, or tomileage_ascoryear_desc. - Read
price,price_before_discountandparams_summaryfrom each row, then open the ad withavito-listingfor itsvehicleblock.
Dealer rows can carry a starting price, shown through price_is_from.
Searching Avito.ru real estate for rent or sale
A rental search needs a deal type and a place:
- Set
body.transactiontorent_longorrent_daily, andbody.locationto a slug such assankt-peterburg. - Narrow apartments with
body.rooms,body.area_min,body.area_maxand a rent ceiling inbody.price_max. - Set
body.seller_typetoowneroragencyfor rentals; for sales it takesprivate,developeroragency. - Read
price,price_periodandprice_per_unitfrom each row, and the nearby metro fromnearbyinsidelocation.
A purchase search sets body.transaction to sale and adds body.market, with secondary for resale and new_build for new buildings. Rooms, houses, land, garages and commercial property come from body.property_type, and for land, garages and commercial property the rent value of body.transaction covers both kinds of rent.
Using Avito.ru search suggestions in a search box
Suggestions help a search box before a full search runs:
- Send the text typed so far in
body.querytoavito-suggest. - Show the
queryof each entry insuggestions, and keep itscategory_idandfilters. - When a suggestion is chosen, run
avito-searchwith itsquery.
related_words offers further terms to show next to the suggestions. The typed text can be a partial word such as айфо. Suggestions carry no prices or pictures: they return completions, categories and filters, and the matching ad rows come from avito-search.
Keeping paid and unrelated rows out of an Avito.ru comparison
A comparison is cleaner when paid and unrelated rows are kept apart from the others:
- Leave
body.include_sponsoredat false so that paid rows are dropped, and readsponsored_droppedto see how many were removed. - Set it to true only when paid rows are wanted, and tell them apart with
is_promotedandpaid_services. - Leave
body.include_fallback_resultsat false so that unrelated ads do not pad an empty result, or set it to true to receive them separately infallback_results.
Choosing relevance for body.sort puts paid rows first, since that is Avito's own order.
Avito.ru in brief
Avito.ru groups its ads into top-level sections such as personal goods, transport, real estate, jobs and services, and it runs branded sections named Avito Auto, Avito Real Estate, Avito Jobs and Avito Services. Avito Delivery lets sellers ship goods to buyers: the buyer pays for delivery and collects the item at a pickup point, and the funds are held until the buyer accepts it.
Sellers can pay to raise a listing in search results for a day or a week with a visibility multiplier such as X2, X5 or X10, and colour highlighting and the enlarged XL card are other paid options. Private sellers can post free in many categories, while business listings have required a fee since 2015.
[
{
"body": {
"query": "казань"
}
},
{
"body": {
"query": "диван",
"location": "kazan",
"sort": "price_asc"
}
}
]
[
{
"body": {
"query": "диван",
"location": "moskva",
"category": "mebel_i_interer",
"page": 1
}
},
{
"body": {
"ad_id": "8341164961"
}
}
]
{
"body": {
"location": "moskva",
"make": "toyota",
"model": "camry",
"condition": "used",
"year_min": 2015,
"mileage_max": 150000,
"fuel": [
"petrol"
],
"sort": "price_asc"
}
}
{
"body": {
"transaction": "rent_long",
"location": "sankt-peterburg",
"property_type": "apartment",
"rooms": [
"1",
"2"
],
"area_min": 30,
"price_max": 60000,
"sort": "price_asc"
}
}
Server-side request template
This server-side template shows authentication and request identity using the first operation of this API. Choose the operation for your use case and check its current availability and price on the API page. After a timeout, resend the unchanged request with the same Idempotency-Key.
The gateway request is always POST.
Use a JSON object with the documented path, query, headers and body locations; omit unused locations. input.headers is JSON data for the operation, not browser request headers. Do not put credentials here. Keep body arrays, scalar values and null as documented; omission is different from null.
# Server-side only. Set KAKIAPI_API_KEY in your secret manager.
# Every gateway operation is called with POST.
# Only operations shown as enabled on the API page can be called.
# Generate once per intent; retain the same value on status checks.
REQUEST_ID="$(uuidgen)"
curl --request POST 'https://kakiapi.com/api/v1/avito/avito-cars-search' \
--header "Content-Type: application/json" \
--header "x-api-key: $KAKIAPI_API_KEY" \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"body":{"location":"moskva","make":"toyota"}}'Integration checklist
- The API key is stored in a server-side secret manager and never sent to a browser.
- Each request carries its own Idempotency-Key, kept until the request has a final answer.
- The integration reads ok and error.code and handles each error code as the error table describes.
- An uncertain POST is inspected using its original identity, never blindly repeated with a new one.
- The operation’s current availability and price have been checked on its API page.
Avito.ru API overview and prices · Read the API reference · Try it in the playground