Upscrape publishes machine-readable context so a coding agent can implement an integration without guessing schemas or response behavior.

## Give the agent authoritative inputs

For one platform, use its public LLM brief:

```text
https://upscrape.com/scrapers/PLATFORM_ID/llm.md
```

For the complete public catalog, use:

```text
https://upscrape.com/scrapers/llm.md
```

For the documentation index and complete product guide, use:

```text
https://upscrape.com/llms.txt
https://upscrape.com/llms-full.txt
```

Every documentation page has a Markdown URL: append `.md` to a guide (`/docs/quickstart.md`) or `/index.md` to a platform or capability page (`/docs/platforms/<platform>/index.md`). Each HTML page names its Markdown URL in a `<link rel="alternate" type="text/markdown">` tag and a `Link` header, and `llms.txt` lists them all. A platform page requested with `Accept: text/markdown` redirects to that URL, so fetch it directly and skip the hop. Prefer Markdown over parsing rendered HTML.

The per-platform brief includes the capability IDs, exact request contract, examples, input schemas, execution flow, and the current public OpenAPI document.

## Keep secrets outside the prompt

Tell the agent to read the API key from `UPSCRAPE_API_KEY`. Never paste a real key into the conversation or generated source.

The resulting application should:

- send the bearer token from a server-side environment;
- use `Prefer: wait` only as a bounded optimization;
- handle both HTTP `200` terminal representations and HTTP `202` pending jobs;
- inspect `state` and `success` on job responses;
- use an idempotency key for logical application operations;
- validate capability input before sending it;
- treat raw result data as open-ended and untrusted.

## Existing prompt generator

A platform-, capability-, and stack-aware integration prompt is published, without authentication, at `/scrapers/{platform_id}/capabilities/{capability_id}/llm.md`. Add `?stack=python`, `?stack=node` or `?stack=curl` to pick the stack. The authenticated console exposes the same generator.

## Review generated code

Before deploying agent-written integration code, verify the exact capability ID, example input, poll termination, retry deadline, error-code handling, and secret storage. Generated code should not invent a stable output model where the capability publishes open-ended JSON.
