Avito.ma Scraper – Morocco Listings, Cars & Real Estate
Pricing
from $0.28 / 1,000 listing scrapeds
Avito.ma Scraper – Morocco Listings, Cars & Real Estate
Scrape Avito.ma (Avito Maroc) annonces: cars, real estate, phones, jobs and more. Prices, photos, descriptions, seller info and phone numbers as JSON/CSV/Excel. Filter by category, keyword, city and price.
Pricing
from $0.28 / 1,000 listing scrapeds
Rating
0.0
(0)
Developer
kata Kuri
Maintained by CommunityActor stats
0
Bookmarked
13
Total users
1
Monthly active users
a day ago
Last modified
Categories
Features
Share
Fast and reliable Apify actor that scrapes annonces from Avito.ma (Avito Maroc) — Morocco's largest classifieds marketplace. Get cars (voitures), real estate (immobilier), phones, jobs (emploi), services and more as clean JSON, CSV or Excel.
Features
- Two input modes: choose from 50+ predefined categories OR paste custom Avito.ma URLs
- Search filters: keyword, city, min/max price (applied in the URL and double-checked on the results)
- Full detail scraping: description, HD images, seller info, seller phone number (when the seller shows it), attributes
- Smart limits:
maxResultsstops scraping as soon as it is reached — no wasted requests - Works out of the box: Apify datacenter proxy is the default and works for Avito.ma; with the RESIDENTIAL group selected, only requests the datacenter proxy cannot fetch go over residential
- Honest runs: a run that gets blocked or finds nothing fails with a clear message instead of "succeeding" with an empty dataset
- Live progress in the run status message (pages, listings pushed / max)
- Structured JSON output ready for analysis
Pricing
Simple all-in pay-per-event pricing — platform usage and proxy are included, nothing else is billed:
- $0.40 per 1,000 listings ($0.0004 per result)
- From 3 Dec 2026: listing details +$1.00 per 1,000 (
scrapeDetails, the default: full description, all photos, phone, seller info and every attribute) — so $1.40 per 1,000 listings with details - $0.002 per run start (the actor runs in 512 MB by default)
- Lower prices on paid Apify plans (up to 30% off)
Example: 1,000 listings with full details = $0.002 + $0.40 + $1.00 = $1.40 (until 2 Dec 2026: $0.40). Without details: $0.40. That is still about 3x cheaper than other Avito.ma scrapers ($4–5 per 1,000). Use maxResults to cap your cost; the run also stops cleanly at your maximum charge per run. Listings whose details could not be loaded are returned with basic data and are not charged the details price. If a run returns 0 listings it is marked as failed.
Input
Categories & URLs
| Parameter | Type | Default | Description |
|---|---|---|---|
categories | string[] | — | Select from 50+ predefined Avito.ma categories |
categoryUrls | string[] | — | Paste any avito.ma category/search URLs directly (other domains are rejected) |
At least one of categories or categoryUrls is required. You can use both together.
Search Filters
| Parameter | Type | Default | Description |
|---|---|---|---|
searchKeyword | string | — | Filter by keyword (e.g. "iphone 15", "mercedes") |
city | string | — | Filter by city (e.g. "Casablanca", "Rabat", "Fès") |
minPrice | integer | — | Minimum price in MAD (listings without a price are excluded when a price filter is set) |
maxPrice | integer | — | Maximum price in MAD (must be >= minPrice) |
sortBy | string | — | Ignored: Avito.ma always lists the newest ads first and has no sort option in its URLs |
The city filter is applied to nationwide URLs (/fr/maroc/...). For custom URLs that already target a city, the city is not changed.
Scraping Limits
| Parameter | Type | Default | Description |
|---|---|---|---|
maxResults | integer | unlimited | Stop after this many results (across all URLs) |
maxPages | integer | 5 | Max pages per category (~38 listings/page) |
scrapeDetails | boolean | true | Fetch each listing's details (description, all photos, phone, attributes). From 3 Dec 2026: +$1.00 per 1,000 listings |
maxConcurrency | integer | 5 | Parallel requests (1-20) |
proxyConfiguration | object | {"useApifyProxy": true} | Apify proxy settings. Datacenter proxy works and is the default. With the RESIDENTIAL group, requests still start on datacenter and fall back to residential when blocked |
Example Input
{"categories": ["smartphones", "ordinateurs-portables"],"searchKeyword": "iphone 15","city": "Casablanca","minPrice": 5000,"maxPrice": 15000,"maxResults": 50,"maxPages": 10,"scrapeDetails": true,"proxyConfiguration": {"useApifyProxy": true}}
Output
Each result contains:
| Field | Type | Description |
|---|---|---|
avitoId | string | Unique Avito listing ID |
title | string | Listing title |
price | number | Price value |
currency | string | Currency (MAD) |
city | string | City name |
location | string | Area and city, e.g. "Hay Riad, Rabat" |
category | string | Category name |
description | string | Full description |
images | string[] | Image URLs (HD when available) |
imageUrl | string | First image URL |
details | object | Category-specific attributes |
sellerName | string | Seller display name |
sellerPhone | string | Seller phone number; null when the seller hides it |
sellerId | string | Seller Avito ID |
sellerProfileUrl | string | Seller profile URL (shops/stores when available) |
sellerMemberSince | string | Year seller joined |
sellerLocation | string | Seller location |
sellerTotalListings | number | Seller's total active ads |
listingUrl | string | Direct link to listing |
publishedAt | string | ISO date with detail pages; relative text such as "il y a 2 heures" in basic mode |
scrapedAt | string | Scrape timestamp (ISO 8601) |
_completeness | string | full (details loaded, charged as listing details from 3 Dec 2026) or basic (category-page data only, also used if the details could not be loaded) |
Example Output
{"avitoId": "59080409","title": "iPhone 8 normal","price": 750,"currency": "MAD","city": "Agadir","location": "Autre secteur, Agadir","category": "Smartphone et Téléphone","description": "iPhone 8 en bon état...","images": ["https://content.avito.ma/classifieds/images/..."],"imageUrl": "https://content.avito.ma/classifieds/images/...","details": { "Marque": "Apple", "Modèle": "iPhone 8", "Capacité de Stockage": "64 GB" },"sellerName": "Mouhcine","sellerPhone": "0600960524","sellerId": "10434202","listingUrl": "https://www.avito.ma/fr/autre_secteur/smartphone_et_téléphone/iPhone_8_normal_59080409.htm","publishedAt": "2026-11-15T16:29:05Z","scrapedAt": "2026-11-15T16:40:00.000Z","_completeness": "full"}
Use cases
- Price monitoring of cars, phones or apartments in Morocco
- Real estate market research: prices per city and neighbourhood (appartements, villas, terrains)
- Lead generation for dealers, agencies and service providers (annonces with seller contact)
- Resale / arbitrage: find under-priced items by category and city
- Datasets for analysis: Moroccan classifieds trends, listing volumes, seasonality
FAQ
Do I need a proxy? Yes on the Apify platform. The default Apify datacenter proxy works. Without a proxy Avito.ma serves a captcha / 403 and the run fails. If you select the RESIDENTIAL group, the actor still tries the datacenter proxy first and retries only blocked requests over residential (logged in the run log).
Why did my run fail with "0 listings"? Either Avito blocked the requests (the message says so; try the RESIDENTIAL proxy group or a lower maxConcurrency) or the search matched nothing (check the category, keyword, city and price). Failed requests are saved in the FAILED_REQUESTS record of the run's key-value store.
Why fewer results than maxResults? There were not enough matching listings within maxPages, or some requests failed. The run's status message tells you which.
Are phone numbers included? Yes, when the seller displays one on the ad (sellerPhone). Hidden numbers are null.
Can I scrape in French or Arabic? The actor uses the French site (/fr/). Annonces are returned in the language they were written in.
Mots-clés: Avito Maroc, annonces Maroc, scraper Avito, voitures à vendre Maroc, immobilier Maroc, appartements à louer, téléphones, emploi Maroc.
How It Works
- Resolves category slugs to Avito.ma URLs and applies filters (keyword, city, price)
- Loads the category pages over plain HTTP with browser-like headers and Apify Proxy sessions (a real Playwright browser is only used as a fallback)
- Extracts listing data from Next.js
__NEXT_DATA__(no HTML parsing — fast & reliable) - Paginates one page at a time up to
maxPages, stopping as soon asmaxResultsis reached - Optionally loads each listing's details (full description, HD images, seller info, attributes) from the same JSON data Avito.ma's own ad page is built from — about 2 KB per listing instead of a full page; if that fails the ad page itself is loaded, and if it keeps failing the listing is still returned with basic data
- Outputs structured JSON to the Apify dataset
Tips
- Keep the default proxy; switch to RESIDENTIAL only if you are blocked
- Set
scrapeDetails: falsefor faster runs when you only need basic listing info (seller name, phone and image are included there too) - Use
maxResultsto control costs — the scraper stops as soon as the limit is hit - Each category page has ~38 listings, so
maxPages=10gives ~380 results per URL - Combine
categorieswithsearchKeyword, city and price filters for precise targeting
Local development
npm installnpm test# run with your own Chrome instead of the Playwright browser (optional):LOCAL_CHROME_PATH="/path/to/chrome" apify run --purge --input '{"categories":["smartphones"],"maxResults":5,"proxyConfiguration":{"useApifyProxy":false}}'