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

# Tasks overview

> Asynchronous batch wrapper around /search, /fetch, and /research.

**Tasks** is Linkup's asynchronous batch wrapper around [**Search**](/pages/documentation/endpoints/search/overview), [**Fetch**](/pages/documentation/endpoints/fetch/overview), and [**Research**](/pages/documentation/endpoints/research/overview). A single submission to `/tasks` accepts up to 100 tasks, in any mix of the three endpoints, with the same parameters and pricing as direct calls. There is no batching surcharge.

<Tip>
  No batching surcharge means **Tasks** is useful even for 2–3 calls when
  one polling loop is simpler than several synchronous ones.
</Tip>

**Tasks** is appropriate for bulk and scheduled workloads. Guidance on when
to reach for **Tasks** versus the synchronous endpoints lives on the
[Tasks best practices](/pages/documentation/endpoints/tasks/best-practices#when-to-use-tasks)
page.

## How it works

1. `POST /tasks` with an array of `{ type, input }` objects. Returns task identifiers immediately.
2. Poll `GET /tasks/{id}` for a specific task, or `GET /tasks` to list all tasks for the account.
3. While running, `status` is `"pending"` or `"processing"`. On completion, read the `output` field. On failure, inspect `error`.

<Warning>
  Maximum 100 tasks per submission. Larger workloads must be split across
  multiple submissions.
</Warning>

## Parameters per task type

Each task carries the same parameters as the corresponding synchronous endpoint:

| `type`       | `input` parameters                                                     | Reference                                                       |
| ------------ | ---------------------------------------------------------------------- | --------------------------------------------------------------- |
| `"search"`   | Same as `/search`: `q`, `depth`, `outputType`, `includeDomains`, ...   | [POST /search](/pages/documentation/endpoints/search/reference) |
| `"fetch"`    | Same as `/fetch`: `url`, `renderJs`, `includeRawHtml`, `extractImages` | [POST /fetch](/pages/documentation/endpoints/fetch/reference)   |
| `"research"` | Same as `/research`: `q`, `outputType`, `mode`, `reasoningDepth`, ...  | [POST /research](/pages/documentation/endpoints/research/post)  |

<Info>
  Tasks in a single submission can mix `"search"`, `"fetch"`, and `"research"`
  freely — each carries its own parameters and is billed at its own rate.
</Info>

## Pricing

Each task is billed exactly as a direct synchronous call to the same
endpoint. No batching surcharge, no batching discount.

| Task type                                                            | Cost    |
| -------------------------------------------------------------------- | ------- |
| `"search"` (`"fast"`/`"standard"`, `"searchResults"`)                | \$0.005 |
| `"search"` (`"fast"`/`"standard"`, `"sourcedAnswer"`/`"structured"`) | \$0.006 |
| `"search"` (`"deep"`, `"searchResults"`)                             | \$0.05  |
| `"search"` (`"deep"`, `"sourcedAnswer"`/`"structured"`)              | \$0.055 |
| `"fetch"` (no JS)                                                    | \$0.001 |
| `"fetch"` (with JS)                                                  | \$0.005 |
| `"research"` (`"S"`)                                                 | \$0.25  |
| `"research"` (`"M"`)                                                 | \$0.50  |
| `"research"` (`"L"`)                                                 | \$1.50  |
| `"research"` (`"XL"`)                                                | \$2.50  |

## Example

<Card title="Get your API key" icon="key" href="https://app.linkup.so" horizontal="True">
  Create a Linkup account for free to get your API key.
</Card>

<CodeGroup>
  ```python python theme={"system"}
  from linkup import LinkupClient

  client = LinkupClient(api_key="<YOUR_LINKUP_API_KEY>")

  tasks = client.tasks.create([
      {
          "type": "search",
          "input": {
              "q": "What is Microsoft's 2024 revenue?",
              "depth": "deep",
              "outputType": "sourcedAnswer",
              "includeDomains": ["microsoft.com", "agolution.com"],
              "excludeDomains": ["wikipedia.org"],
          },
      },
      {
          "type": "fetch",
          "input": {
              "url": "https://docs.linkup.so",
              "renderJs": False,
          },
      },
      {
          "type": "research",
          "input": {
              "q": "Compare 2024 cloud revenue growth of Microsoft, Amazon, and Google.",
              "outputType": "sourcedAnswer",
              "mode": "investigate",
              "reasoningDepth": "L",
          },
      },
  ])

  for t in tasks:
      print(t.id, t.type, t.status)
  ```

  ```js js theme={"system"}
  import { LinkupClient } from 'linkup-sdk';

  const client = new LinkupClient({ apiKey: '<YOUR_LINKUP_API_KEY>' });

  const tasks = await client.tasks.create([
    {
      type: 'search',
      input: {
        q: "What is Microsoft's 2024 revenue?",
        depth: 'deep',
        outputType: 'sourcedAnswer',
        includeDomains: ['microsoft.com', 'agolution.com'],
        excludeDomains: ['wikipedia.org'],
      },
    },
    {
      type: 'fetch',
      input: {
        url: 'https://docs.linkup.so',
        renderJs: false,
      },
    },
    {
      type: 'research',
      input: {
        q: 'Compare 2024 cloud revenue growth of Microsoft, Amazon, and Google.',
        outputType: 'sourcedAnswer',
        mode: 'investigate',
        reasoningDepth: 'L',
      },
    },
  ]);

  for (const t of tasks) {
    console.log(t.id, t.type, t.status);
  }
  ```

  ```shell curl theme={"system"}
  curl --request POST \
    --url https://api.linkup.so/v1/tasks \
    --header "Authorization: Bearer $LINKUP_API_KEY" \
    --header 'Content-Type: application/json' \
    --data '[
    {
      "type": "search",
      "input": {
        "q": "What is Microsoft'\''s 2024 revenue?",
        "depth": "deep",
        "outputType": "sourcedAnswer",
        "includeDomains": ["microsoft.com", "agolution.com"],
        "excludeDomains": ["wikipedia.org"]
      }
    },
    {
      "type": "fetch",
      "input": {
        "url": "https://docs.linkup.so",
        "renderJs": false
      }
    },
    {
      "type": "research",
      "input": {
        "q": "Compare 2024 cloud revenue growth of Microsoft, Amazon, and Google.",
        "outputType": "sourcedAnswer",
        "mode": "investigate",
        "reasoningDepth": "L"
      }
    }
  ]'
  ```
</CodeGroup>

`POST /v1/tasks` returns an array of task envelopes immediately, with
`status` of `"pending"` and `output` of `null`. Poll `GET /v1/tasks/{id}` (or
`GET /v1/tasks` for bulk listing) to retrieve completed results:

```json theme={"system"}
[
  {
    "id": "01234-abcd-56789",
    "type": "search",
    "status": "pending",
    "createdAt": "2026-01-01T00:00:00.000Z",
    "updatedAt": "2026-01-01T00:00:00.000Z",
    "error": null,
    "input": { "q": "What is Microsoft's 2024 revenue?", "depth": "deep", "outputType": "sourcedAnswer" },
    "output": null
  },
  {
    "id": "01234-abcd-56790",
    "type": "fetch",
    "status": "pending",
    "createdAt": "2026-01-01T00:00:00.000Z",
    "updatedAt": "2026-01-01T00:00:00.000Z",
    "error": null,
    "input": { "url": "https://docs.linkup.so", "renderJs": false },
    "output": null
  }
  // ... one envelope per submitted task
]
```

Once `status` is `"completed"`, `output` is populated with the same shape as
the corresponding synchronous endpoint's response. On `"failed"`, `error`
carries a string explanation.

## Next

<CardGroup cols={3}>
  <Card title="Best practices" icon="sparkles" href="/pages/documentation/endpoints/tasks/best-practices">
    Batch sizing, polling strategy, error handling.
  </Card>

  <Card title="For AI agents" icon="robot" href="/pages/documentation/endpoints/tasks/for-agents">
    Tool definition and integration prompt.
  </Card>

  <Card title="API reference" icon="code" href="/pages/documentation/endpoints/tasks/post">
    Full parameter spec and response schema.
  </Card>
</CardGroup>
