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

# Octoparse OpenAPI

> Octoparse OpenAPI reference for authentication, task management, Cloud Extraction, and data export.

Use the Octoparse OpenAPI to manage tasks, run Cloud Extractions, and retrieve scraped data programmatically.

## Authentication

For protected endpoints, the simplest authentication method is an Octoparse API key. Create a key in the Octoparse account center, then include it in the `x-api-key` request header. The same API key can be used with Octoparse OpenAPI, MCP Server, and CLI.

<Card title="Create or manage API keys" icon="key" href="https://www.octoparse.com/console/open-platform/api-keys">
  Open the API keys page in your Octoparse account center.
</Card>

API keys typically start with `op_sk_`:

```bash theme={null}
curl "https://openapi.octoparse.com/taskGroup" \
  --header "x-api-key: op_sk_xxxxx"
```

<Warning>
  Keep your API key secret. Do not expose it in browser-side code, public repositories, screenshots, or logs.
</Warning>

Access-token authentication is also supported. Obtain an access token from `POST /token`, then send it as `Authorization: Bearer <access_token>`.

## AgentTools API

AgentTools API is a template-driven, AI-agent workflow layer on top of the legacy low-level Task, Cloud Extraction, and Data APIs. Use it when an agent or automation needs to discover a suitable scraping template, start a run, follow server-provided next-step guidance, and retrieve export metadata without wiring together every low-level endpoint directly.

New scraping flow:

```text theme={null}
searchTemplates -> executeTask -> exportData
```

Existing task flow:

```text theme={null}
searchTasks -> startOrStopTask -> exportData
```

New to AgentTools? Read the [end-to-end workflow tutorial](https://helpcenter.octoparse.com/en/articles/15855832-run-a-scraping-workflow-with-the-octoparse-agenttools-api) to learn how to search templates, start a task, and export results.

AgentTools responses keep business fields inside `data`. Use `requestId` only for troubleshooting, and follow `retryGuidance`, `suggestedNextCall`, `workflow`, and `toolHint` instead of hard-coding polling intervals.

<Info>
  AgentTools API requires `x-api-key` authentication. Some endpoints also require `x-external-user-id`; see each endpoint reference for exact headers.
</Info>

## Before you start

To use the Octoparse OpenAPI, you need a **Standard, Professional, or Enterprise** account with at least one working task. [Sign up here](https://www.octoparse.com/signup) if you don't have one yet.

Current API version: **v1.0**

## Base URL

All requests must be URL-encoded against the base URL:

```text theme={null}
https://openapi.octoparse.com
```

Placeholders are shown as `{xxxx}` and need to be replaced with real values. For example, the request URL for *Search Task* is:

```text theme={null}
GET https://openapi.octoparse.com/task/search?taskGroupId={taskGroupId}
```

If your task group ID is `abc`, the URL becomes `https://openapi.octoparse.com/task/search?taskGroupId=abc`.

## Rate limits

Octoparse limits API usage to **20 requests per second**. If you receive a `429` status code, slow your request rate.

A successful response returns HTTP `200`. For other status codes, see the [References](#) section in each endpoint.

## Permissions

Make sure your account has permission to use each service. If not, upgrade your account.

| Service | API | Required plan |
| - | - | - |
| Access Token | Obtain a New Token | All users |
| Access Token | Refresh Token | All users |
| Task Group | Get Task Group Information | Standard, Professional, Enterprise |
| Task | Search Task | Standard, Professional, Enterprise |
| Task | Duplicate Task | Standard, Professional, Enterprise |
| Task | Move Task | Standard, Professional, Enterprise |
| Task | Get Action Parameters | Professional, Enterprise |
| Task | Update Task Parameters | Professional, Enterprise |
| Task | Update Action Parameters | Professional, Enterprise |
| Task | Update Loop Item List | Professional, Enterprise |
| Task | Update Task URLs | Professional, Enterprise |
| Cloud Extraction | Start Task | Professional, Enterprise |
| Cloud Extraction | Stop Task | Professional, Enterprise |
| Cloud Extraction | Get Task Status | Professional, Enterprise |
| Cloud Extraction | Get Task Status V2 | Professional, Enterprise |
| Cloud Extraction | Get Subtask Status | Professional, Enterprise |
| Cloud Extraction | Start Subtasks | Professional, Enterprise |
| Cloud Extraction | Stop Subtasks | Professional, Enterprise |
| Data | Get Non-Exported Data | Standard, Professional, Enterprise |
| Data | Mark Data as Exported | Standard, Professional, Enterprise |
| Data | Get Data by Offset | Standard, Professional, Enterprise |
| Data | Get Data From a Designated Batch by Offset | Standard, Professional, Enterprise |
| Data | Remove Data | Standard, Professional, Enterprise |

## Troubleshooting

Every response includes a `requestId`. If a request fails, share the `requestId` with the [Octoparse support team](mailto:support@octoparse.com) to help diagnose the issue.


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