# Rental Cars Price Scraper (`malikgen/rental-cars-price-scraper`) Actor

Compare rental car prices worldwide. Scrapes Booking.com Cars (Budget, Hertz, Avis, Sixt, Europcar, Enterprise & more) and Sunnycars all-inclusive rates for ANY city — just type a location. Live prices, vehicle specs, suppliers, mileage & insurance, in one normalized schema. JSON/CSV/API, n8n-ready.

- **URL**: https://apify.com/malikgen/rental-cars-price-scraper.md
- **Developed by:** [Malikgen](https://apify.com/malikgen) (community)
- **Categories:** Travel, E-commerce, Business
- **Security:** Limited permissions
- **Stats:** 170 total users, 13 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $7.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Rental Cars Price Scraper

Compare car rental prices across multiple providers for **any global city or airport**. Get real-time pricing from Booking.com, Sunnycars, and Rentalcars.com in a single run.

### Features

- **3-Provider Comparison**: Booking.com, Sunnycars, and Rentalcars.com in one actor
- **Global Location Support**: Dynamic location resolution via Rentalcars FTSAutocomplete — any city or airport worldwide, not just a pre-configured list
- **Safe Fallback**: Hardcoded maps for UAE/Oman cities ensure existing working locations never break even if the autocomplete call fails
- **Booking.com Integration**: Prices from Budget, Dollar, Enterprise, Europcar, Hertz, Avis, Sixt, Thrifty, Alamo, and more
- **Sunnycars All-Inclusive**: Transparent pricing with insurance included (EUR)
- **Rentalcars.com**: World's largest aggregator — same group as Booking.com
- **Rich Data Extraction**: Car details, pricing, ratings, features, mileage policy, and more
- **Pagination Support**: Fetch up to 500 results per provider
- **Filter Options**: Transmission, extras (GPS, child seat, additional driver)
- **Proxy Support**: Wire Apify residential proxy into any provider

### Dynamic Location Resolution

Previous versions had a hardcoded list of ~5 Middle East airports. This version resolves any location dynamically:

1. **Dynamic lookup**: Calls `https://www.rentalcars.com/FTSAutocomplete.do?solrIndex=fts_en&solrRows=10&solrTerm=<location>` — a public endpoint (no auth) that returns global airport/city data including IATA codes, coordinates, and provider-specific IDs.
2. **Fallback**: If the dynamic call fails or returns no result, falls back to the hardcoded map for UAE/Oman cities. Logs which path was used for every location.
3. **No silent wrong-city**: If nothing resolves, the provider is skipped with a clear error record in the dataset — it will never silently default to a wrong city (old behavior was to default to Dubai).

#### Location Resolution Log Examples

```
[Location] Booking.com "Tokyo, Japan" → dynamic: Tokyo Haneda Airport (HND) [A]
[Location] Sunnycars "London Heathrow" → fallback map (exact)
[Location] ERROR: Could not resolve Sunnycars region ID for "XYZ" — No fallback available.
```

### Input Parameters

| Parameter | Type | Description | Default |
|-----------|------|-------------|---------|
| `pickupLocation` | string | Pickup location — any city, airport name, or IATA code | "Dubai, UAE" |
| `dropoffLocation` | string | Return location (leave empty for same as pickup) | Same as pickup |
| `pickupDate` | string | Pickup date (YYYY-MM-DD) | 7 days from now |
| `dropoffDate` | string | Return date (YYYY-MM-DD) | 14 days from now |
| `pickupTime` | string | Pickup time (HH:MM, 24h) | "10:00" |
| `dropoffTime` | string | Return time (HH:MM, 24h) | "10:00" |
| `providers` | array | `"booking"`, `"sunnycars"`, `"rentalcars"` | \["booking", "sunnycars"] |
| `driverAge` | integer | Driver's age (affects pricing) | 25 |
| `currency` | string | Preferred currency (OMR, AED, USD, EUR, GBP) | "OMR" |
| `transmission` | string | `""` (all), `"automatic"`, or `"manual"` | "" |
| `extras` | object | GPS, childSeat, additionalDriver | All false |
| `maxResults` | integer | Max results per provider (10–500) | 100 |
| `proxyConfiguration` | object | Apify Proxy config | useApifyProxy: false |

### Proxy Recommendations

| Provider | Without proxy | With datacenter proxy | With residential proxy |
|----------|--------------|----------------------|----------------------|
| Booking.com | Works | Works | Works |
| Sunnycars | Works | Works | Works |
| Rentalcars.com | Likely blocked | Likely blocked | **Recommended** |

To use residential proxy, set:

```json
{
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

### Example Input — Global City

```json
{
  "pickupLocation": "Tokyo, Japan",
  "pickupDate": "2026-08-01",
  "dropoffDate": "2026-08-08",
  "pickupTime": "10:00",
  "dropoffTime": "10:00",
  "providers": ["booking", "sunnycars", "rentalcars"],
  "driverAge": 30,
  "currency": "USD",
  "transmission": "automatic",
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

### Example Input — Middle East (existing behavior preserved)

```json
{
  "pickupLocation": "Dubai, UAE",
  "pickupDate": "2026-08-15",
  "dropoffDate": "2026-08-22",
  "providers": ["booking", "sunnycars"],
  "currency": "AED",
  "maxResults": 100
}
```

### Output Schema

All three providers emit the **same key set** (null where the source doesn't supply a value — keys are never omitted).

```json
{
  "id": "car_0",
  "provider": "booking",
  "carName": "Toyota Yaris or similar",
  "carModel": null,
  "carCategory": "economy",
  "rawCategory": "small car",
  "totalPrice": 185.50,
  "currency": "AED",
  "pricePerDay": 26.50,
  "supplier": "Budget",
  "rentalCompany": "Budget",
  "pickupLocation": "Dubai, UAE",
  "dropoffLocation": "Dubai, UAE",
  "pickupLocationResolved": "Dubai International Airport",
  "dropoffLocationResolved": "Dubai International Airport",
  "pickupDate": "2026-08-15",
  "dropoffDate": "2026-08-22",
  "pickupTime": "10:00",
  "dropoffTime": "10:00",
  "rentalDays": 7,
  "transmission": "AUTOMATIC",
  "seats": 5,
  "largeBags": 1,
  "smallBags": 1,
  "bags": null,
  "doors": null,
  "mileagePolicy": "unlimited",
  "mileageKm": null,
  "pickupType": "In Terminal",
  "pickupLocationType": null,
  "rating": 8.5,
  "ratingLabel": "Very good",
  "freeCancellation": true,
  "immediatelyAvailable": null,
  "servicesIncluded": null,
  "features": ["5 seats", "Automatic", "Unlimited mileage", "In Terminal"],
  "fuelPolicy": null,
  "insuranceIncluded": null,
  "securityDeposit": null,
  "url": "https://cars.booking.com/search-results?...",
  "scrapedAt": "2026-06-08T10:00:00.000Z"
}
```

#### Provider-specific field availability

| Field | Booking.com | Sunnycars | Rentalcars.com |
|-------|------------|-----------|----------------|
| `largeBags` / `smallBags` | Yes | null | null |
| `bags` / `doors` | null | Yes | Yes |
| `rating` / `ratingLabel` | Yes | null | null |
| `pickupType` | Yes | null | null |
| `pickupLocationType` | null | Yes | null |
| `servicesIncluded` | null | Yes | null |
| `insuranceIncluded` | null | true | null |
| `fuelPolicy` | null | full-to-full | Yes (if shown) |
| `immediatelyAvailable` | null | Yes | null |

### Provider Comparison

| Feature | Booking.com | Sunnycars | Rentalcars.com |
|---------|-------------|-----------|----------------|
| Currency | Configurable | EUR | Configurable |
| Companies | Multiple (Budget, Hertz, etc.) | Single provider | Multiple (world's largest) |
| Insurance | Varies by company | All-inclusive | Varies |
| Ratings | Per-car ratings | Company-wide only | null |
| Proxy needed | No | No | Residential recommended |
| Anti-bot | AWS WAF (raw Playwright bypasses) | Usercentrics cookie banner | Cloudflare |

### Pre-configured Fallback Locations

These cities/airports have hardcoded fallback IDs that work even if the dynamic lookup fails:

- Dubai International Airport (DXB)
- Abu Dhabi International Airport (AUH)
- Sharjah International Airport (SHJ)
- Muscat International Airport (MCT)
- Salalah Airport (SLL)

Any other global city or airport is resolved dynamically via the Rentalcars autocomplete API.

### Integration Examples

#### n8n Workflow

```javascript
// In n8n Code node — find cheapest car across all providers
const items = $input.all();
const cheapest = items.reduce((min, item) =>
  item.json.totalPrice < min.json.totalPrice ? item : min
);
return [cheapest];
```

#### API Call

```bash
curl "https://api.apify.com/v2/acts/YOUR_USERNAME~rental-cars-price-scraper/runs?token=YOUR_TOKEN" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "pickupLocation": "London Heathrow",
    "pickupDate": "2026-09-01",
    "dropoffDate": "2026-09-08",
    "providers": ["booking", "rentalcars"],
    "currency": "GBP",
    "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
  }'
```

### Limitations

- **Rentalcars.com anti-bot**: Datacenter IPs are blocked. Residential proxy required for reliable results.
- **Security Deposits**: Exact amounts require clicking into each car's details modal. Not scraped (too slow for large result sets).
- **Real-time Availability**: Prices and availability change frequently; results represent a snapshot in time.
- **Sunnycars region IDs**: Region IDs for non-Middle East cities are resolved via Playwright XHR interception during the scrape. If the intercept fails and no fallback exists, the provider is skipped with an error record.

### Changelog

#### v0.0 (Current)

- Added Rentalcars.com as 3rd provider
- Dynamic global location resolution via Rentalcars FTSAutocomplete — any city/airport worldwide
- Hardcoded maps kept as fallback — existing UAE/Oman cities never break
- Graceful error on unresolvable location (never silently defaults to wrong city)
- Proxy wired into all three scrape functions
- Unified output schema — all providers emit identical key set (null where absent)
- Added `scrapedAt` ISO-UTC timestamp and `pickupLocationResolved` / `dropoffLocationResolved` fields

# Actor input Schema

## `pickupLocation` (type: `string`):

City name or airport code for car pickup (e.g., 'Dubai, UAE', 'DXB')

## `dropoffLocation` (type: `string`):

City name or airport code for car return. Leave empty for same as pickup.

## `pickupDate` (type: `string`):

Date to pick up the car (YYYY-MM-DD format). Must be a future date. If not provided, defaults to 7 days from now.

## `dropoffDate` (type: `string`):

Date to return the car (YYYY-MM-DD format). Must be after pickup date. If not provided, defaults to 14 days from now.

## `pickupTime` (type: `string`):

Time to pick up the car (HH:MM format, 24-hour)

## `dropoffTime` (type: `string`):

Time to return the car (HH:MM format, 24-hour)

## `carCategories` (type: `array`):

Car categories to search for. Leave empty for all categories.

## `providers` (type: `array`):

Select which rental car providers to scrape. Booking.com aggregates major rental companies (Budget, Dollar, Enterprise, Europcar, Hertz, Avis, Sixt, Thrifty, Alamo). Sunnycars offers all-inclusive pricing with insurance. (Rentalcars.com support is in progress.)

## `driverAge` (type: `integer`):

Age of the driver (affects pricing and availability)

## `currency` (type: `string`):

Preferred currency for prices

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

Filter by transmission type. Leave empty for all.

## `extras` (type: `object`):

Filter to only show cars with these extras available. Note: Booking.com supports all extras as search filters. Sunnycars only supports GPS and 2nd driver as search filters (child seats are added during booking).

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

Maximum number of car results to fetch per provider (50, 100, 200, or 500). The scraper will paginate/scroll to get more results up to this limit.

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

Apify Proxy configuration for anti-bot bypass. Try without proxy first for Booking.com.

## Actor input object example

```json
{
  "pickupLocation": "Dubai, UAE",
  "pickupTime": "10:00",
  "dropoffTime": "10:00",
  "carCategories": [
    "economy",
    "compact",
    "midsize",
    "fullsize",
    "suv",
    "luxury"
  ],
  "providers": [
    "sunnycars",
    "booking"
  ],
  "driverAge": 25,
  "currency": "OMR",
  "transmission": "",
  "extras": {
    "gps": false,
    "childSeat": false,
    "additionalDriver": false
  },
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `byProvider` (type: `string`):

No description

# 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 = {
    "pickupLocation": "Dubai, UAE",
    "providers": [
        "sunnycars",
        "booking"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("malikgen/rental-cars-price-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 = {
    "pickupLocation": "Dubai, UAE",
    "providers": [
        "sunnycars",
        "booking",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("malikgen/rental-cars-price-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 '{
  "pickupLocation": "Dubai, UAE",
  "providers": [
    "sunnycars",
    "booking"
  ]
}' |
apify call malikgen/rental-cars-price-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,malikgen/rental-cars-price-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/VJ3VnwLpizS2dMtX6/builds/6yJzo8FjpW8rsfjig/openapi.json
