# EV Database Scraper (`muhammadafzal/ev-database-scraper`) Actor

Scrape public electric vehicle listings and specifications from EV Database by market and vehicle name.

- **URL**: https://apify.com/muhammadafzal/ev-database-scraper.md
- **Developed by:** [Muhammad Afzal](https://apify.com/muhammadafzal) (community)
- **Categories:** Other, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 ev database vehicle records

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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

## EV Database Scraper

Scrape public electric vehicle listings and specifications from [EV Database](https://ev-database.org/). The actor is intended for EV market research, comparison datasets, automotive analysis, and lead or inventory workflows that need consistent vehicle-level records.

### What it extracts

Each dataset item represents one EV variant and includes:

| Field group | Examples |
| --- | --- |
| Identity | vehicle ID, make, model, name, canonical vehicle URL |
| Index facts | availability, drive configuration, market segment, seats, heat pump, towing support, safety rating |
| Core metrics | real range, efficiency, curb weight, 0–100 km/h, one-stop range |
| Battery and utility | usable battery, fast-charge power, towing capacity, cargo volume |
| Pricing | displayed Germany, Netherlands, and UK prices plus price-per-range indicator |
| Optional details | sectioned tables for battery, charging, range, performance, efficiency, pricing, and other vehicle-page data |

The source covers electric vehicles listed by EV Database, with regional indexes such as Europe and the UK. Values are published-source estimates and should not be treated as a substitute for manufacturer homologation or a live dealer quote.

### Input

```json
{
  "query": "Tesla Model 3",
  "market": "eu",
  "maxResults": 25,
  "includeDetails": true
}
```

`query` is optional and performs a case-insensitive match against the vehicle make and model. Leave it blank to scan the selected regional index. Supported markets are `eu`, `uk`, `nl`, `de`, `fr`, `it`, and `es`. `maxResults` accepts 1–500 and defaults to 25. `includeDetails` defaults to false; enabling it fetches one additional public page per returned vehicle. `requestDelayMs` controls pacing and defaults to 800 ms.

### Pricing

This Actor uses Pay per event pricing:

| Event | Price |
| --- | ---: |
| Actor start | $0.00005 |
| EV Database vehicle record | $0.005 per dataset record |

The maximum event cost for the default 25-record run is $0.12505, excluding platform usage if the user enables Apify's pay-per-event + usage option. The Actor logs the cap at run start and stops when the user's spending limit is reached.

### Output

The default mode writes compact index records. With `includeDetails: true`, `specifications` contains a stable object keyed by source section, for example:

```json
{
  "vehicleId": "1319",
  "name": "Dacia Spring Electric",
  "vehicleUrl": "https://ev-database.org/car/1319/Dacia-Spring-Electric",
  "realRangeKm": 160,
  "usableBatteryKwh": 25,
  "fastChargePowerKw": 30,
  "specifications": {
    "battery": { "Battery Type": "Lithium-ion" },
    "charging": { "Fastcharge Port": "CCS" }
  },
  "scrapedAt": "2026-08-13T00:00:00.000Z"
}
```

The `SUMMARY` key-value record reports result count, selected market, detail mode, timestamp, and warnings. A valid query with no matches returns an empty dataset and a truthful warning.

### Reliability and limits

The actor uses server-rendered HTML over public HTTP with bounded retries and a configurable delay. It does not log in, bypass access controls, use private APIs, or require user cookies. If the source returns an error or changes its markup, the run reports the failure rather than fabricating vehicle records. Detail-page failures are retained as warnings while valid index data is preserved.

Use a moderate result limit and respectful request delay for large detail runs. Confirm that your use of the source data complies with EV Database terms, licensing, and applicable law. The source also offers official data services for licensed or higher-volume integrations.

### Local development

```bash
npm install
npm test
```

This project is local-ready after the TypeScript build and parser tests pass. Cloud deployment, pricing, and publication are intentionally separate owner-authorized steps.

# Actor input Schema

## `query` (type: `string`):

Use this to return vehicles whose make or model contains the text, for example 'Tesla Model 3' or 'Kia EV3'. Leave blank to scan the selected market index.

## `market` (type: `string`):

Use this to choose the EV Database regional index. 'eu' is the default Europe index; other locales can have different availability and prices.

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

Use this to cap records written to the dataset. Enter 1–500. The cap applies after optional search filtering and defaults to 25.

## `includeDetails` (type: `boolean`):

Use this to fetch each vehicle page and include sectioned battery, charging, range, performance, efficiency, pricing, and other tables. It increases request count and runtime.

## `requestDelayMs` (type: `integer`):

Use this to control respectful pacing between source requests. Enter 300–10000 milliseconds; defaults to 800. This is not a timeout or concurrency setting.

## Actor input object example

```json
{
  "query": "",
  "market": "eu",
  "maxResults": 25,
  "includeDetails": false,
  "requestDelayMs": 800
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset items containing normalized EV Database vehicle records.

## `summary` (type: `string`):

JSON summary with result count, market, warnings, detail mode, and completion time.

# 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("muhammadafzal/ev-database-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("muhammadafzal/ev-database-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 muhammadafzal/ev-database-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,muhammadafzal/ev-database-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/5jmdzJYIwnM88mzy8/builds/quwZf9v8OI8cMAd6S/openapi.json
