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

# 代理 API

> 使用 Olostep 构建无需编码的研究代理，进行搜索、抓取和爬取网页。

通过 Olostep 代理 API，你可以创建自主研究代理，这些代理可以自动化数据管道和搜索任务，并按计划交付结构化结果。

* 跨网站的网页研究，自动提取
* 多步骤工作流，具有计划执行和通知功能
* 输出到 JSON/CSV/Sheets/DB

如需了解可用性和详细信息，请通过 [info@olostep.com](mailto:info@olostep.com) 或 [联系销售](https://www.olostep.com/contact-sales) 与我们联系。

## 安装

<CodeGroup>
  ```python Python theme={null}
  # pip install requests

  import requests
  ```

  ```js Node theme={null}
  // npm install node-fetch

  // ESM
  import fetch from 'node-fetch'

  // CommonJS
  const fetch = require('node-fetch')
  ```

  ```bash cURL theme={null}
  # macOS: 内置的 curl 就可以
  ```
</CodeGroup>

## 创建代理

使用自然语言提示和目标模型创建代理。

<CodeGroup>
  ```python Python theme={null}
  API_URL = 'https://api.olostep.com/v1/agents' # 仅对选定客户开放的端点
  API_KEY = '<YOUR_API_KEY>'

  headers = {
    'Authorization': f'Bearer {API_KEY}', 
    'Content-Type': 'application/json'
  }

  data = {
    "prompt": """
      从 https://www.vcsheet.com/funds 找到投资组合公司，并写入 Google Sheet，列为（基金名称、基金网站 URL、基金 LinkedIn URL、投资组合公司名称、投资组合公司 URL、投资组合公司 LinkedIn URL）。每周一上午 9:00 运行一次，当有新公司添加时，发送邮件至 steve@example.com。
    """,
    "model": "gpt-4.1"
  }

  response = requests.post(API_URL, headers=headers, json=data)
  result = response.json()
  print(result)
  ```

  ```js Node theme={null}
  const res = await fetch('https://api.olostep.com/v1/agents', {
    method: 'POST',
    headers: { 'Authorization': 'Bearer <YOUR_API_KEY>', 'Content-Type': 'application/json' },
    body: JSON.stringify({
      prompt: '从 https://www.vcsheet.com/funds 找到投资组合公司，并写入 Google Sheet...',
      model: 'gpt-4.1'
    })
  })
  console.log(await res.json())
  ```

  ```bash cURL theme={null}
  curl -s -X POST "https://api.olostep.com/v1/agents" \
    -H "Authorization: Bearer $OLOSTEP_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "prompt": "从 https://www.vcsheet.com/funds 找到投资组合公司，并写入 Google Sheet...",
      "model": "gpt-4.1"
    }'
  ```
</CodeGroup>

## 功能

Olostep 代理可以：

* **网页研究**：自动搜索并从网站提取数据
* **数据组织**：将信息结构化为电子表格、数据库或其他格式
* **计划执行**：按计划（每日、每周、预定时间）运行任务
* **多步骤工作流**：自主执行复杂的多部分研究任务
* **通知**：在发现新数据或任务完成时发送电子邮件提醒
* **自定义输出**：以 CSV、JSON、Google Sheet 或直接在你的数据库中返回数据

## 访问

代理 API 目前仅对选定客户开放。要获取访问权限：

* 发送电子邮件至 [info@olostep.com](mailto:info@olostep.com)
* 或 [联系我们的销售团队](https://www.olostep.com/contact-sales)

## 定价

代理定价是可变的。按结果计费。价格由客户和代理协商。请联系 [info@olostep.com](mailto:info@olostep.com) 了解更多详情。
