# Avito Scraper: avito.ma Morocco + avito.ru Russia Listings (`dltik/avito-scraper`) Actor

Scrape Avito classifieds on avito.ma (Morocco) and avito.ru (Russia): real estate, cars, phones, jobs, goods. Search by category, city, price or paste a URL. Get title, price, location, images, seller phone (Morocco) and niche fields. HTTP-only, no browser, no captcha.

- **URL**: https://apify.com/dltik/avito-scraper.md
- **Developed by:** [Walid](https://apify.com/dltik) (community)
- **Categories:** Real estate, E-commerce, Lead generation
- **Stats:** 4 total users, 4 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.00 / 1,000 listing scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Avito Scraper — avito.ma (Morocco) + avito.ru (Russia) Classifieds Data

> Scrape **Avito** on [avito.ma](https://www.avito.ma) (Morocco) and [avito.ru](https://www.avito.ru) (Russia). Get title, price, location, images and category-specific fields for real estate, cars, phones, jobs and goods — plus the **seller phone number, included free, on Morocco**. HTTP-only, no browser, no captcha.

⭐ **Bookmark this actor** to keep it on top of your Apify dashboard.

### What is the Avito.ma Scraper?

The **Avito.ma Scraper** turns any Avito search into clean JSON or CSV. Search by keyword, category, city or price range, or paste an Avito search URL, and the actor returns every listing with its price (in MAD), seller name and **phone number**, images, area, posting date and the structured fields that matter for its category. Real-estate ads come back with surface, rooms, bathrooms, floor and amenities; car ads with year, mileage, fuel and gearbox; vacation rentals with capacity, check-in hours and booking calendar. It reads Avito's own page data directly, so there is no browser to babysit and no captcha to solve.

This makes the Avito scraper a fast, cheap source for **Morocco real estate data**, **used-car data**, lead lists and market research that no official Avito API exposes.

### Use cases

- **Real estate deal-finding**: Pull every apartment or villa for sale in Casablanca, Marrakech or Tanger under a price ceiling, with surface and price-per-m² to spot underpriced listings.
- **Lead generation**: Build call lists of sellers (name + phone) by category and city for agencies, brokers and B2B outreach.
- **Used-car market intelligence**: Track make/model/year/mileage/price across Morocco to price inventory or find arbitrage.
- **Short-term rental research**: Collect vacation rentals with capacity and amenities to benchmark ADR against Airbnb comps.
- **Price monitoring**: Re-run daily to watch how prices and inventory move in a city or category.

### Input

Pick the marketplace with `country` (`ma` = Morocco, default; `ru` = Russia). Then give a keyword, or a category + city + price range, or paste a full Avito URL. Full reference in the input schema.

Morocco (avito.ma):

```json
{
  "country": "ma",
  "category": "ventes_immobilieres",
  "city": "Casablanca",
  "priceMin": 1000000,
  "priceMax": 2000000,
  "maxResults": 200
}
```

Russia (avito.ru) — drive by category + city (or paste avito.ru category/city URLs as `startUrls`):

```json
{
  "country": "ru",
  "category": "telefony",
  "city": "moskva",
  "maxResults": 200
}
```

For specific ads, use detail mode with `startUrls` to get all images, amenities and the seller phone.

### Output

Each listing is one dataset record. Category-specific attributes are normalized into `niche` and the raw set is kept in `attributes`.

```json
{
  "ad_id": "58249883",
  "title": "Appartement 92 m² à Gauthier",
  "price": 1650000,
  "currency": "DH",
  "transaction": "à vendre",
  "category": "Appartements",
  "location": { "city": "Casablanca", "area": "Gauthier" },
  "seller": { "name": "B C Real Estate", "type": "shop", "phone": "0661xxxxxx" },
  "niche": { "surface_m2": 92, "rooms": 2, "bathrooms": 1, "floor": 3 },
  "amenities": ["Ascenseur", "Parking", "Meublé"],
  "images": ["https://content.avito.ma/classifieds/images/..."],
  "url": "https://www.avito.ma/fr/casablanca/appartements/..._58249883.htm"
}
```

### Pricing

This actor uses **PAY\_PER\_EVENT**:

- **$0.005 per run** (actor start) — a flat cover fee so small searches and scheduled monitoring runs stay cheap.
- **$0.004 per listing** (= $4 per 1,000) — the cheapest Avito Morocco scraper, and the **seller phone number is included at no extra charge** (other Avito scrapers bill it as a separate ~$0.002/phone enrichment).

No charge for failed runs. Search and detail listings are billed the same way, so you only pay for the data you keep.

### Automate & schedule

Schedule the Avito scraper to run daily or hourly for fresh listings, and wire it to Google Sheets, Slack, a webhook or your CRM via Apify integrations. Recurring runs keep your deal-finder, lead list or price tracker current, set it once and forget it. Combine it with the actor's `publishedWithinHours` filter to alert only on brand-new ads.

### FAQ

**Does it scrape avito.ru (Russia) too?** Yes. Set `country` to `ru` and drive it by category + city (e.g. `telefony` in `moskva`), or paste avito.ru category/city URLs as `startUrls`. You get title, price (RUB), location, metro station, coordinates and images per listing. avito.ru geo-gates traffic, so the actor routes through country-RU residential proxies and rotates the IP on a block. Note: on avito.ru the seller phone is served as an image (anti-scrape), so phone reveal and keyword `q=` search are currently Morocco-only.

**Is there an official Avito API?** No. Neither Avito.ma nor Avito.ru publishes a public data API, so scraping the site is the practical way to get its listings programmatically. This actor does that for you.

**Does it return the seller's phone number?** Yes, when the ad exposes it. Avito ships the phone in the page data, so you get it without any extra reveal step.

**Which categories are supported?** All of them: real estate (sale, rent, vacation, flatshare), vehicles (cars, motorcycles, bikes, trucks, boats), Avito Market goods, and business/jobs/services. Filter by a friendly key or paste any Avito URL.

**How do I scrape Avito real estate in a specific city?** Set `category` to `ventes_immobilieres` (or `locations_immobilieres`) and `city` to the town name, then add `priceMin`/`priceMax`.

**Do I need a proxy?** Avito often works without one, but a residential IP is the most reliable and is the default. You can also pass your own proxy via `customProxyUrl`.

**What are the best alternatives for Morocco classifieds data?** Avito is the largest, so this is the primary source. For France, see the related Leboncoin scraper below.

***

⭐ **Found this useful? Bookmark it** — Apify ranks actors by bookmarks, and it keeps the actor visible for you.

#### Related actors

- [Leboncoin Scraper (France classifieds)](https://apify.com/dltik/leboncoin-scraper)

# Actor input Schema

## `mode` (type: `string`):

search = find listings by keyword/category/city/price. detail = fetch full records for specific Avito ad URLs (all images, amenities, phone).

## `country` (type: `string`):

Which Avito to scrape: 'ma' = avito.ma (Morocco, default), 'ru' = avito.ru (Russia). For Russia, drive by category + city (or paste avito.ru category/city URLs as startUrls); keyword q= search and phone reveal are Morocco-only for now.

## `keywords` (type: `string`):

Free-text search (Avito `q=`), e.g. 'villa piscine', 'iphone 15', 'clio 4'. Spans every category unless you also set a category.

## `category` (type: `string`):

Optional category filter. Use a friendly key (immobilier, ventes\_immobilieres, locations\_immobilieres, locations\_vacances, voitures, motos, market, emploi, services...) or a raw Avito slug. Leave empty to search all categories.

## `city` (type: `string`):

Restrict to a Moroccan city or area, e.g. 'Casablanca', 'Marrakech', 'Tanger', 'Agadir', 'Rabat'. Leave empty for all of Morocco.

## `priceMin` (type: `integer`):

Minimum price in Moroccan dirham.

## `priceMax` (type: `integer`):

Maximum price in Moroccan dirham.

## `startUrls` (type: `array`):

Paste avito.ma search URLs (with any filters applied in the browser) for search mode, or ad URLs for detail mode. Overrides keyword/category/city.

## `maxResults` (type: `integer`):

Maximum number of listings to return (search mode). ~38 listings per page.

## `publishedWithinHours` (type: `integer`):

Only keep listings posted within this many hours (best-effort from the ad date). Leave empty for no time filter.

## `fetchDescriptions` (type: `boolean`):

In search mode, open each ad page for the full description, all images and amenities. Slower and costs one page fetch per ad.

## `sort` (type: `string`):

Optional sort passthrough (Avito `s=` param). Leave empty for the default (most recent).

## `inputs` (type: `array`):

Optional list of keywords (search mode) or ad URLs (detail mode) to process in one run.

## `customProxyUrl` (type: `string`):

Optional. Your own proxy (http://user:pass@host:port). Overrides Apify proxy. Avito often works without a proxy, but a residential IP is the most reliable.

## `proxyConfig` (type: `object`):

Apify proxy settings. Defaults to Residential for reliability; switch to Datacenter to run cheaper if it is not blocked.

## Actor input object example

```json
{
  "mode": "search",
  "country": "ma",
  "maxResults": 100,
  "fetchDescriptions": false,
  "proxyConfig": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("dltik/avito-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("dltik/avito-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call dltik/avito-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dltik/avito-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/l1DG5iMM697LKooc4/builds/g7te41KRTxJ9lwRJy/openapi.json
