> ## 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.

# Read a check

> One check with the result for each page: same, new, changed, removed or error, with the diff. next is the address of the next page of results.

## Price

Free.

See [Pricing](https://docs.stophy.dev/account/pricing.md).

> [!WARNING]
>
> No example is recorded: the monitor that recorded the other examples was deleted before this call. The schema below lists every field.

```bash cURL theme={null}
curl https://api.stophy.dev/v1/monitor/{id}/checks/{checkId} \
  -H "Authorization: Bearer $STOPHY_API_KEY"
```

```typescript TypeScript theme={null}
const response = await fetch("https://api.stophy.dev/v1/monitor/{id}/checks/{checkId}", {
  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/monitor/{id}/checks/{checkId}",
    headers={"Authorization": f"Bearer {os.environ['STOPHY_API_KEY']}"},
)
print(response.json())
```


## OpenAPI

````yaml api-reference/openapi.json GET /v1/monitor/{id}/checks/{checkId}
openapi: 3.1.0
info:
  title: Stophy API
  version: '1'
  description: >-
    Each operation shows its method and its input: a JSON object body, path and
    query parameters, or a file upload.


    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-cost-usd is what one call costs, in dollars. Every call costs the same,
    whatever it returns, unless an operation's description says it costs per 10
    results, or per hour of audio. Then x-cost-usd is the lowest price and
    x-cost-usd-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/monitor/{id}/checks/{checkId}:
    get:
      summary: >-
        One check with the result for each page: same, new, changed, removed or
        error, with the diff. next is the address of the next page of results.
      operationId: monitorCheck
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The monitor id.
        - name: checkId
          in: path
          required: true
          schema:
            type: string
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
        - name: skip
          in: query
          schema:
            type: integer
            minimum: 0
            default: 0
        - name: status
          in: query
          schema:
            type: string
            enum:
              - same
              - new
              - changed
              - removed
              - error
      responses:
        '200':
          description: The check and its pages.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - costUsd
                  - creditsUsed
                  - requestId
                properties:
                  success:
                    const: true
                  id:
                    type: string
                  data:
                    allOf:
                      - type: object
                        properties:
                          id:
                            type: string
                          monitorId:
                            type: string
                          status:
                            type: string
                            enum:
                              - queued
                              - running
                              - completed
                              - failed
                              - partial
                              - skipped_overlap
                              - skipped_no_credits
                          trigger:
                            type: string
                            enum:
                              - scheduled
                              - manual
                          scheduledFor:
                            type:
                              - string
                              - 'null'
                            format: date-time
                          startedAt:
                            type:
                              - string
                              - 'null'
                            format: date-time
                          finishedAt:
                            type:
                              - string
                              - 'null'
                            format: date-time
                          estimatedCredits:
                            type: integer
                            description: >-
                              Older field: the most the check costs before
                              extras, in $0.002 steps.
                          estimatedCostUsd:
                            type: number
                            description: >-
                              Pages watched at $1 per 1,000 pages: the most the
                              check costs before extras, in dollars.
                          reservedCredits:
                            type:
                              - integer
                              - 'null'
                          actualCredits:
                            type:
                              - integer
                              - 'null'
                            description: >-
                              Older field: what was charged once the check is
                              done, in $0.002 steps.
                          actualCostUsd:
                            type:
                              - number
                              - 'null'
                            description: >-
                              What was charged once the check is done, in
                              dollars.
                          billingStatus:
                            type: string
                            enum:
                              - not_applicable
                              - reserved
                              - confirmed
                              - released
                              - failed
                          summary:
                            type: object
                            properties:
                              totalPages:
                                type: integer
                              same:
                                type: integer
                              changed:
                                type: integer
                              new:
                                type: integer
                              removed:
                                type: integer
                              error:
                                type: integer
                          error:
                            type:
                              - string
                              - 'null'
                          createdAt:
                            type: string
                            format: date-time
                          updatedAt:
                            type: string
                            format: date-time
                      - type: object
                        properties:
                          pages:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                targetId:
                                  type: string
                                url:
                                  type: string
                                status:
                                  type: string
                                  enum:
                                    - same
                                    - new
                                    - changed
                                    - removed
                                    - error
                                statusCode:
                                  type:
                                    - integer
                                    - 'null'
                                error:
                                  type:
                                    - string
                                    - 'null'
                                diff:
                                  type:
                                    - object
                                    - 'null'
                                  description: >-
                                    text is the unified diff of the compared
                                    text. json maps each changed field path to {
                                    previous, current }.
                                snapshot:
                                  type:
                                    - object
                                    - 'null'
                                  description: json is the fields read on this check.
                                creditsUsed:
                                  type: integer
                                costUsd:
                                  type: number
                                  description: What this call cost, in dollars.
                                createdAt:
                                  type: string
                                  format: date-time
                  next:
                    type:
                      - string
                      - 'null'
                  creditsUsed:
                    type: integer
                  costUsd:
                    type: number
                    description: What this call cost, in dollars.
                  requestId:
                    type: string
        4XX:
          $ref: '#/components/responses/Error'
        5XX:
          $ref: '#/components/responses/Error'
components:
  headers:
    RequestId:
      description: The request id. Quote it when you report a problem.
      schema:
        type: string
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: integer
  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'
  schemas:
    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
            - busy
            - checkRunning
            - cliSessionCompleted
            - cliSessionExists
            - cliSessionNotFound
            - forbidden
            - freeLimit
            - insufficientCredits
            - internalError
            - inviteClaimed
            - inviteDisabled
            - inviteExpired
            - inviteUsedUp
            - invalidCliSession
            - invalidCliVerifier
            - invalidRequest
            - jobFinished
            - methodNotAllowed
            - notFound
            - payloadTooLarge
            - profileBusy
            - profileTooLarge
            - prohibitedPermission
            - promptInjectionDetected
            - rateLimited
            - sourceChanged
            - sourceRefused
            - siteNotRead
            - sourceTimeout
            - sourceUnavailable
            - unauthorized
            - unsupportedMediaType
        retryable:
          type: boolean
          description: true when trying again can help.
        retryAfterSeconds:
          type: integer
        requestId:
          type: string
        requiredCredits:
          type: number
          description: >-
            Older field: the most the call can cost, in $0.002 steps. Sent when
            the balance is too low.
        availableCredits:
          type: number
          description: 'Older field: the balance in $0.002 steps. Sent with requiredCredits.'
        requiredUsd:
          type: number
          description: >-
            The most the call can cost, in dollars. Sent when the balance is too
            low.
        availableUsd:
          type: number
          description: What is left on the account, in dollars. Sent with requiredUsd.
        billingUrl:
          type: string
          description: Where to add money. Sent with requiredUsd.
        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.
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````

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