# API Doc

The API Doc lists a website's own functions that the AI can call directly, without clicking through pages.

## What it is

From recordings or a drill, Cowork writes an API Doc for each website: its functions grouped by module, each marked **Read** or **Write**. When a job needs that website's data, the AI looks here first and calls the function with your own sign-in. This is how it reads or exports data quickly and reliably.

## When to use it

| Good fit | Better another way |
|---|---|
| Regular exports or reports from a website you use | A website you use once: let the AI use the pages |
| Bulk reading of records | Very large exports: ask for a [crawl script](https://docs.micromeet.ai/capture/crawl-scripts.md), which is built from the API Doc |
| Updates where every write should be confirmed | |

## How to use it

1. Record the website, or drill it, so Cowork can learn its functions. See [Record Web Activity](https://docs.micromeet.ai/capture/recording.md) and [Drill](https://docs.micromeet.ai/capture/drill.md).
2. Open **Settings › Capture › API Doc** and choose the website. Its functions are grouped by module.
3. Check each function's mark: **Read** or **Write**. **Delete** a function you do not want the AI to use.
4. Ask for the job in a chat. The AI uses the API Doc on its own when it fits.

## Example

```text
From our order system, export all orders from last week with their status
into orders-last-week.csv.
```

The AI finds the order-list function in the API Doc, calls it page by page with your sign-in, and saves the CSV, without opening the pages.

## Limits and permissions

- The AI calls functions with your own sign-in in that website's tab.
- Before it calls a function marked **Write**, or one not known to be read-only, it asks you on an approval card.
- Only you can mark a function **Read**. The AI cannot.

## If something goes wrong

| What you see | What to do |
|---|---|
| A website has no API Doc | Record it or drill it first |
| A function fails because you are signed out | Sign in again in that website's tab and retry |
| The AI keeps clicking pages instead | Check the function it needs is in the API Doc; record the steps if it is missing |

## Related

- [Record Web Activity](https://docs.micromeet.ai/capture/recording.md): How Cowork learns a website
- [Crawl Scripts](https://docs.micromeet.ai/capture/crawl-scripts.md): Fetch large amounts of data
- [When the AI asks you](https://docs.micromeet.ai/getting-started/workspaces-and-approvals.md#when-the-ai-asks-you): Which actions wait for your approval
