> ## Documentation Index
> Fetch the complete documentation index at: https://docs.olostep.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 任务和监控命令

> 爬取、批处理、监控、代理和日志：长时间运行的工作及其历史记录。

这些命令启动运行一段时间的工作，并读取其进度和结果。列出结果的命令通过 `--limit` 和 `--cursor`（或 `--offset`）分页：传递上一个结果的光标以获取下一页。

## crawl

爬取一个网站。`olostep crawl <url>` 运行 `olostep crawl create`。参见 [Crawls](https://docs.olostep.com/features/crawls.md)。

### olostep crawl list

列出你最近的爬取任务。

```bash theme={null}
olostep crawl list [--limit integer] [--source text] [--offset integer] [--json] [--fields a,b]
```

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `--limit` | 否 | 页面大小。 |
| `--source` | 否 | 来源过滤器。 |
| `--offset` | 否 | 从上一页开始的零基偏移量。 |

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep crawl list --limit 10
```

### olostep crawl get

显示爬取任务的进度和设置。

```bash theme={null}
olostep crawl get [--json] [--fields a,b] <crawl_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `crawl_id` | 爬取任务 ID。 |

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep crawl get <crawl_id>
```

### olostep crawl pages

显示爬取结果的一页。每页都有一个用于 `olostep content retrieve` 的检索 ID。

```bash theme={null}
olostep crawl pages [--limit integer] [--cursor text] [--json] [--fields a,b] <crawl_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `crawl_id` | 爬取任务 ID。 |

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `--limit` | 否 | 此页的最大记录数。 |
| `--cursor` | 否 | 上一个结果的下一页光标。 |

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep crawl pages <crawl_id>
olostep crawl pages <crawl_id> --limit 100 --json
```

### olostep crawl create

爬取一个网站，从起始 URL 开始跟随链接，直到达到页面限制。

> [!NOTE]
>
> 使用积分。

```bash theme={null}
olostep crawl create (--max-pages integer) [--depth integer] [--include-urls string]... [--exclude-urls string]... [--include-external] [--include-subdomain] [--follow-robots-txt] [--ignore-sitemap] [--scrape-options json] [--preview] [--start-url text] [--json] [--fields a,b] [--dry-run] [<start_url>]
```

简写：`olostep crawl <url>`。

**参数**

| 参数 | 描述 |
| - | - |
| `start_url` | 一个 http(s) URL。可选；你可以将其作为标志传递。 |

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `-n`, `--max-pages` | 是 | 爬取的最大页面数。 |
| `--depth` | 否 | 从起始 URL 开始的最大链接深度。 |
| `--include-urls` | 否 | 要包含的 URL 模式。重复标志，或用逗号分隔值。 |
| `--exclude-urls` | 否 | 要排除的 URL 模式。重复标志，或用逗号分隔值。 |
| `--include-external` | 否 | 跟随外部链接。 |
| `--include-subdomain` | 否 | 包含子域名。 |
| `--follow-robots-txt` | 否 | 遵循 robots.txt。 |
| `--ignore-sitemap` | 否 | 忽略站点地图。 |
| `--scrape-options` | 否 | 仪表板支持的抓取选项。JSON 对象，或 `@file.json`。 |
| `--start-url` | 否 | 与 `start_url` 参数相同。 |

也接受 `--json`、`--fields`、`--dry-run` 和 `--preview`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep crawl https://docs.example.com -n 50
olostep crawl https://example.com -n 200 --depth 3 --include-urls "/blog/**" --exclude-urls "/tag/**"
```

## batch

在一个任务中抓取多个 URL。参见 [Batches](https://docs.olostep.com/features/batches.md)。

### olostep batch list

列出你最近的批处理任务。

```bash theme={null}
olostep batch list [--limit integer] [--source text] [--status text] [--search text] [--offset integer] [--json] [--fields a,b]
```

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `--limit` | 否 | 页面大小。 |
| `--source` | 否 | 来源过滤器。 |
| `--status` | 否 | 批处理状态。 |
| `--search` | 否 | 搜索过滤器。 |
| `--offset` | 否 | 从上一页开始的零基偏移量。 |

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep batch list --limit 20
olostep batch list --status completed --json
```

### olostep batch get

显示批处理任务的进度和元数据。

```bash theme={null}
olostep batch get [--json] [--fields a,b] <batch_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `batch_id` | 批处理 ID。 |

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep batch get <batch_id>
```

### olostep batch items

显示批处理任务的项目页：每个输入 URL 及其结果。

```bash theme={null}
olostep batch items [--limit integer] [--cursor text] [--json] [--fields a,b] <batch_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `batch_id` | 批处理 ID。 |

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `--limit` | 否 | 此页的最大记录数。 |
| `--cursor` | 否 | 上一个结果的下一页光标。 |

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep batch items <batch_id> --limit 50
olostep batch items <batch_id> --cursor <next_cursor>
```

### olostep batch create

创建一个批处理任务以抓取 URL 列表。每个项目都有你自己的 `custom_id` 和一个 `url`。最多 10,000 个项目。

> [!NOTE]
>
> 使用积分。

```bash theme={null}
olostep batch create (--items json) [--country text] [--parser json] [--metadata json] [--preview] [--json] [--fields a,b] [--dry-run]
```

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `--items` | 是 | 要抓取的 URL：一个 `{"custom_id": "...", "url": "..."}` 的 JSON 列表，或 `@file.json`。 |
| `--country` | 否 | 可选国家。 |
| `--parser` | 否 | 在每个页面上运行的解析器：`{"id": "<parser_id>"}`，或 `@file.json`。 |
| `--metadata` | 否 | 批处理元数据。JSON 对象，或 `@file.json`。 |

也接受 `--json`、`--fields`、`--dry-run` 和 `--preview`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep batch create --items '[{"custom_id":"home","url":"https://example.com"},{"custom_id":"pricing","url":"https://example.com/pricing"}]'
olostep batch create --items @urls.json --country US
```

### olostep batch update

替换批处理任务的元数据。

```bash theme={null}
olostep batch update (--metadata json) [--preview] [--json] [--fields a,b] [--dry-run] <batch_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `batch_id` | 批处理 ID。 |

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `--metadata` | 是 | 元数据对象。JSON 对象，或 `@file.json`。 |

也接受 `--json`、`--fields`、`--dry-run` 和 `--preview`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep batch update <batch_id> --metadata '{"project":"q4-pricing"}'
```

### olostep batch export

开始准备下载批处理任务的结果。使用 `olostep batch export-status` 检查。

```bash theme={null}
olostep batch export [--preview] [--json] [--fields a,b] [--dry-run] <batch_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `batch_id` | 批处理 ID。 |

也接受 `--json`、`--fields`、`--dry-run` 和 `--preview`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep batch export <batch_id>
olostep batch export-status <batch_id>
```

### olostep batch export-status

检查导出的进度，并在准备好时获取其下载 URL。

```bash theme={null}
olostep batch export-status [--json] [--fields a,b] <batch_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `batch_id` | 批处理 ID。 |

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep batch export-status <batch_id>
```

## monitors

按计划监控网页的变化。参见 [Monitors](https://docs.olostep.com/features/monitors.md)。

### olostep monitors list

列出你的监控任务。

```bash theme={null}
olostep monitors list [--include-deleted] [--json] [--fields a,b]
```

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `--include-deleted` | 否 | 包括已删除的监控任务。 |

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep monitors list
```

### olostep monitors get

显示监控任务的设置和当前状态。

```bash theme={null}
olostep monitors get [--json] [--fields a,b] <monitor_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `monitor_id` | 监控任务 ID。 |

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep monitors get <monitor_id>
```

### olostep monitors create

创建一个监控任务，按计划监控你描述的网页。

> [!NOTE]
>
> 使用积分。

```bash theme={null}
olostep monitors create (--query text) [--urls string]... (--frequency text) [--notification json] [--webhook json] [--source-policy json] [--output-schema json] [--preview] [--json] [--fields a,b] [--dry-run]
```

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `--query` | 是 | 要监控的内容，用简单的语言描述。 |
| `--urls` | 否 | 可选的来源 URL。重复标志，或用逗号分隔值。 |
| `--frequency` | 是 | 检查频率，用语言描述，例如 `every day at 9am`（UTC）。 |
| `--notification` | 否 | 通知渠道和事件偏好。JSON 对象，或 `@file.json`。 |
| `--webhook` | 否 | Webhook 配置。JSON 对象，或 `@file.json`。 |
| `--source-policy` | 否 | 包含/排除的 URL 和域名。JSON 对象，或 `@file.json`。 |
| `--output-schema` | 否 | 预期的结构化输出模式。JSON 对象，或 `@file.json`。 |

也接受 `--json`、`--fields`、`--dry-run` 和 `--preview`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep monitors create --query "New pricing changes on example.com" --urls https://example.com/pricing --frequency "every day at 9am"
```

### olostep monitors update

更改监控任务的频率、通知、webhook 或元数据。

```bash theme={null}
olostep monitors update [--frequency text] [--notification json] [--webhook json] [--metadata json] [--preview] [--json] [--fields a,b] [--dry-run] <monitor_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `monitor_id` | 监控任务 ID。 |

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `--frequency` | 否 | 检查频率，用语言描述，例如 `every day at 9am`（UTC）。 |
| `--notification` | 否 | 通知渠道和事件偏好。JSON 对象，或 `@file.json`。 |
| `--webhook` | 否 | Webhook 配置。JSON 对象，或 `@file.json`。 |
| `--metadata` | 否 | 监控任务元数据。JSON 对象，或 `@file.json`。 |

也接受 `--json`、`--fields`、`--dry-run` 和 `--preview`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep monitors update <monitor_id> --frequency "every 20 minutes"
```

### olostep monitors pause

暂停一个监控任务。

```bash theme={null}
olostep monitors pause [--preview] [--json] [--fields a,b] [--dry-run] <monitor_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `monitor_id` | 监控任务 ID。 |

也接受 `--json`、`--fields`、`--dry-run` 和 `--preview`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep monitors pause <monitor_id>
```

### olostep monitors resume

恢复已暂停的监控任务。

```bash theme={null}
olostep monitors resume [--preview] [--json] [--fields a,b] [--dry-run] <monitor_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `monitor_id` | 监控任务 ID。 |

也接受 `--json`、`--fields`、`--dry-run` 和 `--preview`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep monitors resume <monitor_id>
```

### olostep monitors delete

删除一个监控任务。

> [!NOTE]
>
> 运行前会询问；当没有终端时传递 `--yes`。

```bash theme={null}
olostep monitors delete [--preview] [--json] [--fields a,b] [--dry-run] [--yes] <monitor_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `monitor_id` | 监控任务 ID。 |

也接受 `--json`、`--fields`、`--dry-run`、`--preview` 和 `--yes`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep monitors delete <monitor_id> --dry-run
olostep monitors delete <monitor_id> --yes
```

### olostep monitors events

显示监控任务运行事件的一页。

```bash theme={null}
olostep monitors events [--limit integer] [--cursor text] [--status text] [--json] [--fields a,b] <monitor_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `monitor_id` | 监控任务 ID。 |

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `--limit` | 否 | 此页的最大记录数。 |
| `--cursor` | 否 | 上一个结果的下一页光标。 |
| `--status` | 否 | 运行状态过滤器。 |

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep monitors events <monitor_id> --limit 20
```

### olostep monitors planning

显示监控任务的计划及其运行方式。

```bash theme={null}
olostep monitors planning [--json] [--fields a,b] <monitor_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `monitor_id` | 监控任务 ID。 |

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep monitors planning <monitor_id>
```

### olostep monitors run

立即运行一个监控任务，使用其保存的设置。

> [!NOTE]
>
> 使用积分。

```bash theme={null}
olostep monitors run (--monitor-id text) [--preview] [--json] [--fields a,b] [--dry-run]
```

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `--monitor-id` | 是 | 监控任务 ID。 |

也接受 `--json`、`--fields`、`--dry-run` 和 `--preview`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep monitors run --monitor-id <monitor_id>
```

### olostep monitors run-get

显示一个监控任务运行及其结构化快照。

```bash theme={null}
olostep monitors run-get [--include-trace] [--json] [--fields a,b] <monitor_id> <run_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `monitor_id` | 监控任务 ID。 |
| `run_id` | 运行 ID。 |

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `--include-trace` | 否 | 包括执行跟踪。 |

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep monitors run-get <monitor_id> <run_id>
olostep monitors run-get <monitor_id> <run_id> --include-trace --json
```

### olostep monitors logs

显示监控任务运行的最近日志。

```bash theme={null}
olostep monitors logs [--since integer] [--json] [--fields a,b] <monitor_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `monitor_id` | 监控任务 ID。 |

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `--since` | 否 | 开始时间，自 Unix 纪元以来的毫秒数。 |

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep monitors logs <monitor_id>
```

### olostep monitors snapshot

显示一个监控任务运行的结构化快照。

```bash theme={null}
olostep monitors snapshot [--json] [--fields a,b] <monitor_id> <run_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `monitor_id` | 监控任务 ID。 |
| `run_id` | 运行 ID。 |

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep monitors snapshot <monitor_id> <run_id> --json
```

### olostep monitors share

获取监控任务的公共共享链接。不会更改谁可以查看。

```bash theme={null}
olostep monitors share [--json] [--fields a,b] <monitor_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `monitor_id` | 监控任务 ID。 |

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep monitors share <monitor_id>
```

## agents

运行研究代理。参见 [Agents](https://docs.olostep.com/features/agents.md)。

### olostep agents list

列出你的团队可用的研究代理。

```bash theme={null}
olostep agents list [--json] [--fields a,b]
```

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep agents list
```

### olostep agents get

显示代理的详细信息和默认输入。

```bash theme={null}
olostep agents get [--version text] [--json] [--fields a,b] <agent_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `agent_id` | 代理 ID。 |

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `--version` | 否 | 版本。 |

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep agents get <agent_id>
```

### olostep agents runs

列出研究代理的运行。

```bash theme={null}
olostep agents runs [--json] [--fields a,b] <agent_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `agent_id` | 代理 ID。 |

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep agents runs <agent_id>
```

### olostep agents run

使用你的输入值运行研究代理。

> [!NOTE]
>
> 使用积分。

```bash theme={null}
olostep agents run [--version text] [--input-values json] [--preview] [--json] [--fields a,b] [--dry-run] <agent_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `agent_id` | 代理 ID。 |

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `--version` | 否 | 代理版本。 |
| `--input-values` | 否 | 匹配代理声明模式的输入值。JSON 对象，或 `@file.json`。 |

也接受 `--json`、`--fields`、`--dry-run` 和 `--preview`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep agents get <agent_id>
olostep agents run <agent_id> --input-values @inputs.json
```

### olostep agents run-get

显示研究代理运行的状态和结果。

```bash theme={null}
olostep agents run-get [--json] [--fields a,b] <agent_id> <run_id>
```

**参数**

| 参数 | 描述 |
| - | - |
| `agent_id` | 代理 ID。 |
| `run_id` | 运行 ID。 |

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep agents run-get <agent_id> <run_id>
```

### olostep agents request

请求 Olostep 团队为你构建一个自定义研究代理。

```bash theme={null}
olostep agents request (--task text) [--model text] [--schedule text] [--budget text] [--preview] [--json] [--fields a,b] [--dry-run]
```

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `--task` | 是 | 请求的研究工作流程。 |
| `--model` | 否 | 请求的模型。 |
| `--schedule` | 否 | 请求的时间表。 |
| `--budget` | 否 | 请求的预算。 |

也接受 `--json`、`--fields`、`--dry-run` 和 `--preview`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep agents request --task "Every Monday, find new Series A fintech companies in Europe" --schedule "weekly"
```

## logs

读取你的团队对 Olostep API 的请求。

### olostep logs list

显示你的 API 请求日志的一页。按状态、端点和方法过滤。

```bash theme={null}
olostep logs list [--days 1|7|30|90] [--page integer] [--size integer] [--status text] [--endpoint text] [--method GET|POST|PUT|PATCH|DELETE] [--json] [--fields a,b]
```

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `--days` | 否 | 回溯天数窗口。可选：`1`、`7`、`30`、`90`。 |
| `--page` | 否 | 页码，从 1 开始。 |
| `--size` | 否 | 页面大小。 |
| `--status` | 否 | HTTP 状态过滤器。 |
| `--endpoint` | 否 | 端点/路径过滤器。 |
| `--method` | 否 | HTTP 方法过滤器。可选：`GET`、`POST`、`PUT`、`PATCH`、`DELETE`。 |

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep logs list --days 7
olostep logs list --days 1 --status 429 --method POST
```

### olostep logs export

将你的 API 请求日志导出为 JSON 或 CSV。

```bash theme={null}
olostep logs export [--days 1|7|30|90] [--format json|csv] [--max-pages integer] [--status text] [--endpoint text] [--method GET|POST|PUT|PATCH|DELETE] [--json] [--fields a,b]
```

**标志**

| 标志 | 必需 | 描述 |
| - | - | - |
| `--days` | 否 | 回溯天数窗口。可选：`1`、`7`、`30`、`90`。 |
| `--format` | 否 | 导出格式。可选：`json`、`csv`。 |
| `--max-pages` | 否 | 要导出的日志的最大页数（1 到 100）。 |
| `--status` | 否 | HTTP 状态过滤器。 |
| `--endpoint` | 否 | 端点或路径过滤器。 |
| `--method` | 否 | HTTP 方法过滤器。可选：`GET`、`POST`、`PUT`、`PATCH`、`DELETE`。 |

也接受 `--json` 和 `--fields`。参见 [全局标志](https://docs.olostep.com/cli/usage.md#global-flags)。

```bash theme={null}
olostep logs export --days 30 --format csv
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.