# Dongchedi Scraper (`crawlerbros/dongchedi-scraper`) Actor

Scrape Dongchedi (dongchedi.com) - ByteDance's auto platform. Hot cars by category, recent new-car launches with prices and images, car-name lookup, and hot-brand directory - all parsed from the public homepage. No login required.

- **URL**: https://apify.com/crawlerbros/dongchedi-scraper.md
- **Developed by:** [Crawler Bros](https://apify.com/crawlerbros) (community)
- **Categories:** Automation, News, E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.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/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

## Dongchedi Scraper

Scrape Dongchedi (`dongchedi.com`) — ByteDance's automotive platform. Hot cars by category, recent new-car launches with prices/status/dates/images, car-name lookup, and the hot-brand directory — all parsed from the public homepage. No login, HTTP-only.

### What this actor does

- **Six modes:** `hotCars` (default), `newCars`, `byCarModel`, `byBrand`, `news` (homepage headlines), `videos` (homepage video list)
- **Hot cars** — the homepage's 轿车 / SUV / 其他 hot lists (27 cars each, with series ids and canonical series URLs)
- **New-car launches** — the 近期重磅新车 block parsed from the structured `__NEXT_DATA__` JSON (HTML regex fallback): name, price range (万元), status (预售/已上市), release tags (改款/全新车系/新增车型/小改款), release date (ISO), brand name + id, energy type (fuel/ev/hybrid/phev/erev), article title + URL, and a verified-accessible image
- **byCarModel** — look up a car name across the homepage lists (`凯美瑞`, `Model Y`, `奥迪A6L`…)
- **byBrand** — hot-brand directory (33 brands, was 16) with ids, urls and logos
- **news** — today's headlines (up to ~55): article id, title, article URL, video flag, hot flag
- **videos** — the homepage video feed (30): title, video URL, duration, watch count, column, publish date, cover
- **Rehosted video covers:** the homepage serves video covers as **signed CDN URLs** (`p*-dcd-sign.byteimg.com` with `x-expires`) that 403 about 7 days after the scrape. The actor downloads each cover and rehosts it into its Apify Key-Value Store, so `coverUrl` is a permanent, anonymous, hotlink-safe URL. The original signed URL is kept for traceability as `coverUrlOriginal` (it expires — treat it as a short-lived cache hint). If a cover download fails the field is omitted entirely (never an expiring `coverUrl`).
- **Auto-escalation:** on 403/429 the actor lazily engages the free Apify AUTO datacenter proxy and retries with backoff
- **Typed error records** for invalid inputs
- Empty fields are omitted (`strip_nulls` before every push)

### Output fields

**Car records** (`recordType: "car"`): `carName`, `seriesId`, `seriesUrl`, `category` (轿车 / SUV / 其他)

**New-car records** (`recordType: "newCar"`): `carName`, `priceMin`, `priceMax` (10k CNY), `status`, `releaseTag`(+`releaseTags`), `releaseDate`, `seriesId`, `seriesUrl`, `brandId`, `brandName`, `energyType`, `articleTitle`, `articleUrl`, `imageUrl`

**Brand records** (`recordType: "brand"`): `brandName`, `brandId`, `brandUrl`, `logoUrl`

**News records** (`recordType: "news"`): `articleId`, `title`, `articleUrl`, `isVideo`, `hot`

**Video records** (`recordType: "video"`): `videoId`, `title`, `videoUrl`, `coverUrl` (permanent, rehosted in the actor's KV store), `coverUrlOriginal` (upstream signed URL — expires ~7 days after scraping), `videoDuration`, `watchCount`, `columnName`, `publishDate`

**Error records** (`recordType: "error"`): `input`, `message`

All data records carry `recordType`, `scrapedAt`, `sourceUrl`; error records are diagnostics (`input`, `message`) without a `sourceUrl`.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | select | `hotCars` | `hotCars` / `newCars` / `byCarModel` / `byBrand` / `news` / `videos` |
| `carCategory` | select | `all` | `all` / `轿车` / `SUV` / `其他` |
| `carModel` | text | `凯美瑞` | Car name to look up (mode=byCarModel) |
| `brandId` | select | `3` | 33 brands: 奔驰, 宝马, 大众, 奥迪, 小米汽车, 特斯拉, 本田, 丰田, 吉利汽车, 坦克, 路虎, 比亚迪, 红旗, 理想汽车, 雷克萨斯, 凯迪拉克, 保时捷, 蔚来, 极氪, 小鹏汽车, 现代, 沃尔沃, 福特, 日产, 广汽传祺, 别克, 长安, 腾势, 奇瑞, 北京越野, 方程豹, 哈弗, 零跑汽车 |
| `minPrice` / `maxPrice` | number (0–1000) | – | Price filter (10k CNY, mode=newCars) |
| `containsKeyword` | text | – | Substring filter on car/brand/news/video names |
| `maxItems` | int (1–500) | `50` | Hard cap |

#### Examples

```json
{ "mode": "hotCars", "carCategory": "SUV" }
{ "mode": "newCars", "minPrice": 10, "maxPrice": 25 }
{ "mode": "byCarModel", "carModel": "Model Y" }
{ "mode": "byBrand", "brandId": "535", "maxItems": 10 }
{ "mode": "news", "maxItems": 20 }
{ "mode": "videos", "containsKeyword": "实测", "maxItems": 10 }
```

### Data source

The dongchedi.com homepage is server-side rendered and requires no login. Parsing prefers the structured `__NEXT_DATA__` JSON embedded in the page (stable schema: `newCarData`, `popularModels.hot_brand`, `popularModels.*.series`, `todayNews`, `homeOriginal.video_list`) with the HTML regex parsers as fallback. Car **detail** pages (`/auto/series/<id>`, `/auto/library/*`, brand libraries) redirect to a login wall, so this actor's coverage is the homepage surface: hot lists, new-car launches, brand directory, news and videos. This is documented as a limitation — see below.

### Limitations

- Car series detail pages, the car library (`/auto/library/*`) and brand library pages require a Dongchedi login — they redirect to `/login-required`. Only the homepage is public, so `byCarModel` matches against the homepage lists and new-car block (the 30 most prominent models).
- Prices exist only for new-car launches, not for the generic hot lists.
- The homepage hot lists rotate; the car set is Dongchedi's editorial pick, not the full catalog.
- Some new-car entries have no price yet (`暂无报价`) — those records simply omit `priceMin`/`priceMax`.
- News and videos are homepage-only feeds (no pagination); `hot` marks the curated head articles.

### Use cases

- Daily new-car launch monitoring with pricing
- Market-mapping of the top sedans / SUVs in China
- Brand directory building with logos
- Reference data for automotive content pipelines

### FAQ

**What does `priceMin`/`priceMax` mean?** The new-car block shows a range in 万元 (10k CNY), e.g. `19.79-19.79` → both 19.79. Single values are emitted as both bounds.

**Why can't I get full specs?** Spec tables live on the login-gated series pages. This actor covers the entire publicly accessible surface of dongchedi.com.

**What are series ids?** Dongchedi's internal car-series ids used in canonical URLs: `https://www.dongchedi.com/auto/series/<id>`.

# Actor input Schema

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

What to fetch.

## `carCategory` (type: `string`):

Which homepage hot list to emit.

## `carModel` (type: `string`):

Car name to look up, e.g. `凯美瑞`, `Model Y`, `奥迪A6L`.

## `brandId` (type: `string`):

Hot brand to emit.

## `minPrice` (type: `number`):

Drop new-car records priced below this (mode=newCars).

## `maxPrice` (type: `number`):

Drop new-car records priced above this (mode=newCars).

## `containsKeyword` (type: `string`):

Only emit records whose name contains this substring.

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

Hard cap on emitted records.

## Actor input object example

```json
{
  "mode": "hotCars",
  "carCategory": "all",
  "carModel": "凯美瑞",
  "brandId": "3",
  "maxItems": 50
}
```

# Actor output Schema

## `cars` (type: `string`):

Dataset containing all scraped Dongchedi car and brand records.

# 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 = {
    "mode": "hotCars",
    "carCategory": "all",
    "carModel": "凯美瑞",
    "brandId": "3",
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlerbros/dongchedi-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 = {
    "mode": "hotCars",
    "carCategory": "all",
    "carModel": "凯美瑞",
    "brandId": "3",
    "maxItems": 50,
}

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

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

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

```

## CLI example

```bash
echo '{
  "mode": "hotCars",
  "carCategory": "all",
  "carModel": "凯美瑞",
  "brandId": "3",
  "maxItems": 50
}' |
apify call crawlerbros/dongchedi-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=crawlerbros/dongchedi-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

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