# Mobile.bg Scraper: Cars, Trucks & Motorcycles in Bulgaria (`recordsdata/mobile-bg-scraper`) Actor

Scrape mobile.bg, Bulgaria's largest vehicle marketplace: cars, SUVs, trucks, buses, motorcycles, machinery, parts and dealers with EUR price, mileage, fuel, power, photos, price history and new-listing monitoring. No login, no proxy. Export JSON, CSV or Excel.

- **URL**: https://apify.com/recordsdata/mobile-bg-scraper.md
- **Developed by:** [RecordsData](https://apify.com/recordsdata) (community)
- **Categories:** E-commerce, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $22.00 / 1,000 vehicle listings

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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

![RecordsData](https://api.apify.com/v2/key-value-stores/AAm3a1h3Z9nYfrvh9/records/banner?v=3)

## Mobile.bg Scraper: Cars, Trucks, Motorcycles and Dealers in Bulgaria

> Mobile.bg Scraper is an Apify Actor that extracts vehicle listings from mobile.bg, Bulgaria's largest vehicle marketplace: cars and SUVs, buses and vans, trucks, motorcycles, farm and construction machinery, forklifts, caravans, boats, trailers, bicycles, parts, accessories and tires. Each row has the price in euro, make, model, year, mileage, fuel, gearbox, power, equipment, photos, city and seller type. It also returns dealer profiles, price-history rows and new-listing monitoring. No login, no proxy and no browser are needed.

Export the result as JSON, CSV, Excel, XML or HTML, or read it through the Apify API.

### What can you scrape from Mobile.bg?

- **Vehicle listings** from 11 vehicle sections and 3 parts sections. The site held about 173,000 car ads, 12,000 motorcycle ads, 11,000 bus and van ads, 5,000 truck ads and 3,000 ads each for farm and construction machinery on 2026-10-19.
- **Listing pages** (optional): the full photo gallery (up to 17 photos), the complete equipment list, the seller's text, exact edit time, view count, VIN when the seller entered it, a video link, and the dealer address with a map position.
- **Dealers**: the dealer directory with business name, city, address, member since, number of ads in stock, the sections they sell in and opening hours. The business phone is optional.
- **Price history**: one row per price step of a listing, with the old price, the difference and the percentage.
- **Monitoring**: a repeat run returns only new listings, and a repriced listing comes back with its previous price.
- **Sitemap feed**: every listing added or edited since a moment you choose.

### Why use this actor?

- **Past the 3,000 result cap**: the site shows at most 3,000 results per search. The actor splits a capped search by category, make, model, year and price until every slice fits, so a big search returns all of its listings once, with no duplicates.
- **Real filters, applied by the site and checked again on every row**: make, model, category, year, price, mileage, power, engine size, Euro class, fuel, gearbox, color, region, condition and seller type.
- **Clean, typed output**: prices, mileage and power are numbers, fuel, gearbox and body type are lowercase English values, dates are ISO 8601, and absent values are left out instead of being filled with placeholders.
- **Both text layers**: titles, descriptions and equipment stay in the seller's Bulgarian, with no broken characters, while the structured fields are in English.
- **Privacy built in**: the names and phone numbers of private sellers are never output, and phone numbers are removed from private descriptions. Dealer phones appear only when you switch them on.

### How to scrape Mobile.bg listings in four steps

1. Choose a **Section** on the actor page, for example Cars and SUVs.
2. Add a make such as `BMW` and a model such as `X5`, or leave them empty, and set filters such as price, year or fuel.
3. Set the maximum number of results and click **Start**.
4. Download the dataset from the **Storage** tab as JSON, CSV or Excel.

### Four ways to collect data

| Mode (`mode`) | Use it to | Record types |
|---|---|---|
| `search` | Find listings in a section by make, model, category and the full filter set | `vehicle`, `vehicle detail`, `price history` |
| `urls` | Refresh known listings by number or address, replay a result page of the site, or read a dealer's site | `vehicle`, `vehicle detail`, `dealer` |
| `dealers` | List the dealers of the directory by name and city, and optionally their ads | `dealer`, `vehicle` |
| `sitemap` | Read every listing added or edited since a date or time | `vehicle detail` |

Make, model and category names are not case sensitive and are checked against the site. An unknown name ends the run with one free error row that suggests close matches.

#### Which filters work in which section

Cars, buses and trucks accept every filter. Motorcycles accept all of them except the Euro class. Farm machinery, construction machinery, caravans and trailers accept year, price, color, region and condition. Forklifts and boats add fuel. Bicycles accept price, color, region and condition. Parts, accessories and tires are filtered by the vehicle they fit, a category, a price range and a condition. When a filter is not offered by the site for a section, the actor tells you in the log and does not invent it.

### What data do you get?

Every row is a vehicle, a price-history step or a dealer, told apart by its fields: a vehicle row has `listingId` and `vehicleType`, a price-history row has `listingId` and `step`, a dealer row has `dealerId`. Fields that do not apply to a record type, or that the seller did not enter, are left out.

| Field | Description |
|---|---|
| `listingId`, `url`, `title` | Listing number, address and title |
| `vehicleType` | `car`, `bus`, `truck`, `motorcycle`, `agricultural-machine`, `industrial-machine`, `forklift`, `caravan`, `boat`, `trailer`, `bicycle`, `part`, `accessory` or `tire-or-wheel` |
| `price`, `currency`, `priceOnRequest`, `vatIncluded` | Asking price in euro, a flag for ads that say "price on request" (no price is output) and whether VAT is included |
| `priceTrend` | `down` or `up` when the card shows a recent price move |
| `changeType`, `previousPrice`, `priceChange`, `priceChangePct` | Monitor rows: `new`, `price-drop` or `price-increase`, old price, difference and percent |
| `make`, `model`, `year`, `productionMonth` | Make, model, production year and month |
| `mileage`, `mileageUnit` | Odometer in km, left out for new vehicles |
| `fuelType`, `transmission`, `driveType`, `bodyType`, `color`, `condition` | Lowercase English values such as `petrol`, `diesel`, `electric`, `manual`, `automatic`, `suv`, `sedan`, `new` and `damaged` |
| `engineSize`, `engineSizeUnit`, `powerHp`, `euroClass`, `batteryKwh` | Engine size in cc, power in horsepower, Euro class and battery capacity for electric vehicles |
| `seats`, `loadCapacityKg`, `axles`, `engineHours`, `vin` | Seats, load capacity, axles and engine hours when the seller entered them; VIN only when entered |
| `specs` | Every other labelled value of the listing page, such as range, tire size, tonnage or lifting height, with the site's Bulgarian labels |
| `features`, `description` | Equipment list and the seller's text |
| `city`, `region`, `locationText`, `address`, `latitude`, `longitude` | Where the vehicle is; address and map position come from dealer ads only |
| `images`, `imageCount`, `videoUrl`, `hasVideo` | Full-size gallery (up to 17), photo count and video link |
| `publishedAt`, `updatedAt`, `modifiedAt`, `views` | Publication time from the listing number, last edit time, the time the sitemap gives for the listing (sitemap mode, the reason the row was returned) and view count |
| `promoTier`, `isReserved` | Paid promotion tier `BEST`, `TOP` or `VIP`, and the reserved flag |
| `isPrivateSeller`, `sellerName`, `sellerUrl`, `dealerSince`, `sellerPhone` | Seller type; identity only for dealers, the dealer's phone only with **Include dealer contact details** |
| `dealerId`, `slug`, `name`, `memberSince`, `listingCount`, `listingSections`, `phone`, `phones`, `openingHours`, `logoUrl` | Dealer rows |
| `step`, `changedAt`, `isInitialPrice` | Price-history rows |
| `sourceSite`, `country`, `scrapedAt` | `mobile.bg`, `Bulgaria` and the time of extraction |

#### Sample output

A real vehicle row from a cloud run with listing pages on (description, equipment and photo list shortened):

```json
{
  "listingId": "21790181407507138",
  "url": "https://www.mobile.bg/obiava-21790181407507138-bmw-x6-promo-tsena-m60i-garantsiya-xdrive",
  "sourceSite": "mobile.bg",
  "country": "Bulgaria",
  "vehicleType": "car",
  "title": "BMW X6 * ПРОМО ЦЕНА* M60i* Гаранция* xDrive",
  "description": "*ПРОМО ЦЕНА* до 30. 11. 2026 г. *СОБСТВЕН ЛИЗИНГ* без доказване на доход...",
  "price": 80000,
  "currency": "EUR",
  "priceOnRequest": false,
  "vatIncluded": false,
  "make": "BMW",
  "model": "X6",
  "year": 2025,
  "productionMonth": 1,
  "mileage": 74876,
  "mileageUnit": "km",
  "fuelType": "petrol",
  "transmission": "automatic",
  "engineSize": 4400,
  "engineSizeUnit": "cc",
  "powerHp": 523,
  "euroClass": 6,
  "bodyType": "suv",
  "color": "Grey",
  "vin": "WBA41EX0909Y57363",
  "features": ["GPS система за проследяване", "Адаптивни предни светлини", "Антиблокираща система"],
  "city": "Sofia",
  "region": "Sofia",
  "locationText": "гр. София",
  "address": "бул. Рожен 115, автокомплекс Маями 33",
  "latitude": 42.7580564,
  "longitude": 23.318781,
  "images": ["https://mobistatic2.focus.bg/mobile/photosorg/138/2/big1/21790181407507138_lw.webp"],
  "imageCount": 17,
  "publishedAt": "2026-09-23T16:36:47.000Z",
  "updatedAt": "2026-10-18T11:48:00.000Z",
  "views": 1049,
  "promoTier": "BEST",
  "isReserved": false,
  "sellerName": "ViktoriaCars",
  "sellerUrl": "https://viktoriacars.mobile.bg",
  "isPrivateSeller": false,
  "dealerSince": 2015,
  "scrapedAt": "2026-10-19T10:19:49.682Z"
}
```

A price-history row has the step, the time of the change and the difference to the previous step:

```json
{
  "listingId": "51791299029371587",
  "url": "https://www.mobile.bg/obiava-51791299029371587-yamaha-mt-09-perfekten",
  "sourceSite": "mobile.bg",
  "country": "Bulgaria",
  "title": "Yamaha Mt-09 ПЕРФЕКТЕН",
  "step": 2,
  "changedAt": "2026-10-18T11:44:00.000Z",
  "isInitialPrice": false,
  "price": 4899,
  "currency": "EUR",
  "previousPrice": 5299,
  "priceChange": -400,
  "priceChangePct": -7.55,
  "scrapedAt": "2026-10-19T09:48:06.979Z"
}
```

### How does it compare with other Mobile.bg scrapers?

Two other actors on the Apify Store read mobile.bg (Store listing checked on 2026-10-19): studio-amba/mobile-bg-scraper (642 runs in 30 days, 40 fields) and devilscrapes/mobile-bg-bulgaria-cars (25 fields). This actor returns up to 48 fields per vehicle row and adds what they do not list: dealer profiles, price-history rows, a sitemap feed, monitoring with price-change rows, 14 sections instead of cars only, and slicing that reads past the 3,000 result cap of the site.

### Is it legal to scrape Mobile.bg? Limits and responsible use

The actor reads public listing pages. It does not log in or bypass any protection, it keeps a polite request pace, and the robots.txt of the site allows these pages and sets no crawl delay. The names and phone numbers of private sellers are never output, and contacts are removed from private descriptions. Dealer business phones only appear with **Include dealer contact details**. You are responsible for using the data in line with the site terms and the data protection law that applies to you.

Limits:

- The site shows 3,000 results at most per search. The actor slices a capped search by category, make, model, year and price, but a single slice that still holds more than 3,000 ads (for example one model in one year and one price band) is read only to the cap and logged.
- A listing has at most 17 photos, the limit of the site.
- Detail fields such as VIN, drive type, seats or battery capacity are filled only when the seller entered them.
- Titles, descriptions, equipment and the labels inside `specs` are in Bulgarian, as written by the sellers.
- Wanted ads, services and the rent-a-car section are not covered.
- Free Apify plans are limited to 10 results per run.

### Use with AI agents (MCP)

Connect the Apify MCP server to Claude, Cursor or another MCP client and this actor appears as a tool: `https://mcp.apify.com?tools=RecordsData/mobile-bg-scraper`.

Example prompt: "Find the 20 cheapest diesel BMW X5 SUVs from 2018 or newer on Mobile.bg and list price, mileage, city and seller." The agent sends `{ "mode": "search", "section": "cars", "make": "BMW", "model": "X5", "fuelType": "diesel", "yearFrom": 2018, "sortBy": "price-asc", "maxItems": 20 }` and analyzes the rows.

### Run it from code

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('RecordsData/mobile-bg-scraper').call({
    mode: 'search',
    section: 'cars',
    make: 'BMW',
    yearFrom: 2018,
    maxItems: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length, items[0].title, items[0].price);
```

You can also call the actor from the Python client, Make, Zapier or n8n, and schedule it from the Apify Console.

### Frequently Asked Questions

#### Which vehicles does mobile.bg Scraper cover?

Everything sold on mobile.bg: cars and SUVs, buses and vans, trucks, motorcycles and ATVs, farm machinery, construction machinery, forklifts, caravans and motorhomes, boats, trailers, bicycles, parts, accessories, and tires and wheels, from dealers and private sellers. `vehicleType` tells the sections apart in the dataset.

#### Do I need a proxy, a login or an API key?

No. The actor makes plain HTTP requests to the public site and needs no proxy, browser or mobile.bg account. You only need an Apify account to start runs, and the free plan returns up to 10 results per run.

#### Is it legal to scrape mobile.bg?

The actor reads publicly visible listings and does not log in. It keeps a polite request pace and respects the site's robots.txt. The names, phone numbers and emails of private sellers are not output, and you remain responsible for using the data in line with the site terms and the data protection law that applies to you.

#### How much does a run cost?

The actor is billed per result with Apify pay-per-event pricing: one event per vehicle listing, one for a listing with its full page, one per dealer and one per price-history row. The Pricing tab of the actor page shows the live rate for each event. Error rows, empty searches and listings skipped by monitoring are never charged.

#### How do I get more than 3,000 listings from one search?

Leave the make and model empty or keep them broad and set `maxItems` above 3,000. When the site reports "3,000+" results the actor splits the search by category, then by make, then by model, then by year and finally by price, and merges the slices without duplicates. A run of 3,500 motorcycles from the result list took about 2.5 minutes in a local test.

#### What is the difference between a vehicle record and a vehicle detail record?

A vehicle record comes from the result list and already holds price, make, model, year, mileage, fuel, gearbox, power, color, short equipment, city, seller name and the photos of the list. Switch on **Read every listing page (full detail)** to get a vehicle detail record with the full gallery, the whole equipment list, the seller's complete text, view count, VIN, video link and the dealer address with map position.

#### Why is there no phone number in the rows?

Dealer phones are returned only when you switch on **Include dealer contact details**, and only for dealers, which are businesses. Private sellers' phones and names are never returned, and contacts are also removed from private descriptions. To reach a seller, use the contact options on the listing page of the site itself.

#### What does priceOnRequest mean?

Some sellers write "price on request" instead of an amount. Those rows have `priceOnRequest: true` and no `price` or `currency`, so they are never read as a price of zero. Filter on that flag in the dataset to find them or to leave them out.

#### Can I get only the listings published since my last run?

Yes. Switch on **Only new listings (monitor)** and keep the same search settings, or the same **Monitor name**. Add **Report price changes** to also get a row, with `changeType`, `previousPrice` and `priceChangePct`, when the price of a known listing moves by 2 percent or more. Scheduled runs then return only new or repriced listings, never charged twice. For a feed across the whole site, use `sitemap` mode with **Changed since (sitemap mode)**.

#### What happens when the search finds nothing or the input is wrong?

A search with no hits ends as succeeded with an empty dataset and charges nothing. A wrong input value, such as a minimum year above the maximum or an unknown make, ends as succeeded with one free error row that explains the problem, so a typo never costs you money.

### Support

Questions, a missing field or a feature request: contact.punkrecordsdata@gmail.com. Reviews on the actor page help other people find it.

This actor is an independent tool and is not affiliated with mobile.bg.

# Actor input Schema

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

search = vehicle ads for the section and filters below. urls = listing addresses, listing numbers, result pages and dealer sites you list. dealers = the dealer directory with showroom address, stock counts and opening hours. sitemap = listings added or changed since a date, straight from the site index.

## `maxItems` (type: `integer`):

Stops after this many rows (all record types together). Free plans are limited to 10 items per run. The site shows at most 3,000 results per search; larger requests are split by make, model, year and price automatically.

## `section` (type: `string`):

Which part of the site to search. Cars and SUVs is the default. Parts, accessories and tires are filtered by the vehicle they fit (next field), category and price only.

## `forVehicle` (type: `string`):

Only for the sections Parts, Accessories and Tires: the kind of vehicle the items are for.

## `make` (type: `string`):

Make as written on the site, for example BMW, Mercedes-Benz, Volkswagen, Honda or Scania. Case does not matter. An unknown make is reported with close suggestions. Empty means every make.

## `model` (type: `string`):

Model of the make above, for example 320, Golf or Vitara. Needs a make. A model that does not exist for the make is reported with examples. Empty means every model.

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

Category of the section: for cars sedan, hatchback, station wagon, suv, coupe, convertible, minivan, van, pickup or limousine; for motorcycles for example scooter, chopper, enduro, naked or ATV; for farm machinery, construction machinery, forklifts, caravans, boats, trailers and bicycles the category name in English (tractor, excavator, motor-yacht, semi-trailer, mountain) or the site label; for parts the part category as listed on the site. Bulgarian site labels work too. Empty means every category.

## `yearFrom` (type: `integer`):

Only vehicles produced in this year or later. 0 or empty means no limit.

## `yearTo` (type: `integer`):

Only vehicles produced in this year or earlier. 0 or empty means no limit.

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

Only ads priced at or above this amount in euro, for example 5000. 0 or empty means no limit.

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

Only ads priced at or below this amount in euro, for example 20000. 0 or empty means no limit.

## `mileageMax` (type: `integer`):

Only vehicles with at most this odometer reading, for example 150000. 0 or empty means no limit.

## `powerMin` (type: `integer`):

Only engines of at least this many horsepower. 0 or empty means no limit.

## `powerMax` (type: `integer`):

Only engines of at most this many horsepower. 0 or empty means no limit.

## `engineSizeMin` (type: `integer`):

Only engines of at least this size in cubic centimetres, for example 1600. 0 or empty means no limit.

## `engineSizeMax` (type: `integer`):

Only engines of at most this size in cubic centimetres, for example 2000. 0 or empty means no limit.

## `euroClassMin` (type: `integer`):

Only vehicles meeting Euro class N or newer, 1 to 6. 0 or empty means no limit.

## `fuelType` (type: `string`):

Fuel of the engine.

## `transmission` (type: `string`):

Gearbox type.

## `color` (type: `string`):

Body colour as listed by the site.

## `region` (type: `string`):

Province where the vehicle is offered (Sofia covers the capital and its province). Outside Bulgaria lists vehicles located abroad.

## `condition` (type: `string`):

Any returns every ad. New, Damaged and For parts are the site's own condition filters.

## `sellerType` (type: `string`):

Dealers keeps ads of businesses, Private keeps ads of private sellers (their names and phones are never output). Checked on every row.

## `sortBy` (type: `string`):

Order of the results. Newest first is best for monitoring.

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

urls mode. Listing addresses (www.mobile.bg/obiava-...), result pages with filters (www.mobile.bg/obiavi/...), dealer sites (name.mobile.bg) and dealer directory pages (www.mobile.bg/dealers). Listing numbers can go in the next field.

## `listingIds` (type: `array`):

urls mode. The number after "obiava-" in a listing address, for example 11699738500190247. A letter or digit followed by 12 to 18 digits.

## `dealerQuery` (type: `string`):

dealers mode. Keeps only dealers matching this text (the site's own dealer search). Empty means every dealer.

## `dealerCity` (type: `string`):

dealers mode. Keeps only dealers in this town, written as on the site in Latin letters, for example Sofia, Plovdiv or Varna. Empty means every town.

## `includeDealerListings` (type: `boolean`):

On: after each dealer record, also read that dealer's own vehicle listings (each one is a vehicle record).

## `modifiedSince` (type: `string`):

sitemap mode. Listings added or edited since this moment, as 2026-10-19 or 2026-10-19T08:00:00Z. Empty means the last 24 hours. Every listing is read in full.

## `sitemapSections` (type: `array`):

sitemap mode. Sections to keep. Leave empty for every section.

## `fetchDetails` (type: `boolean`):

Off: one row per ad from the result list (price, year, mileage, fuel, transmission, region, first photos). On: also opens each ad page for body type, drive, power, euro class, VIN, equipment, all photos, video, full description, views, last edit time and the dealer address and map position. Slower and billed as a detail record.

## `includePriceHistory` (type: `boolean`):

On: for every ad also reads its price history and adds one price-history record per price step (implies reading the listing page).

## `includeContactDetails` (type: `boolean`):

Adds the business phone of dealerships and keeps phone numbers inside their descriptions. Private seller names, phones and emails are never output.

## `onlyNew` (type: `boolean`):

Skips every listing seen in an earlier run with the same monitor name, so scheduled runs return only what is new.

## `trackPriceChanges` (type: `boolean`):

Needs Only new listings. A listing seen before with a price at least 2 percent different comes back with the previous price, the change and the change in percent.

## `resetSeen` (type: `boolean`):

Clears the memory of the monitor name before this run.

## `stateKey` (type: `string`):

Name of the memory used by Only new listings. Use one name per saved search. Empty derives a name from your filters.

## `maxConcurrency` (type: `integer`):

How many listing pages are read at the same time (1 to 5). Requests are paced to about four per second in total, so a higher value adds little.

## `proxyConfiguration` (type: `object`):

Optional. Empty means direct requests, which work. Add a proxy only if your own network needs one.

## Actor input object example

```json
{
  "mode": "search",
  "maxItems": 10,
  "section": "cars",
  "forVehicle": "cars",
  "make": "",
  "model": "",
  "category": "",
  "fuelType": "any",
  "transmission": "any",
  "color": "any",
  "region": "any",
  "condition": "any",
  "sellerType": "any",
  "sortBy": "newest",
  "startUrls": [],
  "listingIds": [],
  "dealerQuery": "",
  "dealerCity": "",
  "includeDealerListings": false,
  "modifiedSince": "",
  "sitemapSections": [],
  "fetchDetails": false,
  "includePriceHistory": false,
  "includeContactDetails": false,
  "onlyNew": false,
  "trackPriceChanges": false,
  "resetSeen": false,
  "stateKey": "",
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Key fields per row

## `fullData` (type: `string`):

Complete dataset with all fields

# 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 = {
    "maxItems": 10,
    "make": "",
    "model": "",
    "category": "",
    "yearFrom": 0,
    "yearTo": 0,
    "priceMin": 0,
    "priceMax": 0,
    "mileageMax": 0,
    "powerMin": 0,
    "powerMax": 0,
    "engineSizeMin": 0,
    "engineSizeMax": 0,
    "euroClassMin": 0,
    "startUrls": [],
    "listingIds": [],
    "modifiedSince": "",
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("recordsdata/mobile-bg-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 = {
    "maxItems": 10,
    "make": "",
    "model": "",
    "category": "",
    "yearFrom": 0,
    "yearTo": 0,
    "priceMin": 0,
    "priceMax": 0,
    "mileageMax": 0,
    "powerMin": 0,
    "powerMax": 0,
    "engineSizeMin": 0,
    "engineSizeMax": 0,
    "euroClassMin": 0,
    "startUrls": [],
    "listingIds": [],
    "modifiedSince": "",
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("recordsdata/mobile-bg-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 '{
  "maxItems": 10,
  "make": "",
  "model": "",
  "category": "",
  "yearFrom": 0,
  "yearTo": 0,
  "priceMin": 0,
  "priceMax": 0,
  "mileageMax": 0,
  "powerMin": 0,
  "powerMax": 0,
  "engineSizeMin": 0,
  "engineSizeMax": 0,
  "euroClassMin": 0,
  "startUrls": [],
  "listingIds": [],
  "modifiedSince": "",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call recordsdata/mobile-bg-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,recordsdata/mobile-bg-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/RXZ4hp1iNIToMTNyR/builds/ZcXPw7SPqMcB6vmku/openapi.json
