# 8891 中古車爬蟲｜二手車價格、里程、車齡、車商一鍵匯出（免 API） (`claude_code_reviewer/8891-scraper`) Actor

免登入抓 8891 中古車：車名、價格、里程、車齡、地區、品牌與車商／個人賣家，價格里程自動轉數字，輸出 JSON／CSV／Excel。二手車行情、殘值分析、車商選品必備。

- **URL**: https://apify.com/claude\_code\_reviewer/8891-scraper.md
- **Developed by:** [Chad](https://apify.com/claude_code_reviewer) (community)
- **Categories:** AI, Automation, E-commerce
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 中古車搜尋

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/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

## 8891 中古車爬蟲｜二手車價格、里程、車商一鍵下載（免 API、免登入）

一個 Actor 抓 [8891 汽車](https://auto.8891.com.tw/)（台灣最大中古車交易平台之一）的**中古車搜尋列表**：車價、里程、年份、地區、廠牌車系、車商/個人賣家等完整欄位。不需要登入、不需要 API token，走 8891 公開 JSON 端點，不開瀏覽器，速度快、成本低。價格（如「20.8萬」）、里程（如「1.8萬公里」）自動轉成數字，方便直接拿去做行情分析或比價。

給誰用的：追蹤特定車型行情波動的、做二手車比價網站的、寫市場調查報告的、跑車輛數據分析的、論文需要資料集的、自己寫 side project 的工程師。

***

### 能抓到什麼

每一筆中古車都會拿到下面這些欄位（缺值一律回 `null`，不會少欄位）：

| 欄位             | 說明                             | 範例                                                    |
| ---------------- | -------------------------------- | -------------------------------------------------------- |
| `item_id`         | 8891 車輛 ID                     | `4723802`                                                 |
| `title`           | 標題                              | `Toyota Corolla Altis 2016款 頂級版 1.8L`                 |
| `sub_title`       | 副標題（賣點文案）                | `實跑1.8萬、車況極佳`                                     |
| `price_raw`       | 原始價格字串                      | `20.8萬`                                                  |
| `price`           | 正規化後價格（新台幣元）          | `208000`                                                  |
| `mileage_raw`     | 原始里程字串                      | `1.8萬公里`                                               |
| `mileage`         | 正規化後里程（公里）              | `18000`                                                   |
| `make_year`       | 年份（原始字串）                  | `2016年`                                                  |
| `region`          | 賣家所在地區                      | `新北市`                                                  |
| `color`           | 顏色                              | `白色`                                                    |
| `displacement`     | 排氣量                           | `1.8L`                                                    |
| `brand`           | 廠牌（英文）                      | `Toyota`                                                  |
| `brand_id`        | 廠牌 ID（8891 內部代碼）          | `46`                                                      |
| `kind`            | 車系（英文）                      | `Corolla Altis`                                           |
| `model`           | 車型（英文，常為空 → null）       | `null`                                                    |
| `model_id`        | 車型 ID                          | `10289`                                                   |
| `image`           | 主圖網址（優先大圖）              | `https://p1.8891.com.tw/.../xxx_600_450.jpg`              |
| `is_dealer`       | 是否為車商刊登（非個人賣家）      | `true`                                                    |
| `is_top_dealer`   | 是否為置頂車商                    | `false`                                                   |
| `total_view_num`  | 累積瀏覽數                        | `1476`                                                    |
| `post_date`       | 上架時間                          | `2026-06-30 18:57:03`                                     |
| `renew_date`      | 最後更新時間                      | `2026-06-30 18:57:03`                                     |
| `item_url`        | 車輛詳情頁網址                    | `https://auto.8891.com.tw/4723802`                        |
| `source_mode`      | 這筆從哪個模式來的                | `search`                                                  |
| `source_query`     | 抓取時用的關鍵字（留空搜尋則為空字串） | `Toyota`                                                  |
| `scraped_at`       | 抓取當下時間（ISO 8601）          | `2026-07-04T05:23:28.617Z`                                |

***

### 模式

| mode         | 幹嘛用的                                             | 計費事件                 | 單價   |
| ------------ | ----------------------------------------------------- | ------------------------ | ------ |
| 🔎 **search** | 關鍵字搜尋中古車列表，留空關鍵字則抓全站最新上架 | `search-listing`（每筆） | $0.002 |

v1.0 **只有** `search` 一種模式。每次 Run 啟動都會額外收一次性的 `actor-start` 費用 **$0.005**。所有計費都在資料成功寫入 dataset **之後**才會收，Run 結束時 log 會印出 `total_items / charged / skipped` 讓你對帳。

**車輛詳情頁（完整規格、配備、聯絡車商、認證報告）規劃於 v1.1**：8891 的詳情端點目前直接 fetch 會被瀏覽器擋下（CORS `Failed to fetch`），需要先用瀏覽器 devtools 攔截真實的 detail XHR 請求才能實作，v1.0 尚未支援。

***

### 輸入欄位

| 欄位                | 型別     | 必填 |  預設    | 說明                                                                                                    |
| ------------------- | -------- | :--: | :------: | --------------------------------------------------------------------------------------------------------- |
| `mode`               | enum     | 選填 | `search` | v1.0 只有 `search`。                                                                                       |
| `keywords`           | string\[] | 選填 |    —     | 搜尋關鍵字，例如 `Toyota`、`Altis`、`賓士`。**留空則抓全站最新上架中古車（不篩選）**。單次最多 **50** 個。 |
| `bulkInput`          | string   | 選填 |    —     | **一行一個關鍵字**，按 Enter 換行，不要加引號或逗號。執行時自動併入 `keywords`。                          |
| `maxItems`           | integer  | 選填 |   `50`   | 每個關鍵字（或整體不篩選搜尋）最多抓幾筆，1-500。越多費用越高。                                            |
| `proxyConfiguration` | object   | 選填 |   關閉   | 8891 搜尋 API 對 datacenter 請求友善，預設不用 proxy 即可運作。                                            |

**關於關鍵字篩選**：`keyword` 參數經探測**已確認可用**（測試 `Toyota` 關鍵字後，總筆數從 38534 筆降到 5412 筆、且回傳結果全部是 Toyota 車款）。廠牌/車系下拉篩選（`brand`/`kind` id 對照表）尚未建立，規劃於 v1.1。

***

### 範例

**🔎 抓全站最新上架（不篩選關鍵字）**

```json
{
    "mode": "search",
    "maxItems": 30
}
```

**🔎 關鍵字搜尋**

```json
{
    "mode": "search",
    "keywords": ["Toyota", "Altis"],
    "maxItems": 50
}
```

**📋 批量貼上關鍵字**

```json
{
    "mode": "search",
    "bulkInput": "Toyota\nHonda\nBenz",
    "maxItems": 20
}
```

***

### 幾個要注意的地方

- **只抓公開資料**。不需要登入、不需要 8891 帳號，也不會存取任何需要驗證才看得到的內容。
- **不用登入 / 不用 API token**。填好 input 就能跑，沒有任何金鑰要設定。
- **對 8891 伺服器友善**。每個 domain 併發數 ≤5，遇到失敗會用指數退避重試最多 3 次，連續 5 頁拿不到新資料就會自己停並在 log 寫原因，不會空轉燒錢。
- **`model` 常為 `null`**：8891 原始資料裡 `modelEnName` 大多數車輛回傳空字串，屬於平台本身資料完整度問題，非本 Actor 遺漏。
- **`is_dealer` 只反映「是否為刊登車商」（`isRealShop`）**：8891 API 並沒有額外的 `isDealer` 欄位，探測階段已確認實際回應只有 `isRealShop`/`isTopDealer` 兩個相關欄位。
- **價格/里程正規化只信任已驗證過的格式**（`X萬`、`X萬公里`、純數字`公里`）：遇到無法辨識的格式會保留 `_raw` 原始字串、正規化欄位給 `null`，不會亂猜數字。
- **車輛詳情（完整規格、配備、聯絡車商）規劃於 v1.1**，需要先用瀏覽器攔截真實的 detail API 請求。

***

### 常見問題

**Q: 為什麼不篩選關鍵字也能跑？**
留空 `keywords` 就是抓全站最新上架的中古車列表（依 8891 預設排序），適合用來做「全站行情快照」。

**Q: 廠牌/車型下拉篩選什麼時候會有？**
8891 的 `brand`/`kind` 篩選參數吃的是內部 id（不是英文名稱），需要先打 `search-kinds`/`publish-brands` 建立對照表才能實作，規劃在 v1.1。

**Q: 費用怎麼算？**
每次 Run 啟動收一次 `actor-start`（$0.005）；`search` 模式每筆中古車列表收 `search-listing`（$0.002）。都是資料成功寫入 dataset 後才收費，Run log 會印出實際收費筆數。

**Q: 抓不到資料怎麼辦？**
先確認關鍵字有沒有打錯字、換個更常見的關鍵字（廠牌英文名，如 `Toyota`）試試。爬蟲連續 5 次拿不到新資料就會自己停並在 log 寫原因，不會空轉燒錢。

**Q: `price`/`mileage` 有時候是 `null`？**
只有遇到無法辨識的原始格式（非 `X萬`/`X萬公里`/純數字`公里`）才會是 `null`，這時候 `price_raw`/`mileage_raw` 仍會保留原始字串，方便你自行判讀。

***

### 部署

```bash
apify login              # 首次:貼上 Apify token(不會寫進 repo)
apify push               # 建置並上傳到 Apify Store
```

上架後在 Apify Console 的 Monetization 設定 PPE 事件單價:
`actor-start` $0.005、`search-listing` $0.002。

***

### 免責聲明

本爬蟲只收集 8891 中古車平台**公開可見**的車輛列表資料，資料僅供研究與個人用途使用，不用於任何未經授權的商業轉售。使用前請自行確認符合 8891 服務條款與當地法規。對於資料的正確性、即時性或完整性，本 Actor 不做任何保證，車輛實際狀況、價格與是否仍在售請以 8891 官網當下顯示為準。

***

*8891 中古車 爬蟲、二手車、中古車價格、車商資料、二手車行情、台灣汽車數據*

# Actor input Schema

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

v1.0 只有搜尋列表模式。車輛詳情頁(完整規格、配備、賣家聯絡方式)規劃於 v1.1。

## `keywords` (type: `array`):

搜尋關鍵字,例如:Toyota、Altis、賓士。留空則抓全站最新上架中古車(不篩選)。

## `bulkInput` (type: `string`):

**一行一個關鍵字**,按 Enter 換行,不要加引號或逗號。執行時自動併入上面的關鍵字欄位。從 Google Sheet / Excel 複製一整欄貼進來最快。

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

每個關鍵字(或整體不篩選搜尋)最多抓幾筆。越多費用越高。

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

8891 搜尋 API 對 datacenter 請求友善,預設不用 proxy 即可運作。只有大量抓取遇到被擋時才建議開啟。

## Actor input object example

```json
{
  "mode": "search",
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (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 = {
    "mode": "search"
};

// Run the Actor and wait for it to finish
const run = await client.actor("claude_code_reviewer/8891-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": "search" }

# Run the Actor and wait for it to finish
run = client.actor("claude_code_reviewer/8891-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": "search"
}' |
apify call claude_code_reviewer/8891-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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