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

# Get Crawl Status

> A crawl's status, its counters and the pages read so far. Add `errors=1` for the pages that failed instead. Results are kept for 24 hours after a crawl finishes.

> [!NOTE]
>
> Add `?errors=1` to get the pages that failed and the ones robots.txt doesn't allow, instead of the results. Results are kept for 24 hours after the crawl ends.


## OpenAPI

````yaml /api-reference/openapi.json GET /crawl/{id}
openapi: 3.1.0
info:
  title: ScreenshotRender API
  version: v1
  description: >-
    Screenshot any website, search the web, and turn any page or document into
    clean Markdown or structured data.
servers:
  - url: https://www.screenshotrender.com/api/v1
security:
  - bearerAuth: []
paths:
  /crawl/{id}:
    get:
      tags:
        - Crawl
      summary: Get Crawl Status
      description: >-
        A crawl's status, its counters and the pages read so far. Add `errors=1`
        for the pages that failed instead. Results are kept for 24 hours after a
        crawl finishes.
      operationId: getCrawlStatus
      parameters:
        - $ref: '#/components/parameters/CrawlId'
        - name: errors
          in: query
          required: false
          description: >-
            Set to `1` to get the pages that failed and the URLs robots.txt
            blocked, instead of the pages.
          schema:
            type: string
            enum:
              - '1'
      responses:
        '200':
          description: The crawl, or with `errors=1` its failed pages.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/CrawlStatus'
                  - $ref: '#/components/schemas/CrawlErrors'
        '401':
          $ref: '#/components/responses/InvalidApiKey'
        '404':
          $ref: '#/components/responses/NotFound'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl -s
            "https://www.screenshotrender.com/api/v1/crawl/YOUR_CRAWL_ID" \
              -H "Authorization: Bearer $SCREENSHOTRENDER_API_KEY"
        - lang: javascript
          label: Node
          source: >-
            import ScreenshotRender from "screenshotrender";


            const screenshotrender = new ScreenshotRender({ apiKey:
            "sr-YOUR-API-KEY" });


            const job = await screenshotrender.getCrawlStatus("YOUR_CRAWL_ID");

            console.log(job.status, `${job.completed} of ${job.total} pages`);
        - lang: python
          label: Python
          source: |-
            from screenshotrender import ScreenshotRender

            screenshotrender = ScreenshotRender(api_key="sr-YOUR-API-KEY")

            job = screenshotrender.get_crawl_status("YOUR_CRAWL_ID")
            print(job.status, f"{job.completed} of {job.total} pages")
components:
  parameters:
    CrawlId:
      name: id
      in: path
      required: true
      description: The crawl's id, from `POST /crawl`.
      schema:
        type: string
  schemas:
    CrawlStatus:
      type: object
      title: Status
      properties:
        success:
          type: boolean
          example: true
        status:
          type: string
          enum:
            - scraping
            - completed
            - failed
            - cancelled
        total:
          type: integer
          description: Pages found so far.
        completed:
          type: integer
          description: Pages read so far.
        creditsUsed:
          type: integer
        expiresAt:
          type:
            - string
            - 'null'
          description: When the results stop being available.
        next:
          type:
            - string
            - 'null'
          description: '`null` when `data` holds every page.'
        data:
          type: array
          items:
            $ref: '#/components/schemas/Document'
    CrawlErrors:
      type: object
      title: Errors (errors=1)
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            errors:
              type: array
              items:
                type: object
                properties:
                  url:
                    type: string
                  error:
                    type: string
                additionalProperties: true
            robotsBlocked:
              type: array
              items:
                type: string
    Document:
      type: object
      description: One page. Only the formats you asked for are present.
      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
        screenshot:
          type: string
          description: The image's URL. Images are kept for 30 days.
        json:
          description: The structured data from the `json` format.
        answer:
          type: string
          description: The answer from the `question` format.
        highlights:
          description: The passages from the `highlights` format.
        branding:
          type: object
          description: Logo, colors, fonts and the page's design system.
        actions:
          type: object
          description: What `actions` produced, such as `screenshots`.
          properties:
            screenshots:
              type: array
              items:
                type: string
        metadata:
          $ref: '#/components/schemas/Metadata'
      additionalProperties: true
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: What went wrong, in words.
        code:
          type: string
          description: A stable code to branch on, such as `invalid_request`.
        field:
          type: string
          description: The request field the error is about, when there is one.
      required:
        - success
        - error
        - code
    Metadata:
      type: object
      description: >-
        What the page says about itself (title, description, Open Graph tags)
        and how it was loaded.
      properties:
        title:
          type: string
        description:
          type: string
        language:
          type: string
        sourceURL:
          type: string
          description: The URL you asked for.
        url:
          type: string
          description: The URL the page ended up at.
        statusCode:
          type: integer
        contentType:
          type: string
        numPages:
          type: integer
          description: 'For documents: the pages read.'
        totalPages:
          type: integer
          description: 'For documents: the pages in the file.'
        cacheState:
          type: string
          enum:
            - hit
            - miss
        cachedAt:
          type: string
      additionalProperties: true
  responses:
    InvalidApiKey:
      description: The API key doesn't match an account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: Invalid API key.
            code: invalid_api_key
    NotFound:
      description: No crawl with this id on your account, or its results have expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: No crawl found with this id.
            code: not_found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your API key from the dashboard. It starts with `sr-`.

````