Avito Scraper avatar

Avito Scraper

Pricing

from $0.70 / 1,000 results

Go to Apify Store
Avito Scraper

Avito Scraper

Fast & reliable scraper for Avito.ma listings. Extract titles, prices, descriptions, seller info, images & attributes. Supports 50+ categories or custom search URLs. Concurrent scraping with anti-detection.

Pricing

from $0.70 / 1,000 results

Rating

0.0

(0)

Developer

kata Kuri

kata Kuri

Maintained by Community

Actor stats

0

Bookmarked

4

Total users

2

Monthly active users

2 days ago

Last modified

Share

Avito.ma Scraper

Fast and reliable Apify actor that scrapes listings from Avito.ma — Morocco's largest classifieds marketplace.

Features

  • Two input modes: choose from 50+ predefined categories OR paste custom Avito.ma URLs
  • Search filters: keyword, city, sort order, min/max price
  • Full detail scraping: description, HD images, seller info, phone, attributes
  • Smart limits: maxResults stops scraping immediately when reached — no wasted requests
  • Anti-detection: user-agent rotation, viewport randomization, stealth mode, resource blocking
  • Proxy support: residential proxies recommended
  • Fast: blocks images/css/fonts, concurrent browser pages
  • Structured JSON output ready for analysis

Pricing

$0.01 USD per result — you only pay for the listings extracted.

Input

Categories & URLs

ParameterTypeDefaultDescription
categoriesstring[]Select from 50+ predefined Avito.ma categories
categoryUrlsstring[]Paste any Avito.ma category/search URLs directly

At least one of categories or categoryUrls is required. You can use both together.

Search Filters

ParameterTypeDefaultDescription
searchKeywordstringFilter by keyword (e.g. "iPhone 15", "Mercedes")
citystringFilter by city (e.g. "Casablanca", "Rabat")
sortBystringSort: newest, oldest, price-low, price-high
minPriceintegerMinimum price in MAD
maxPriceintegerMaximum price in MAD

Scraping Limits

ParameterTypeDefaultDescription
maxResultsintegerunlimitedStop after this many results (across all URLs)
maxPagesinteger5Max pages per category (~38 listings/page)
scrapeDetailsbooleantrueVisit detail pages for full data
maxConcurrencyinteger5Parallel browser tabs (1-20)
proxyConfigurationobjectApify proxy settings

Example Input

{
"categories": ["smartphones", "ordinateurs-portables"],
"searchKeyword": "iPhone 15",
"city": "Casablanca",
"sortBy": "newest",
"minPrice": 5000,
"maxPrice": 15000,
"maxResults": 50,
"maxPages": 10,
"scrapeDetails": true,
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"]
}
}

Output

Each result contains:

FieldTypeDescription
avitoIdstringUnique Avito listing ID
titlestringListing title
pricenumberPrice value
currencystringCurrency (MAD)
citystringCity name
locationstringFull location
categorystringCategory name
descriptionstringFull description
imagesstring[]Image URLs (HD when available)
detailsobjectCategory-specific attributes
sellerNamestringSeller display name
sellerPhonestringSeller phone number
sellerIdstringSeller Avito ID
sellerProfileUrlstringSeller profile URL
sellerMemberSincestringYear seller joined
sellerLocationstringSeller location
sellerTotalListingsnumberSeller's total active ads
listingUrlstringDirect link to listing
publishedAtstringPublication date
scrapedAtstringScrape timestamp (ISO 8601)
_completenessstringbasic (category only) or full (detail page visited)

Example Output

{
"avitoId": "12345678",
"title": "MacBook Pro M2 2023 - Comme neuf",
"price": 15000,
"currency": "MAD",
"city": "Casablanca",
"location": "Casablanca",
"category": "Ordinateurs Portables",
"description": "MacBook Pro M2 en excellent état...",
"images": [
"https://content.avito.ma/classifieds/images/..."
],
"details": {
"Marque": "Apple",
"Modèle": "MacBook Pro",
"RAM": "16 Go"
},
"sellerName": "TechShop",
"sellerPhone": "0612345678",
"sellerId": "987654",
"sellerProfileUrl": "/profil/techshop",
"sellerMemberSince": "2019",
"sellerLocation": "Casablanca",
"sellerTotalListings": 42,
"listingUrl": "https://www.avito.ma/fr/casablanca/macbook_pro_m2-12345678.htm",
"publishedAt": "2024-01-15T10:30:00.000Z",
"scrapedAt": "2024-01-20T14:22:33.000Z",
"_completeness": "full"
}

How It Works

  1. Resolves category slugs to Avito.ma URLs and applies search filters (keyword, city, sort, price)
  2. Navigates using a stealth Playwright browser with randomized fingerprints
  3. Extracts listing data from Next.js __NEXT_DATA__ (no HTML parsing — fast & reliable)
  4. Paginates through pages up to maxPages, stopping early if maxResults is reached
  5. Optionally visits each detail page for full description, HD images, seller info, and attributes
  6. Outputs structured JSON to the Apify dataset

Tips

  • Use residential proxies for best reliability
  • Set scrapeDetails: false for faster runs when you only need basic listing info
  • Use maxResults to control costs — the scraper stops immediately when the limit is hit
  • Increase maxConcurrency for faster runs (monitor memory usage)
  • Each category page has ~38 listings, so maxPages=10 gives ~380 results per URL
  • Combine categories with searchKeyword and price filters for precise targeting