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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Classify response with Scrapfly

> Classify an HTTP response for anti-bot blocking.

`scrapfly.classifyResponse` runs Scrapfly's anti-bot classifier against a response fetched elsewhere. Scrapfly charges one API credit per call.

```ts theme={null}
import { automation, onInvocation } from "automate.ax"
import { scrapfly } from "automate.ax/scrapfly"

export default automation("Classify response", () => {
  onInvocation()
  scrapfly.classifyResponse({
    url: "https://example.com",
    statusCode: 403,
    body: "Checking your browser…",
  })
})
```

| Input        | Type                     | Required | Default | Description                       |
| ------------ | ------------------------ | -------- | ------- | --------------------------------- |
| `url`        | `string`                 | Yes      | —       | URL that produced the response.   |
| `statusCode` | `number`                 | Yes      | —       | HTTP status from 100 through 599. |
| `method`     | `string`                 | No       | `GET`   | Original HTTP method.             |
| `headers`    | `Record<string, string>` | No       | None    | Original response headers.        |
| `body`       | `string \| null`         | No       | None    | Original response body.           |

Returns `{ blocked, antibot, cost }`. `antibot` is `null` when Scrapfly does not identify a vendor.
