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

# Extract result

> Read what an extract found.

```bash cURL theme={null}
curl https://api.stophy.dev/v1/extract/d3aa5deb-d81b-4b37-8e4a-4eb06b74cab9 \
  -H "Authorization: Bearer $STOPHY_API_KEY"
```

```json 200 theme={null}
{
  "success": true,
  "status": "completed",
  "data": {
    "file": "bunfig.toml"
  },
  "confidence": {
    "file": 0.7932
  },
  "warning": "1 of 1 pages were longer than 50000 characters and were cut there.",
  "urls": [
    "https://bun.com/docs/runtime/bunfig"
  ],
  "costUsd": 0.005,
  "tokensUsed": 75,
  "expiresAt": "2026-11-18T17:50:19.636Z"
}
```


## OpenAPI

````yaml api-reference/openapi.json GET /v1/extract/{id}
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.


    The x-cost-usd response header is what the request cost in dollars. An
    operation's description gives its pricing units and add-ons. The OpenAPI
    fields x-cost-usd and x-cost-usd-max are list-price estimates, not receipts
    or spending limits. When a call starts a job, check the job result for its
    total cost.


    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/extract/{id}:
    get:
      summary: Read what an extract found. Results are kept for 24 hours.
      operationId: extractResult
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The extracted data.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/RequestId'
            x-credits-used:
              $ref: '#/components/headers/CreditsUsed'
            x-cost-usd:
              $ref: '#/components/headers/CostUsd'
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: False when status is failed.
                  status:
                    type: string
                    enum:
                      - completed
                      - failed
                  data:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      $ref: '#/components/schemas/extractResult.schema0'
                  confidence:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type: number
                      minimum: 0
                      maximum: 1
                  warning:
                    description: >-
                      The pages that could not be read and why. The fields come
                      from the rest.
                    type: string
                  error:
                    description: Why the run failed. Only when status is failed.
                    type: string
                  urls:
                    type: array
                    items:
                      type: string
                    description: The pages the fields were read from.
                  sources:
                    description: For each field, the pages its value came from.
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties:
                      type: array
                      items:
                        type: string
                  creditsUsed:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  costUsd:
                    type: number
                    description: What the run cost, in dollars.
                  expiresAt:
                    type: string
                  tokensUsed:
                    description: >-
                      Tokens used, counted the way v2 clients expect: 15 tokens
                      for each $0.002 spent.
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                required:
                  - success
                  - status
                  - data
                  - confidence
                  - urls
                  - creditsUsed
                  - costUsd
                  - expiresAt
                additionalProperties: false
        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
    CreditsUsed:
      description: >-
        Older header: what this call cost, as whole steps of $0.002. Use
        x-cost-usd.
      schema:
        type: integer
    CostUsd:
      description: What this call cost, in dollars.
      schema:
        type: string
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: integer
  schemas:
    extractResult.schema0:
      anyOf:
        - type: string
        - type: number
        - type: boolean
        - type: 'null'
        - type: array
          items:
            $ref: '#/components/schemas/extractResult.schema0'
        - type: object
          propertyNames:
            type: string
          additionalProperties:
            $ref: '#/components/schemas/extractResult.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
            - 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.
  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.