# Google Maps 商家採集工具 (`futurizerush/google-maps-scraper-zh-tw`) Actor

專為名單開發的 Google 地圖商家爬蟲：可擷取地址、電話、營業時間、評分、網站，並從連結網站抓取電子郵件。可與 Make.com、n8n 集成，進行 AI 自動化工作流的整合。

- **URL**: https://apify.com/futurizerush/google-maps-scraper-zh-tw.md
- **Developed by:** [Rush](https://apify.com/futurizerush) (community)
- **Categories:** Automation, Lead generation, AI
- **Features:** Limited permissions
- **Stats:** 85 total users, 2 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $10.00 / 1,000 results

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

## Google Maps 商家資料爬蟲（繁體中文）

從 Google Maps 擷取商家資料，包含地址、電話、網站、評分、營業時間，並可選擇從商家網站提取電子郵件。

適合用於商業名單建立、市場研究、區域競品分析與 B2B 潛在客戶開發。

***

### 可擷取內容

- 商家名稱、類型、地址、電話
- Google Maps 連結、Place ID、座標（緯度/經度）
- 評分與評論數
- 營業時間（陣列）與結構化營業時間（`hoursDetail`）
- 商家網站
- 電子郵件（`email` 主信箱、`emails` 全部信箱）

***

### 快速開始

#### 基本查詢

```json
{
  "searchQueries": ["台北信義區咖啡廳"],
  "maxResults": 50,
  "language": "zh-TW",
  "scrapeEmails": true
}
```

#### 多查詢批次

```json
{
  "searchQueries": [
    "台中西屯區牙醫",
    "高雄左營區健身房",
    "新竹東區義大利餐廳"
  ],
  "maxResults": 80,
  "language": "zh-TW",
  "scrapeEmails": false
}
```

#### 使用 Google Maps 直接網址

```json
{
  "startUrls": [
    { "url": "https://www.google.com/maps/search/台北東區咖啡廳" }
  ],
  "maxResults": 50,
  "scrapeEmails": true
}
```

***

### 輸入參數

| 參數 | 類型 | 必填 | 預設 | 範圍 | 說明 |
|---|---|---|---|---|---|
| `searchQueries` | Array | 否\* | - | 1-50 筆 | 關鍵字查詢，例如「台北信義區咖啡廳」 |
| `startUrls` | Array | 否\* | - | 1-20 筆 | Google Maps 搜尋或地點網址 |
| `maxResults` | Integer | 否 | 50 | 50-200 | 每個查詢/網址的目標最大筆數 |
| `language` | String | 否 | `zh-TW` | `en` / `zh-TW` | Google Maps 介面語言 |
| `scrapeEmails` | Boolean | 否 | `true` | - | 是否從商家網站提取電子郵件 |

\* `searchQueries` 與 `startUrls` 至少需提供一項。

***

### 輸出資料格式

每筆商家資料包含（依實際頁面可得資料而定）：

```json
{
  "name": "Blue Bottle Coffee",
  "placeId": "ChIJN1t_tDeuEmsRUsoyG83frY4",
  "latitude": 37.7749,
  "longitude": -122.4194,
  "rating": 4.5,
  "reviews": 1832,
  "address": "66 Mint St, San Francisco, CA 94103",
  "businessType": "Coffee shop",
  "phone": "+1 415-555-0123",
  "website": "https://bluebottlecoffee.com",
  "email": "info@bluebottlecoffee.com",
  "emails": ["info@bluebottlecoffee.com", "support@bluebottlecoffee.com"],
  "hours": ["Monday: 7 AM to 6 PM"],
  "hoursDetail": {
    "Monday": "7 AM to 6 PM"
  },
  "url": "https://www.google.com/maps/place/...",
  "query": "coffee shops in San Francisco",
  "sourceUrl": "https://www.google.com/maps/search/coffee+shops+in+San+Francisco",
  "timestamp": "2026-02-24T03:05:00.000Z",
  "scrapeDuration": 48
}
```

查詢或網址失敗時，會寫入 `errors` 視圖：

```json
{
  "query": "台北信義區咖啡廳",
  "sourceUrl": "https://www.google.com/maps/search/台北信義區咖啡廳",
  "errorType": "TIMEOUT",
  "error": "Navigation timeout of 30000 ms exceeded",
  "persistedCount": 0,
  "timestamp": "2026-02-24T03:05:00.000Z"
}
```

***

### Output / Dataset / KV 導覽

本 Actor 會提供：

- Dataset `businesses`：商家資料
- Dataset `errors`：失敗紀錄
- KV `INPUT`：正規化輸入
- KV `STATS`：執行統計與錯誤摘要
- KV `FATAL_ERROR`：致命錯誤（僅發生時）

#### 為何 `errors` 可能是空的？

若本次所有查詢都成功，`errors` 視圖會是空集合，屬於正常狀態。請改看 `STATS`：

- `errorRecords`：錯誤資料列數量
- `errorDatasetStatus`：錯誤視圖狀態說明
- `errorDatasetUrl`：錯誤視圖 API 連結（可用時）

***

### 結果數量說明

`maxResults` 是目標上限，不是強制保證值。實際筆數可能少於目標，常見原因：

- 該地區可用商家本來就不足
- Google Maps 列表去重後可用唯一商家較少
- Google 即時回傳結果波動

此行為屬於資料來源特性，不代表執行失敗。

***

### 使用建議

- 先用 `maxResults=50` 驗證資料品質，再擴大到 100~200
- 關鍵字建議同時包含「地區 + 商家類型」
- 只有在需要聯絡用途時再開啟 `scrapeEmails`

***

### 合規與責任

本工具僅擷取公開可得資訊。請自行遵守：

- Google Maps 服務條款
- 當地資料保護法規（例如 GDPR、CCPA）
- 電子郵件與行銷法規

# Actor input Schema

## `searchQueries` (type: `array`):

輸入搜尋條件，例如「台北信義區咖啡廳」或「高雄牙醫診所」

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

建議先用 50 到 100 評估結果品質

## `language` (type: `string`):

Google Maps 介面語言

## `scrapeEmails` (type: `boolean`):

是否從商家網站提取電子郵件地址

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

直接提供 Google Maps 搜尋網址，與 searchQueries 擇一或同時使用

## Actor input object example

```json
{
  "searchQueries": [
    "台北信義區咖啡廳"
  ],
  "maxResults": 50,
  "language": "zh-TW",
  "scrapeEmails": true
}
```

# Actor output Schema

## `businesses` (type: `string`):

No description

## `errors` (type: `string`):

No description

## `input` (type: `string`):

No description

## `stats` (type: `string`):

No description

## `fatalError` (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 = {
    "searchQueries": [
        "台北信義區咖啡廳"
    ],
    "maxResults": 50,
    "language": "zh-TW"
};

// Run the Actor and wait for it to finish
const run = await client.actor("futurizerush/google-maps-scraper-zh-tw").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 = {
    "searchQueries": ["台北信義區咖啡廳"],
    "maxResults": 50,
    "language": "zh-TW",
}

# Run the Actor and wait for it to finish
run = client.actor("futurizerush/google-maps-scraper-zh-tw").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 '{
  "searchQueries": [
    "台北信義區咖啡廳"
  ],
  "maxResults": 50,
  "language": "zh-TW"
}' |
apify call futurizerush/google-maps-scraper-zh-tw --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,futurizerush/google-maps-scraper-zh-tw"
        }
    }
}
```

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/hObIpg7rlrRbL5X71/builds/lj6kNA5caNkdjOQkz/openapi.json
