Avito.ma API & Scraper
Avito.ma API returns live Avito.ma data as clean JSON for avito.ma The primary endpoint, search, returns listings records including ad id, list id, title, description and price.
🤖 Using an AI assistant? Copy this link into ChatGPT / Claude / Cursor — it reads every endpoint and parameter instantly and tells you if this API fits your use case.
Developers reach for it when they need to read second-hand listings, asking prices, seller inventory and country-specific listing ids without maintaining one-off scraping code or separate API contracts. If you were about to build or fix a Avito.ma scraper, this API is the maintained alternative — it returns the same data as clean JSON, with the proxies, rotation and anti-bot handling already solved. This page covers the live example, request shape, response shape and available actions: search, detail, categories, locations. Every request uses the same ReefAPI envelope, one API key and one shared credit pool, so it fits alongside the rest of your data stack.
Real request and response JSON
Captured from the indexed primary action, search, on .
{
"method": "POST",
"url": "https://api.reefapi.com/avito-ma/v1/search",
"headers": {
"x-api-key": "$REEF_KEY",
"content-type": "application/json"
},
"body": {
"q": "iphone",
"category": 5010
}
}{
"ok": true,
"meta": {
"api": "avito-ma",
"endpoint": "search",
"mode": "live",
"latency_ms": 1653.4,
"record_count": 37,
"bytes": 866612,
"cache_hit": false,
"stop_reason": "limit_reached",
"country": "MA",
"site": "avito.ma",
"total": 15546,
"page": 1,
"has_more": true,
"next_page": 2,
"promoted_count": 6,
"project_count": 0,
"filters_applied": [
"q",
"category"
],
"resolved": {
"city": null,
"area": null,
"category_id": "5010",
"keyword": "iphone",
"ad_type": "sell"
},
"charged_credits": 1,
"version": "1.1.1",
"request_id": "b7a6e2e87c294eaf",
"queue_ms": 1.5,
"fetched_at": "2026-11-03T17:32:00.396Z"
},
"data": {
"listings": [
{
"ad_id": "78513323",
"list_id": "58964964",
"url": "https://www.avito.ma/fr/derb_ghallef/smartphone_et_téléphone/Apple_iPhone_Duo_256Go_58964964.htm",
"title": "Apple iPhone Duo 256Go",
"description": "Apple iPhone Duo 256Go\n\n..............................................\n\nAdresse : derb Ghalef, souk Ennajd - Casablanca\n\n..............................................\n\nLivraison à Casablanca le jour même\n\n..............................................\n\nLivraison partout au Maroc en 24h à 48h",
"price": 32000,
"price_display": "32000 DH",
"currency": "DH",
"price_matches_display": true,
"old_price": null,
"old_price_display": null,
"monthly_payment": null,
"ad_type": "SELL",
"ad_type_label": "à vendre",
"category_id": "5010",
"category_name": "Smartphone et Téléphone",
"category_path": [
{
"id": "[trimmed-depth]",
"name": "[trimmed-depth]"
},
{
"id": "[trimmed-depth]",
"name": "[trimmed-depth]"
},
{
"id": "[trimmed-depth]",
"name": "[trimmed-depth]"
}
],
"city_id": "5",
"city": "Casablanca",
"area_id": "219",
"area": "Derb Ghallef",
"address": null,
"latitude": null,
"longitude": null,
"posted_at": "2026-11-03T15:41:40Z",
"seller_type": "STORE",
"seller": {
"seller_id": "5045",
"name": "Citystore.ma",
"is_verified": false,
"is_ecommerce": null,
"registered_since": null,
"active_listings_count": null,
"logo": "https://content.avito.ma/stores/2e/2e59d4d2-490b-41e6-9922-f6d222a88a76.jpg",
"phone_verified": false,
"phone_contact_type": null,
"address": null,
"website": null
},
"phone": "[redacted-phone]",
"image": "https://content.avito.ma/classifieds/images/10157521501?t=images",
"images": [
"https://content.avito.ma/classifieds/images/10157521501?t=images",
"https://content.avito.ma/classifieds/images/10157521502?t=images",
"https://content.avito.ma/classifieds/images/10157521503?t=images"
],
"image_count": 5,
"is_premium": true,
"is_highlighted": false,
"is_urgent": false,
"is_hot_deal": false,
"is_promoted": true,
"offers_shipping": false,
"attributes": [
{
"id": "[trimmed-depth]",
"label": "[trimmed-depth]",
"value": "[trimmed-depth]",
"display": "[trimmed-depth]",
"unit": "[trimmed-depth]",
"section": "[trimmed-depth]",
"code": "[trimmed-depth]"
},
{
"id": "[trimmed-depth]",
"label": "[trimmed-depth]",
"value": "[trimmed-depth]",
"display": "[trimmed-depth]",
"unit": "[trimmed-depth]",
"section": "[trimmed-depth]",
"code": "[trimmed-depth]"
}
]
},
{
"ad_id": "78539293",
"list_id": "58988934",
"url": "https://www.avito.ma/fr/casablanca/smartphone_et_téléphone/Casablanca___Oulfa_58988934.htm",
"title": "Casablanca - Oulfa",
"description": "Je mets en vente un téléphone Apple iPhone duo de 256 Go, en état neuf. - Marque : Apple - Modèle : iPhone duo - Capacité de stockage : 256 Go - État du téléphone : neuf - Localisation : Casablanca",
"price": 29500,
"price_display": "29500 DH",
"currency": "DH",
"price_matches_display": true,
"old_price": null,
"old_price_display": null,
"monthly_payment": null,
"ad_type": "SELL",
"ad_type_label": "à vendre",
"category_id": "5010",
"category_name": "Smartphone et Téléphone",
"category_path": [
{
"id": "[trimmed-depth]",
"name": "[trimmed-depth]"
},
{
"id": "[trimmed-depth]",
"name": "[trimmed-depth]"
},
{
"id": "[trimmed-depth]",
"name": "[trimmed-depth]"
}
],
"city_id": "5",
"city": "Casablanca",
"area_id": null,
"area": null,
"address": null,
"latitude": null,
"longitude": null,
"posted_at": "2026-11-02T21:26:57Z",
"seller_type": "PRIVATE",
"seller": {
"seller_id": null,
"name": "zeyadالدار",
"is_verified": null,
"is_ecommerce": null,
"registered_since": null,
"active_listings_count": null,
"logo": null,
"phone_verified": false,
"phone_contact_type": null,
"address": null,
"website": null
},
"phone": "[redacted-phone]",
"image": "https://content.avito.ma/classifieds/images/10157706815?t=images",
"images": [
"https://content.avito.ma/classifieds/images/10157706815?t=images",
"https://content.avito.ma/classifieds/images/10157706816?t=images"
],
"image_count": 2,
"is_premium": true,
"is_highlighted": false,
"is_urgent": false,
"is_hot_deal": false,
"is_promoted": true,
"offers_shipping": false,
"attributes": [
{
"id": "[trimmed-depth]",
"label": "[trimmed-depth]",
"value": "[trimmed-depth]",
"display": "[trimmed-depth]",
"unit": "[trimmed-depth]",
"section": "[trimmed-depth]",
"code": "[trimmed-depth]"
},
{
"id": "[trimmed-depth]",
"label": "[trimmed-depth]",
"value": "[trimmed-depth]",
"display": "[trimmed-depth]",
"unit": "[trimmed-depth]",
"section": "[trimmed-depth]",
"code": "[trimmed-depth]"
}
]
},
{
"ad_id": "78136982",
"list_id": "58611634",
"url": "https://www.avito.ma/fr/marrakech/smartphone_et_téléphone/iPhone_16_Pro_Max__256_Go___94__Batterie_58611634.htm",
"title": "iPhone 16 Pro Max (256 Go) (94) Batterie",
"description": "Téléphone en très bon état, jamais ouvert et aucune pièce changée.",
"price": 8500,
"price_display": "8500 DH",
"currency": "DH",
"price_matches_display": true,
"old_price": null,
"old_price_display": null,
"monthly_payment": null,
"ad_type": "SELL",
"ad_type_label": "à vendre",
"category_id": "5010",
"category_name": "Smartphone et Téléphone",
"category_path": [
{
"id": "[trimmed-depth]",
"name": "[trimmed-depth]"
},
{
"id": "[trimmed-depth]",
"name": "[trimmed-depth]"
},
{
"id": "[trimmed-depth]",
"name": "[trimmed-depth]"
}
],
"city_id": "8",
"city": "Marrakech",
"area_id": null,
"area": null,
"address": null,
"latitude": null,
"longitude": null,
"posted_at": "2026-11-03T04:56:40Z",
"seller_type": "PRIVATE",
"seller": {
"seller_id": null,
"name": "Abderrahim",
"is_verified": null,
"is_ecommerce": null,
"registered_since": null,
"active_listings_count": null,
"logo": null,
"phone_verified": false,
"phone_contact_type": null,
"address": null,
"website": null
},
"phone": "[redacted-phone]",
"image": "https://content.avito.ma/classifieds/images/10154818290?t=images",
"images": [
"https://content.avito.ma/classifieds/images/10154818290?t=images",
"https://content.avito.ma/classifieds/images/10154818288?t=images",
"https://content.avito.ma/classifieds/images/10154818285?t=images"
],
"image_count": 6,
"is_premium": true,
"is_highlighted": false,
"is_urgent": false,
"is_hot_deal": false,
"is_promoted": true,
"offers_shipping": false,
"attributes": [
{
"id": "[trimmed-depth]",
"label": "[trimmed-depth]",
"value": "[trimmed-depth]",
"display": "[trimmed-depth]",
"unit": "[trimmed-depth]",
"section": "[trimmed-depth]",
"code": "[trimmed-depth]"
},
{
"id": "[trimmed-depth]",
"label": "[trimmed-depth]",
"value": "[trimmed-depth]",
"display": "[trimmed-depth]",
"unit": "[trimmed-depth]",
"section": "[trimmed-depth]",
"code": "[trimmed-depth]"
}
]
}
],
"projects": []
}
}What the Avito.ma API does
| Action | Description | Concrete use case | Key params |
|---|---|---|---|
| search | Search Avito.ma by keyword and/or category, narrowed by city, district, price range, seller type and Avito's own ad flags. Covers every vertical on the site — phones, cars, apartments, furniture, jobs, services — and returns Avito's own result page (about 35-38 rows) with the total, the price both as a number and as the string the card prints, the seller's profile and phone number as the card publishes them and that vertical's own attribute rows. Every filter is verified against Avito's own parse of the request, so a value Avito does not understand is reported instead of quietly returning the whole catalogue. `ad_type` picks the sale, rent, holiday-rent or flat-share tree of a category (1010 + rent = apartments to let) and every row is checked to be of that type. Avito's new-development project cards (no ad id, not bound by the district filter) come back separately in `projects[]`, never mixed into `listings[]`. Give at least one of `q` or `category`. | Price-intelligence teams call search to search Avito.ma by keyword and/or category, narrowed by city, district, price range, seller t…. | q, category, city, area, ad_type, ... |
| detail | One Avito.ma ad in full, by its `list_id` or by its address: title, the whole body text, price with the currency the ad publishes, category path, city and district, posting time, the complete photo gallery, the seller profile with its store id and listing count, the phone number the page publishes, and the ad's own attribute rows — storage and condition for a phone, year, mileage, gearbox and fuel for a car, rooms, surface and floor for an apartment. A removed or expired ad answers NOT_FOUND (Avito redirects it to a search page with HTTP 200, which this engine detects). | Classifieds aggregators call detail to get one Avito.ma ad in full, by its `list_id` or by its address. | list_id, url, lang |
| categories | The live Avito.ma category tree — an all-categories root plus the four sections (Avito Market, Immobilier, Véhicules, Entreprise) with every branch and leaf below them — 153 nodes, 140 distinct ids on 2026-11-03 (property leaves such as 1010 appear once in each of the sale, rent, flat-share and holiday-rent trees) — each with its id, its French name, its ad type (sell, let, vac_rent, co_rent), the `ad_type` value `search` needs to reach that exact node, and the url slug Avito uses for it. Use it to get the `category` id that `search` takes. | Resale and arbitrage tools call categories to get the live Avito.ma category tree. | lang |
| locations | Every city and town Avito.ma publishes — about 600 (595 on 2026-11-03) — with its id, the slug `search` takes, the live number of ads in it, and the districts inside it. This is the live filter block Avito builds its own city picker from, so the ad counts are current. | Lead-generation teams call locations to get every city and town Avito.ma publishes. | city, lang |
Call search from your stack
curl -X POST https://api.reefapi.com/avito-ma/v1/search \
-H "x-api-key: $REEF_KEY" \
-H "content-type: application/json" \
-d '{"q":"iphone","category":5010}'import os
import requests
REEF_KEY = os.environ["REEF_KEY"]
r = requests.post(
"https://api.reefapi.com/avito-ma/v1/search",
headers={"x-api-key": REEF_KEY},
json={
"q": "iphone",
"category": 5010
},
timeout=90,
)
print(r.json()["data"])const res = await fetch("https://api.reefapi.com/avito-ma/v1/search", {
method: "POST",
headers: {
"x-api-key": process.env.REEF_KEY,
"content-type": "application/json",
},
body: JSON.stringify({
"q": "iphone",
"category": 5010
}),
});
const { ok, data, meta, error } = await res.json();Ask your MCP-connected assistant: call reefapi.avito-ma.search with {"q":"iphone","category":5010}.Who uses this API and why
- Price-intelligence teams use Avito.ma to search Avito.ma by keyword and/or category, narrowed by city, district, price range, seller t….
- Classifieds aggregators use Avito.ma to get one Avito.ma ad in full, by its `list_id` or by its address.
- Resale and arbitrage tools use Avito.ma to get the live Avito.ma category tree.
- Lead-generation teams use Avito.ma to get every city and town Avito.ma publishes.
Questions developers ask before integrating
What is the Avito.ma API?
Avito.ma API is a ReefAPI endpoint group for avito.ma It returns live JSON through POST requests under /avito-ma/v1.
Is the Avito.ma API free to try?
Yes. ReefAPI starts with 1,000 free credits, no card required. Avito.ma calls use the same shared credit balance as every other ReefAPI engine.
Do I need an Avito.ma login or account?
No login to Avito.ma is needed for the API response. You call ReefAPI with your x-api-key header, and the playground can run live examples before you create a production key.
How fresh is the Avito.ma data?
The page example is captured from a live search call, and production requests fetch live data through ReefAPI rather than a static sample.
How many credits does the Avito.ma API use?
Avito.ma actions currently cost 1 credit per successful call. Failed or blocked calls are free. All APIs draw from one credit pool.
Can I call Avito.ma from an AI assistant or MCP client?
Yes. Connect ReefAPI once through MCP and your assistant can call avito-ma actions with the same key, credit pool and JSON envelope used by normal REST requests.
Is the Avito.ma API an Avito.ma scraper?
It is the managed alternative to a DIY Avito.ma scraper. Instead of building and maintaining your own scraper — proxies, headless browsers, captcha and constant breakage — you call one ReefAPI endpoint and get the same avito.ma back as clean JSON.
Why does my Avito.ma scraper keep getting blocked?
Most Avito.ma scrapers break on anti-bot defenses, rate limits and IP bans that need rotating residential proxies and browser fingerprinting to clear. ReefAPI handles all of that for you — no proxies, no captchas, no maintenance — and returns live JSON. Blocked calls are free.