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

# Batch scrape status

> Check a batch scrape and read the finished pages. Send one request and get JSON back. Examples in cURL, TypeScript and Python.

Free.

## Pages

Poll until `status` is `completed`, then call `next` until it is gone. Each answer holds up to 100 finished pages. A page's address is in `metadata.url`. See [Page through results](https://docs.stophy.dev/guides/paging.md).

`failed` counts the pages that could not be read. `errors` lists the failed pages in this answer with `url`, `code`, `message`, `retryable` and `at`, and `error` is set only when the whole job failed. For every failed page, call [Batch scrape errors](https://docs.stophy.dev/api-reference/endpoint/batch-scrape-errors.md).

```bash cURL theme={null}
curl https://api.stophy.dev/v1/batch/scrape/job_385XD5MMpQfsXsGFdTO9vQ \
  -H "Authorization: Bearer $STOPHY_API_KEY"
```

```typescript TypeScript theme={null}
const response = await fetch("https://api.stophy.dev/v1/batch/scrape/job_385XD5MMpQfsXsGFdTO9vQ", {
  headers: {
    Authorization: `Bearer ${process.env.STOPHY_API_KEY}`,
  },
});
console.log(await response.json());
```

```python Python theme={null}
import os

import requests

response = requests.get(
    "https://api.stophy.dev/v1/batch/scrape/job_385XD5MMpQfsXsGFdTO9vQ",
    headers={"Authorization": f"Bearer {os.environ['STOPHY_API_KEY']}"},
)
print(response.json())
```

```json 200 theme={null}
{
  "success": true,
  "status": "completed",
  "total": 2,
  "completed": 2,
  "creditsUsed": 1,
  "createdAt": "2026-11-05T23:35:30.889Z",
  "completedAt": "2026-11-05T23:35:32.943Z",
  "duration": 2.054,
  "expiresAt": "2026-11-06T23:35:30.889Z",
  "data": [
    {
      "markdown": "# bunfig.toml\n\nConfigure Bun's behavior using its configuration file bunfig.toml\n\n`bunfig.toml` is Bun's configuration…",
      "metadata": {
        "viewport": "width=device-width, initial-scale=1",
        "theme-color": [
          "#ffffff",
          "#0d0a0c"
        ],
        "og:type": "website",
        "og:image": "https://bun.com/og/docs/runtime/bunfig.png",
        "twitter:site": "@bunjavascript",
        "twitter:card": "summary_large_image",
        "ogTitle": "bunfig.toml | Bun Docs",
        "ogDescription": "Configure Bun's behavior using its configuration file bunfig.toml",
        "ogUrl": "https://bun.com/docs/runtime/bunfig",
        "ogLocale": "en_US",
        "ogSiteName": "Bun",
        "favicon": "https://bun.com/favicon.ico",
        "title": "bunfig.toml | Bun Docs",
        "description": "Configure Bun's behavior using its configuration file bunfig.toml",
        "language": "en",
        "ogImage": "https://bun.com/og/docs/runtime/bunfig.png",
        "sourceURL": "https://bun.com/docs/runtime/bunfig",
        "url": "https://bun.com/docs/runtime/bunfig",
        "statusCode": 200,
        "contentType": "text/html",
        "cacheState": "hit",
        "cachedAt": "2026-11-05T19:33:09.837Z",
        "scrapeId": "job_385XD5MMpQfsXsGFdTO9vQ",
        "creditsUsed": 0
      }
    }
  ]
}
```


## OpenAPI

````yaml api-reference/openapi.json GET /v1/batch/scrape/{id}
openapi: 3.1.0
info:
  title: Stophy API
  version: '1'
  description: >-
    Every endpoint is a POST that takes its input as a JSON object body. Unknown
    fields are rejected with 400.


    Responses leave out empty values: null, empty strings, empty objects and
    empty nested lists are not sent.


    Text comes back whole. To get shorter responses, add
    ?maxTextLength=<characters> to the URL. Every text value longer than that is
    cut and ends with …. A screenshot is never cut, and a page whose text was
    cut has isTruncated set to true.


    x-credits is what one call costs. Every call costs the same, whatever it
    returns, unless an operation's description says it costs per 10 results, or
    per second of audio. Then x-credits is the lowest price and x-credits-max
    the most one call can cost. Where an operation takes limit, send it to
    return fewer results and pay for fewer.


    When a response has a cursor, send it back unchanged with the same input to
    get the next page. When it has a page, send the next page number.
servers:
  - url: https://api.stophy.dev
security:
  - apiKey: []
paths:
  /v1/batch/scrape/{id}:
    get:
      summary: Check a batch scrape and read the finished pages
      description: Costs 0 credits per call. Pages with cursor.
      operationId: batchScrapeStatus
      parameters:
        - $ref: '#/components/parameters/MaxTextLength'
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: cursor
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The data, and the credits this call used.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/RequestId'
            x-credits-used:
              $ref: '#/components/headers/CreditsUsed'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            x-cache:
              $ref: '#/components/headers/Cache'
            x-cache-age:
              $ref: '#/components/headers/CacheAge'
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  success:
                    type: boolean
                    const: true
                  status:
                    type: string
                    enum:
                      - scraping
                      - completed
                      - failed
                      - cancelled
                  total:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  completed:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  failed:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: object
                      additionalProperties: false
                      properties:
                        url:
                          type: string
                        code:
                          type: string
                        message:
                          type: string
                        retryable:
                          type: boolean
                        at:
                          type: string
                      required:
                        - retryable
                  creditsUsed:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  createdAt:
                    type: string
                  completedAt:
                    type: string
                  duration:
                    type: number
                  expiresAt:
                    type: string
                  next:
                    type: string
                  data:
                    type: array
                    items:
                      type: object
                      additionalProperties: false
                      properties:
                        markdown:
                          type: string
                        summary:
                          type: string
                        html:
                          type: string
                        rawHtml:
                          type: string
                        links:
                          type: array
                          items:
                            type: string
                        images:
                          type: array
                          items:
                            type: string
                        attributes:
                          type: array
                          items:
                            type: object
                            additionalProperties: false
                            properties:
                              selector:
                                type: string
                              attribute:
                                type: string
                              values:
                                type: array
                                items:
                                  type: string
                            required: []
                        screenshot:
                          type: string
                        json:
                          $ref: '#/components/schemas/batchScrapeStatus.schema0'
                        highlights:
                          type: string
                        changeTracking:
                          type: object
                          additionalProperties: false
                          properties:
                            previousScrapeAt:
                              type: string
                            changeStatus:
                              type: string
                              enum:
                                - new
                                - same
                                - changed
                            visibility:
                              type: string
                            diff:
                              type: string
                          required: []
                        branding:
                          type: object
                          propertyNames:
                            type: string
                          additionalProperties:
                            $ref: '#/components/schemas/batchScrapeStatus.schema0'
                        actions:
                          type: object
                          additionalProperties: false
                          properties:
                            screenshots:
                              type: array
                              items:
                                type: string
                            scrapes:
                              type: array
                              items:
                                type: object
                                additionalProperties: false
                                properties:
                                  url:
                                    type: string
                                  html:
                                    type: string
                                required: []
                            javascriptReturns:
                              type: array
                              items:
                                type: object
                                additionalProperties: false
                                properties:
                                  type:
                                    type: string
                                  value:
                                    $ref: >-
                                      #/components/schemas/batchScrapeStatus.schema0
                                required: []
                            pdfs:
                              type: array
                              items:
                                type: string
                          required: []
                        warning:
                          type: string
                        metadata:
                          type: object
                          additionalProperties: {}
                          description: >-
                            Facts about the page. Named page facts such as
                            ogTitle or keywords appear when the page has them,
                            and any other meta tag appears under its own name.
                          properties:
                            title:
                              type: string
                            description:
                              type: string
                            language:
                              type: string
                            ogImage:
                              type: string
                            sourceURL:
                              type: string
                            url:
                              type: string
                            statusCode:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            contentType:
                              type: string
                            numPages:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            totalPages:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                            cacheState:
                              type: string
                              enum:
                                - hit
                                - miss
                                - stale
                            cachedAt:
                              type: string
                            scrapeId:
                              type: string
                            creditsUsed:
                              type: integer
                              minimum: -9007199254740991
                              maximum: 9007199254740991
                          required:
                            - statusCode
                      required:
                        - metadata
                required:
                  - success
                  - status
                  - total
                  - completed
                  - failed
                  - errors
                  - creditsUsed
                  - data
        4XX:
          $ref: '#/components/responses/Error'
        5XX:
          $ref: '#/components/responses/Error'
components:
  parameters:
    MaxTextLength:
      name: maxTextLength
      in: query
      required: false
      description: >-
        Cut every text value in the response to this many characters. A value
        that was cut ends with …, and a page whose text was cut has isTruncated
        set to true. A screenshot is never cut. Leave it out to get the full
        text.
      schema:
        type: integer
        minimum: 1
  headers:
    RequestId:
      description: The request id. Quote it when you report a problem.
      schema:
        type: string
    CreditsUsed:
      description: Credits this call used.
      schema:
        type: integer
    RateLimitLimit:
      description: Requests allowed in the current window.
      schema:
        type: integer
    RateLimitRemaining:
      description: Requests left in the current window.
      schema:
        type: integer
    RateLimitReset:
      description: Unix time in seconds when the current window resets.
      schema:
        type: integer
    Cache:
      description: hit if this result came from the cache, miss if it was fetched live.
      schema:
        type: string
    CacheAge:
      description: Seconds since the returned result was written to the cache.
      schema:
        type: integer
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: integer
  schemas:
    batchScrapeStatus.schema0:
      anyOf:
        - type: string
        - type: number
        - type: boolean
        - type: 'null'
        - type: array
          items:
            $ref: '#/components/schemas/batchScrapeStatus.schema0'
        - type: object
          propertyNames:
            type: string
          additionalProperties:
            $ref: '#/components/schemas/batchScrapeStatus.schema0'
    Error:
      type: object
      required:
        - success
        - error
        - code
      properties:
        success:
          const: false
        error:
          type: string
          description: What went wrong and what to do next.
        code:
          type: string
          enum:
            - apiKeyRequired
            - cliSessionCompleted
            - cliSessionExists
            - cliSessionNotFound
            - forbidden
            - freeLimit
            - insufficientCredits
            - internalError
            - inviteClaimed
            - inviteDisabled
            - inviteExpired
            - inviteUsedUp
            - invalidCliSession
            - invalidCliVerifier
            - invalidRequest
            - jobFinished
            - methodNotAllowed
            - notFound
            - payloadTooLarge
            - profileBusy
            - profileTooLarge
            - rateLimited
            - sourceChanged
            - sourceRefused
            - siteNotRead
            - sourceTimeout
            - sourceUnavailable
            - unauthorized
            - unsupportedMediaType
        retryAfterSeconds:
          type: integer
        signupUrl:
          type: string
          const: https://stophy.dev/signup
          description: >-
            Where a person gets a key. Sent with apiKeyRequired, freeLimit and
            an invalid key.
        signup:
          type: string
          const: POST https://api.stophy.dev/v1/signup
          description: >-
            The call that gets an agent a key with no human. Sent next to
            signupUrl.
  responses:
    Error:
      description: The request failed. Retry-After says when trying again can help.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/RequestId'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.