> ## 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.

# Olostep + Relay

> 在任何 Relay 工作流中添加网页抓取、AI 驱动的研究、批处理作业、爬虫和站点地图，无需代码。

经过验证的 [Relay 上的 Olostep 应用](https://www.relay.app/apps/olostep/integrations)在 Relay 的可视化构建器中为你提供了两个操作：抓取 URL 或映射站点上的所有链接。

[在 Relay 上查看 →](https://www.relay.app/apps/olostep/integrations)

## 在你开始之前

* **拥有 Olostep 帐户和 API 密钥：** [免费获取](https://olostep.com/dashboard)，无需信用卡。你的前 500 个积分已包含在内。
* **拥有 Relay 帐户：** 在 [relay.app](https://www.relay.app/) 创建一个。
* **无需编码：** 本指南中的所有操作均通过 Relay 的可视化编辑器完成。

***

## 设置

<Steps>
  <Step title="在 Relay 中找到 Olostep">
    打开 Relay 中的一个工作流，添加一个步骤，然后搜索 **Olostep**。从应用列表中选择 **Olostep**。

    <img src="https://mintcdn.com/olostep-58/tsUnZlbBbWyR_k2J/images/integrations/relay/step-1.png?fit=max&auto=format&n=tsUnZlbBbWyR_k2J&q=85&s=98c07d083f24985138bf78929bf4c220" alt="占位符：在 Relay 应用选择器中搜索 Olostep" width="617" height="482" data-path="images/integrations/relay/step-1.png" />
  </Step>

  <Step title="选择一个操作">
    选择 **Olostep** 后，在步骤配置中选择一个可用的 Olostep 操作。

    <img src="https://mintcdn.com/olostep-58/tsUnZlbBbWyR_k2J/images/integrations/relay/step-2.png?fit=max&auto=format&n=tsUnZlbBbWyR_k2J&q=85&s=df1d4f84146bf53ade6d31e589e9e134" alt="占位符：Relay 中的 Olostep 操作选择器" width="617" height="482" data-path="images/integrations/relay/step-2.png" />
  </Step>

  <Step title="连接你的帐户">
    点击 **连接帐户**，粘贴你的 Olostep API 密钥，并授权连接。Relay 将保存此帐户以供将来的工作流使用。

    <img src="https://mintcdn.com/olostep-58/tsUnZlbBbWyR_k2J/images/integrations/relay/step-3.png?fit=max&auto=format&n=tsUnZlbBbWyR_k2J&q=85&s=9ab8cd9c18efac7b872c966dba7af73d" alt="占位符：Relay 帐户连接模式，带有 Olostep API 密钥字段" width="896" height="680" data-path="images/integrations/relay/step-3.png" />

    从 [Olostep 仪表板获取你的密钥 →](https://olostep.com/dashboard)
  </Step>

  <Step title="配置抓取网站（URL + 格式）">
    * **要抓取的 URL：** 从上一步映射或手动输入
    * **输出格式：** 选择 `Markdown`、`HTML`、`JSON` 或 `Text`

          <img src="https://mintcdn.com/olostep-58/tsUnZlbBbWyR_k2J/images/integrations/relay/step-4.png?fit=max&auto=format&n=tsUnZlbBbWyR_k2J&q=85&s=13fc76ca9d8d65219d578e9f1f37ee6f" alt="占位符：Relay Olostep 抓取网站字段，带有 URL 和输出格式" width="896" height="680" data-path="images/integrations/relay/step-4.png" />
  </Step>

  <Step title="测试和发布">
    运行测试以验证输出，然后在结果正确时发布或开启工作流。

    <img src="https://mintcdn.com/olostep-58/tsUnZlbBbWyR_k2J/images/integrations/relay/step-5.png?fit=max&auto=format&n=tsUnZlbBbWyR_k2J&q=85&s=1914937ac1104aed2577e6f97cd12ba8" alt="占位符：Relay 测试输出和发布流程" width="886" height="571" data-path="images/integrations/relay/step-5.png" />
  </Step>
</Steps>

***

## 操作

<CardGroup cols={2}>
  <Card title="抓取网站" icon="file-lines">
    从任何 URL 提取内容为 Markdown、HTML、JSON 或纯文本。处理 JS 渲染页面，支持可选等待时间和国家定位。
  </Card>

  <Card title="创建地图" icon="map">
    获取站点上的每个 URL，而不抓取内容。在批处理作业之前用于发现。返回一个 `map_id`。
  </Card>
</CardGroup>

<Note>
  **地图是异步的。** 存储返回的 `map_id`，并在 Relay 中使用延迟/轮询模式在处理完成后检索结果。
</Note>

***

## 示例工作流：定期抓取竞争对手页面

**功能：** 按计划抓取竞争对手页面，并存储可在下游 Relay 步骤中重用的干净内容。

**使用的节点：** Schedule -> Olostep Scrape Website

<img src="https://mintcdn.com/olostep-58/tsUnZlbBbWyR_k2J/images/integrations/relay/workflow-example.png?fit=max&auto=format&n=tsUnZlbBbWyR_k2J&q=85&s=3a84f31ce89c6d4bc4b2a4fb758f7ca3" alt="占位符：Relay 画布显示计划和 Olostep 抓取步骤" width="1392" height="656" data-path="images/integrations/relay/workflow-example.png" />

***

### 步骤 1：添加计划触发器

创建一个工作流并添加一个计划触发器（例如，每个工作日上午 8 点）。

### 步骤 2：添加 Olostep 抓取网站

添加一个 **Olostep** 步骤并选择 **抓取网站**。设置：

* **URL：** `https://competitor.com/blog`
* **输出格式：** Markdown

### 步骤 3：测试和发布

运行测试以确认输出，然后发布或开启工作流。

### 你将获得

每次运行都会产生准备好进行分析或路由的干净页面内容：

> **抓取结果**
>
> * 来源 URL
> * 以你选择的格式检索的内容
> * 在 Relay 中带有时间戳的运行输出

***

## 解析器

在抓取操作的 **解析器** 字段中添加解析器 ID，以获取结构化数据而非原始内容：

| 解析器                          | 提取内容                        |
| ---------------------------- | --------------------------- |
| `@olostep/amazon-product`    | 标题、价格、评分、评论、图片、变体           |
| `@olostep/google-search`     | 结果标题、URL、摘要                 |
| `@olostep/google-maps`       | 商家名称、地址、评分、评论               |
| `@olostep/extract-emails`    | 从任何页面提取电子邮件地址               |
| `@olostep/extract-socials`   | 社交资料链接（X、GitHub、LinkedIn 等） |
| `@olostep/extract-calendars` | Google 日历和 ICS 链接           |

在 [Olostep 解析器商店](https://www.olostep.com/store) 查看完整列表 →

***

## Relay.app 与 Zapier

对于需要内置审查和 AI 优先编排的工作流，Relay.app 是 Zapier 的强大替代方案。

**Relay.app 的优势：**

* **人机协作：** 工作流中的原生审批和审查步骤
* **AI 优先的工作流设计：** 更容易将 AI 决策和摘要作为一流步骤添加
* **工作流清晰度：** 干净的可视化构建器，具有清晰的运行上下文和步骤输出

**何时 Zapier 可能更好：**

* 你需要 Zapier 上提供的特定应用的覆盖
* 你的团队已经在 Zapier 上有许多现有的 Zaps 和操作工具

如果两个平台都支持你的技术栈，当审查和 AI 协作是你流程的核心时，选择 Relay。

***

## 故障排除

<AccordionGroup>
  <Accordion title="API 密钥被拒绝">
    直接从 [olostep.com/dashboard](https://olostep.com/dashboard) 复制密钥，确保没有尾随空格。如果错误仍然存在，请在 Relay 中重新连接 Olostep 帐户。
  </Accordion>

  <Accordion title="抓取的内容为空">
    增加 **抓取前等待时间**（对于 JS 密集型页面，尝试 2000–5000ms）。确认 URL 可以在无需登录的情况下公开访问。如果某个域名持续失败，请联系 [info@olostep.com](mailto:info@olostep.com)。
  </Accordion>

  <Accordion title="达到速率限制">
    在抓取密集型运行之间添加延迟，并在大型工作流中使用退避重试。检查 [仪表板](https://olostep.com/dashboard) 中的当前使用情况。
  </Accordion>

  <Accordion title="地图步骤比预期耗时更长">
    地图是异步的。首先存储返回的 `map_id`，然后在处理完成后在稍后的步骤/运行中获取结果。
  </Accordion>
</AccordionGroup>

***

## 相关内容

<CardGroup cols={2}>
  <Card title="抓取 API" icon="file-lines" href="/features/scrapes">
    抓取端点的完整参考
  </Card>

  <Card title="批处理 API" icon="layer-group" href="/features/batches">
    批处理作业的工作原理及如何检索结果
  </Card>

  <Card title="爬虫 API" icon="spider-web" href="/features/crawls">
    爬虫配置和结果检索
  </Card>

  <Card title="地图 API" icon="map" href="/features/maps">
    URL 发现和过滤选项
  </Card>
</CardGroup>
