# Harvest Directory Profiles

Harvest profiles across many directory pages in a single call. Sync mode collects all profiles; stream mode emits one profile per event

- Platform: [Linktree](https://docs.upscrape.com/docs/platforms/linktree)
- Capability ID: `linktree.directory.profiles`
- Cost: 1 credit per request
- Maximum runtime: 120 seconds
- Execute endpoint: `POST https://data.upscrape.com/execute`

## Request

Use the exact public capability ID in the shared execute envelope.

```bash
curl -X POST https://data.upscrape.com/execute \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"category":"business","max_pages":3},"capability":"linktree.directory.profiles"}'
```

## Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `category` | `string` | No | Directory category filter (defaults to "all") |
| `max_pages` | `integer` | No | Maximum directory pages to fetch (~18 profiles each); the walk also stops at the directory's reported total |

### Example input

```json
{
  "category": "business",
  "max_pages": 3
}
```

## Response

Successful output is returned in `results[0].data`. Raw platform output is intentionally open-ended and may evolve with the upstream source.

No committed sample output is available for this capability.


## Execution behavior

A `200` response completed inline. A `202` response was queued; poll `GET /jobs/{id}` until the job reaches `completed` or `failed`. Use an `Idempotency-Key` when retrying must not create a duplicate logical job.

See [jobs and results](https://docs.upscrape.com/docs/api/jobs), [errors and retries](https://docs.upscrape.com/docs/api/errors), and [idempotency](https://docs.upscrape.com/docs/api/idempotency).

## Machine-readable contract

- [Capability OpenAPI 3.1](https://docs.upscrape.com/docs/platforms/linktree/linktree.directory.profiles/openapi.json)
- [Platform OpenAPI 3.1](https://upscrape.com/scrapers/linktree/openapi.json)
- [Focused coding-agent prompt](https://upscrape.com/scrapers/linktree/capabilities/linktree.directory.profiles/llm.md)
