Avito.ma Morocco Classifieds Search Scraper
Pricing
from $2.99 / 1,000 search listings
Avito.ma Morocco Classifieds Search Scraper
Extract detailed search results from Avito.ma - Morocco's premier classifieds platform. Supports vehicles, real estate, electronics, and more.
Pricing
from $2.99 / 1,000 search listings
Rating
0.0
(0)
Developer
w3crawler
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Features
Share
Collect structured public search results from Avito.ma, Morocco's classifieds marketplace. Each row captures the public listing identity, title, price and old price, monthly payment, location and city, category, images, seller details, vehicle parameters, publication flags, and the search context that produced it. The Actor starts with bounded direct HTTPS requests and supports standard Apify Proxy when direct access is blocked; it does not require an account, browser session, CAPTCHA solve, private API, or access-control bypass.
Get started
- Open the Actor Store page and select Try for free, or open the Input tab directly.
- Add public Avito.ma search or listing URLs to
startUrls. If you omit them, setquery,category, andcityso the Actor can build a search URL. - Keep
maxItemsandmaxPagessmall for the first run. LeavesaveDebugHtmldisabled unless you are debugging extraction. - Start the Actor, open the dataset, and export the rows as JSON, CSV, or Excel. Open Run summary (
OUTPUT) to check the counts and whether data was available.
Input
All fields are optional. The table defaults come from .actor/input_schema.json; the example JSON reflects the saved Casablanca run.
| Field | Type | Required? | Default | Meaning |
|---|---|---|---|---|
startUrls | object array | Optional | Not supplied | Up to 20 public Avito.ma URL objects. When supplied, they take precedence over query, category, and city. |
startUrls[].url | string | Required when a startUrls item is supplied | Not supplied | Absolute HTTPS Avito.ma search or listing URL, up to 600 characters. |
query | string | Optional | voiture | Keyword query used to build a search URL when startUrls is absent, up to 160 characters. |
category | string | Optional | annonces | Avito.ma category path used to build a search URL when startUrls is absent, up to 100 characters. |
city | string | Optional | maroc | Avito.ma location path used to build a search URL when startUrls is absent, up to 80 characters. |
maxItems | integer | Optional | 50 | Maximum unique listing rows emitted, from 1 to 500. |
maxPages | integer | Optional | 0 | Maximum public pages requested, from 0 to 20. 0 derives a bounded value from maxItems. When startUrls are supplied, each URL counts as one page and only the first maxPages URLs are requested. |
requestTimeoutSecs | integer | Optional | 30 | Timeout for each public page request, from 5 to 120 seconds. |
maxBytes | integer | Optional | 5000000 | Maximum accepted direct response or local fixture size, from 100,000 to 15,000,000 bytes. |
saveDebugHtml | boolean | Optional | false | Debug/QA only: save the first successful public search page HTML to the debug_html key-value store record, up to maxBytes. Leave disabled for normal collection. |
proxyConfiguration | object | Optional | Not supplied | Optional standard Apify Proxy editor object. Start without proxy and use ordinary proxy transport only when direct public access is blocked. |
Example input from the saved run (.actor/input.json):
{"startUrls": [{"url": "https://www.avito.ma/fr/casablanca/voitures"}],"query": "voiture","category": "voitures","city": "casablanca","maxItems": 10,"maxPages": 1,"requestTimeoutSecs": 30,"maxBytes": 5000000,"saveDebugHtml": false,"proxyConfiguration": {"useApifyProxy": false}}
The Actor requests public Avito.ma HTML over HTTPS. When startUrls is empty, the search URL is built from query, category, and city. With maxPages: 0, the effective page bound is ceil(maxItems / 30) + 1, capped at 20. URLs are de-duplicated before use, and source blocking, rate limits, CAPTCHA, login, and other access boundaries are reflected in OUTPUT counters and run logs rather than bypassed.
Output
The dataset contains one row per saved public search result. Values the source does not publish are omitted rather than inferred.
| Field | Type | Availability | Meaning |
|---|---|---|---|
id | string | Always | Stable listing identifier observed in the source data or derived from the listing URL. |
listingId | string | Always | Avito.ma listing identifier observed or derived from the public URL. |
listId | string | When published | Source list identifier for the classified ad. |
title | string | Always | Listing title reported by Avito.ma. |
url | string | Always | Canonical row URL observed on Avito.ma. |
listingUrl | string | Always | Listing URL observed in the ad link. |
position | integer | When published | One-based position of the result on its source page. |
adType | string | When published | Ad type label shown on the listing. |
description | string | When published | Public listing description. |
price | number | When published | Current public price. |
oldPrice | number | When published | Previous or crossed-out price when the source reports one. |
monthlyPayment | number | When published | Public monthly-payment amount when the listing shows financing. |
currency | string | When published | Currency reported by the source, normally DH. |
location | string | When published | Public location label. |
city | string | When published | Public city name. |
district | string | When published | Public district or neighborhood. |
category | string | When published | Public listing category. |
categoryId | string | number | When published | Source identifier for the category, returned as a string or number. |
parentCategory | string | When published | Parent category reported by the source. |
imageUrl | string | When published | Primary public image URL. |
imageUrls | string array | When published | Public image URLs reported for the listing. |
videoUrls | string array | When published | Public video URLs reported for the listing. |
sellerName | string | When published | Public seller or store name. |
sellerType | string | When published | Source seller type, such as STORE or PRIVATE. |
sellerPhone | string | When published | Seller phone only when the source publishes it. |
params | object | When published | Open object of source parameters; vehicle rows usually contain regdate, mileage_exact, bv, and fuel. |
publishedAt | string | When published | Public publication timestamp when the source exposes one. |
isPremium | boolean | When published | Whether the listing is marked premium. |
isUrgent | boolean | When published | Whether the listing is marked urgent. |
isHotDeal | boolean | When published | Whether the listing is marked as a hot deal. |
searchQuery | string | When published | Query recorded for the search that produced the row. |
searchUrl | string | Always | Public search URL used for the run. |
scrapedAt | string | Always | UTC timestamp when the record was saved. |
params is an open object: its keys are supplied by Avito.ma and vary by category, so the dataset schema does not fix a key list. In the saved vehicle rows, params contains regdate, mileage_exact, bv, and fuel. imageUrls and videoUrls are arrays of public URLs, and categoryId may be either a string or a number.
The 10-row saved run includes listId, description, location, city, category, sellerName, sellerType, params, isPremium, isUrgent, isHotDeal, position, and searchQuery in every row. price, monthlyPayment, currency, imageUrl, and imageUrls appear in nine rows; oldPrice appears in three. The example is a real saved row from the 2026-10-25 run, with all values complete.
{"id": "75397289","listingId": "75397289","listId": "56153271","title": "Clio 4 manuelle","listingUrl": "https://www.avito.ma/fr/2_mars/voitures_d_occasion/Clio_4_manuelle_56153271.htm","description": "Voiture en très bon état","price": 107000,"oldPrice": 78000,"monthlyPayment": 2219,"currency": "DH","location": "Casablanca","city": "Casablanca","category": "Voitures d'occasion","imageUrl": "https://content.avito.ma/classifieds/images/10156374841?t=images","imageUrls": ["https://content.avito.ma/classifieds/images/10156374841?t=images","https://content.avito.ma/classifieds/images/10156374844?t=images","https://content.avito.ma/classifieds/images/10156374843?t=images","https://content.avito.ma/classifieds/images/10156374842?t=images"],"sellerName": "LAVAGE AUTO SAAD","sellerType": "STORE","params": {"regdate": "2019","mileage_exact": "150,000 km","bv": "Manuelle","fuel": "Diesel"},"isPremium": false,"isUrgent": true,"isHotDeal": false,"url": "https://www.avito.ma/fr/2_mars/voitures_d_occasion/Clio_4_manuelle_56153271.htm","position": 5,"searchQuery": "voiture","searchUrl": "https://www.avito.ma/fr/casablanca/voitures","scrapedAt": "2026-10-25T20:53:58.199Z"}
Run summary
Run summary is stored separately from the dataset in the run's key-value store under OUTPUT.
| Field | Meaning |
|---|---|
status | Overall Actor run status. |
runStatus | Canonical run status; matches status. |
dataStatus | Completeness of the saved dataset rows: COMPLETE, PARTIAL, NO_RESULTS, or FAILED. |
datasetItems | Dataset items saved for the run. |
diagnosticItems | Diagnostic dataset rows; always 0 because diagnostics are not written to the dataset. |
diagnosticCount | Operational issues recorded for the run. |
errorCount | Errors recorded for the run. |
uniqueItems | Unique listing records counted after de-duplication. |
requestedPages | Pages requested from the source. |
found | Whether the source returned at least one usable result. |
dataAvailable | Whether source-backed data was saved. |
finishedAt | UTC time the summary was written. |
| Status | Data status | Meaning |
|---|---|---|
SUCCEEDED | COMPLETE | Eligible results were saved without an extraction problem. |
SUCCEEDED | PARTIAL | Some results were saved, but a later page or parse problem prevented a complete run. Saved rows remain available. |
SUCCEEDED | NO_RESULTS | The source completed cleanly and returned no matching results. |
FAILED | FAILED | A fatal error occurred before any usable result was saved. |
Example OUTPUT from the 2026-10-25 run:
{"status": "SUCCEEDED","runStatus": "SUCCEEDED","dataStatus": "COMPLETE","datasetItems": 10,"diagnosticItems": 0,"diagnosticCount": 0,"errorCount": 0,"uniqueItems": 10,"requestedPages": 1,"found": true,"dataAvailable": true,"finishedAt": "2026-10-25T20:53:58.743Z"}
Coverage and limitations
The Actor reads public Avito.ma search and listing HTML. It does not log in, call private APIs, solve CAPTCHAs, or bypass access controls. startUrls are treated as page targets: only the first maxPages URLs are used, so adding many URLs while leaving maxPages at 1 processes only the first one. When startUrls is empty, the Actor builds one URL per page from query, category, and city.
Search cards may omit prices, images, seller details, districts, or category identifiers. Missing values are omitted rather than estimated. oldPrice is uncommon, and a low maxItems can stop collection before later pages are read. Avito.ma can change its public page structure or block requests; those outcomes are summarized in OUTPUT and logs rather than turned into placeholder rows. saveDebugHtml writes raw page HTML for debugging and is not part of the normal dataset.
Usage and support
Cost depends on Apify compute, the number of requested pages, response size, retries, and any optional proxy use. Start with one page and maxItems around 10; confirm the field shape, then raise maxItems or maxPages. A maxPages value of 0 is convenient for larger runs because the page bound grows with the item limit. See the Actor's Pricing tab for current account rates.
Use the Actor Issues page to report a problem. Include the run ID, the input used, and the OUTPUT summary; do not include tokens, cookies, or private data. This Actor is not affiliated with or endorsed by Avito.ma. Use it only for public data and in accordance with Avito.ma's terms, robots guidance, and applicable law. Public listings can contain personal information; use the output only for lawful purposes.