Avito.ma Morocco Classifieds Search Scraper avatar

Avito.ma Morocco Classifieds Search Scraper

Pricing

from $2.99 / 1,000 search listings

Go to Apify Store
Avito.ma Morocco Classifieds Search Scraper

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

w3crawler

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Features

Limited permissions

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

  1. Open the Actor Store page and select Try for free, or open the Input tab directly.
  2. Add public Avito.ma search or listing URLs to startUrls. If you omit them, set query, category, and city so the Actor can build a search URL.
  3. Keep maxItems and maxPages small for the first run. Leave saveDebugHtml disabled unless you are debugging extraction.
  4. 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.

FieldTypeRequired?DefaultMeaning
startUrlsobject arrayOptionalNot suppliedUp to 20 public Avito.ma URL objects. When supplied, they take precedence over query, category, and city.
startUrls[].urlstringRequired when a startUrls item is suppliedNot suppliedAbsolute HTTPS Avito.ma search or listing URL, up to 600 characters.
querystringOptionalvoitureKeyword query used to build a search URL when startUrls is absent, up to 160 characters.
categorystringOptionalannoncesAvito.ma category path used to build a search URL when startUrls is absent, up to 100 characters.
citystringOptionalmarocAvito.ma location path used to build a search URL when startUrls is absent, up to 80 characters.
maxItemsintegerOptional50Maximum unique listing rows emitted, from 1 to 500.
maxPagesintegerOptional0Maximum 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.
requestTimeoutSecsintegerOptional30Timeout for each public page request, from 5 to 120 seconds.
maxBytesintegerOptional5000000Maximum accepted direct response or local fixture size, from 100,000 to 15,000,000 bytes.
saveDebugHtmlbooleanOptionalfalseDebug/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.
proxyConfigurationobjectOptionalNot suppliedOptional 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.

FieldTypeAvailabilityMeaning
idstringAlwaysStable listing identifier observed in the source data or derived from the listing URL.
listingIdstringAlwaysAvito.ma listing identifier observed or derived from the public URL.
listIdstringWhen publishedSource list identifier for the classified ad.
titlestringAlwaysListing title reported by Avito.ma.
urlstringAlwaysCanonical row URL observed on Avito.ma.
listingUrlstringAlwaysListing URL observed in the ad link.
positionintegerWhen publishedOne-based position of the result on its source page.
adTypestringWhen publishedAd type label shown on the listing.
descriptionstringWhen publishedPublic listing description.
pricenumberWhen publishedCurrent public price.
oldPricenumberWhen publishedPrevious or crossed-out price when the source reports one.
monthlyPaymentnumberWhen publishedPublic monthly-payment amount when the listing shows financing.
currencystringWhen publishedCurrency reported by the source, normally DH.
locationstringWhen publishedPublic location label.
citystringWhen publishedPublic city name.
districtstringWhen publishedPublic district or neighborhood.
categorystringWhen publishedPublic listing category.
categoryIdstring | numberWhen publishedSource identifier for the category, returned as a string or number.
parentCategorystringWhen publishedParent category reported by the source.
imageUrlstringWhen publishedPrimary public image URL.
imageUrlsstring arrayWhen publishedPublic image URLs reported for the listing.
videoUrlsstring arrayWhen publishedPublic video URLs reported for the listing.
sellerNamestringWhen publishedPublic seller or store name.
sellerTypestringWhen publishedSource seller type, such as STORE or PRIVATE.
sellerPhonestringWhen publishedSeller phone only when the source publishes it.
paramsobjectWhen publishedOpen object of source parameters; vehicle rows usually contain regdate, mileage_exact, bv, and fuel.
publishedAtstringWhen publishedPublic publication timestamp when the source exposes one.
isPremiumbooleanWhen publishedWhether the listing is marked premium.
isUrgentbooleanWhen publishedWhether the listing is marked urgent.
isHotDealbooleanWhen publishedWhether the listing is marked as a hot deal.
searchQuerystringWhen publishedQuery recorded for the search that produced the row.
searchUrlstringAlwaysPublic search URL used for the run.
scrapedAtstringAlwaysUTC 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.

FieldMeaning
statusOverall Actor run status.
runStatusCanonical run status; matches status.
dataStatusCompleteness of the saved dataset rows: COMPLETE, PARTIAL, NO_RESULTS, or FAILED.
datasetItemsDataset items saved for the run.
diagnosticItemsDiagnostic dataset rows; always 0 because diagnostics are not written to the dataset.
diagnosticCountOperational issues recorded for the run.
errorCountErrors recorded for the run.
uniqueItemsUnique listing records counted after de-duplication.
requestedPagesPages requested from the source.
foundWhether the source returned at least one usable result.
dataAvailableWhether source-backed data was saved.
finishedAtUTC time the summary was written.
StatusData statusMeaning
SUCCEEDEDCOMPLETEEligible results were saved without an extraction problem.
SUCCEEDEDPARTIALSome results were saved, but a later page or parse problem prevented a complete run. Saved rows remain available.
SUCCEEDEDNO_RESULTSThe source completed cleanly and returned no matching results.
FAILEDFAILEDA 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.