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

# Get a search

> Returns a search's status and, once it has finished, its results. Poll every 2 to 5 seconds until `status` is `completed` or `failed`. Polling is free and has no rate limit.

A search that found nothing still completes, with `success: false` and empty lists, and costs nothing. A failed or cancelled search answers `200` with `status: "failed"` and the reason in `error`, and you aren't charged.

A finished search stays here for about an hour, and a failed one for 24 hours. After that this returns `404`, and the search is still in your [search logs](/api-reference/search/search-logs).




## OpenAPI

````yaml GET /search/{jobId}
openapi: 3.1.0
info:
  title: Spidra API
  version: 1.0.0
  description: >-
    Public API endpoints for web scraping via Spidra. Authenticate with
    `Authorization: Bearer YOUR_API_KEY`.
servers:
  - url: https://api.spidra.io/api
security:
  - BearerAuth: []
  - ApiKeyAuth: []
paths:
  /search/{jobId}:
    get:
      tags:
        - Search
      summary: Get a search
      description: >
        Returns a search's status and, once it has finished, its results. Poll
        every 2 to 5 seconds until `status` is `completed` or `failed`. Polling
        is free and has no rate limit.


        A search that found nothing still completes, with `success: false` and
        empty lists, and costs nothing. A failed or cancelled search answers
        `200` with `status: "failed"` and the reason in `error`, and you aren't
        charged.


        A finished search stays here for about an hour, and a failed one for 24
        hours. After that this returns `404`, and the search is still in your
        [search logs](/api-reference/search/search-logs).
      parameters:
        - name: jobId
          in: path
          required: true
          description: The `jobId` returned by `POST /search`.
          schema:
            type: string
            format: uuid
          example: 7ae18e2b-2953-45d8-9cea-5a246f367c2f
      responses:
        '200':
          description: The search's status, and its result once it has finished.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/JobStatus'
                  progress:
                    type: object
                    properties:
                      message:
                        type: string
                        description: >-
                          What the search is doing, such as `"Fetching page
                          content... (1/2)"`.
                      progress:
                        type: number
                        minimum: 0
                        maximum: 1
                        description: How far along the search is, from 0 to 1.
                  result:
                    description: >-
                      The result once `status` is `completed`. `null` before
                      that.
                    oneOf:
                      - $ref: '#/components/schemas/SearchResult'
                      - type: 'null'
                  error:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Why the search failed once `status` is `failed`, such as
                      `"Search cancelled"`. `null` otherwise.
              examples:
                multi_source:
                  summary: Finished, news, research and GitHub
                  value:
                    status: completed
                    progress:
                      message: Search completed successfully
                      progress: 1
                    result:
                      success: true
                      data:
                        news:
                          - title: >-
                              VCs are obsessed with vector databases. Here are
                              seven AI startups in the space that have raised
                              millions from investors.
                            url: >-
                              https://www.businessinsider.com/seven-vector-database-startups-poised-to-win-ai-revolution-2024-4
                            description: >-
                              Vector databases don&#x27;t get as much love as
                              their flashier counterparts ...
                            source: Business Insider
                            date: 3 years ago
                            position: 1
                        research:
                          - title: >-
                              BioVDB: biological vector database for
                              high-throughput gene expression meta-analysis.
                            url: https://doi.org/10.3389/frai.2024.1366273
                            description: >-
                              High-throughput sequencing has created an
                              exponential increase in the amount of gene
                              expression data ...
                            date: '2024-03-08'
                            source: PubMed
                            authors: >-
                              Winnicki MJ, Brown CA, Porter HL, Giles CB, Wren
                              JD.
                            doi: 10.3389/frai.2024.1366273
                            position: 1
                        developer:
                          - title: >-
                              PR: feat(vector-db): add Qdrant vector database
                              support (#273)
                            url: https://github.com/arakoodev/EdgeChains/pull/706
                            description: >-
                              [arakoodev/EdgeChains] (open) ### Summary Adds
                              native support for Qdrant vector database in
                              EdgeChains JavaScript SDK ...
                            date: '2026-10-23T18:27:57Z'
                            source: GitHub
                            authors: EverVio
                            position: 1
                        nextPageTokens:
                          news: >-
                            v1.VUzJypAoYmbNxbMXHm6thxeI-fh1K03YfG2sDRSpPMUkca0e1s7XH51ago1JorLtdr1Y...
                          research: >-
                            v1.7Z_R06S8ieWzHJGARfWbvv1lRZ7JsGK7ZG6ZYzdCp-8AQYw3lBHqRSWN6rIFPq_Eso...
                          developer: >-
                            v1.SETjbw0J45NTTGqGPawGMXr7JL9d0uzIfW6nq4fZrIXUF1vb_9oHTi4hwi0VgCTqPP3j...
                      stats:
                        durationMs: 20019
                      logUuid: 6ec30fde-ea19-45cf-8c88-10f2c41d5cae
                    error: null
                scrape_content:
                  summary: Finished, with page content
                  value:
                    status: completed
                    progress:
                      message: Search completed successfully
                      progress: 1
                    result:
                      success: true
                      data:
                        web:
                          - title: >-
                              How to redact event data before it is sent to
                              PostHog - PostHog
                            url: >-
                              https://posthog.com/tutorials/web-redact-properties
                            description: >-
                              PostHog will use the client IP address found
                              during an event capture request if an $ip isn't
                              passed through event.properties. ...
                            position: 1
                            markdown: >-
                              # How to redact event data before it is sent to
                              PostHog


                              * [!Vincent Ge](/community/profiles/34100)


                              May 29, 2025


                              ...
                          - title: Tutorials - Data management - PostHog
                            url: >-
                              https://posthog.com/tutorials/categories/data-management
                            description: >-
                              How to redact event data before it is sent to
                              PostHog.A non-technical guide to understanding
                              data in PostHog. ...
                            position: 2
                        nextPageTokens:
                          web: >-
                            v1.aVSFo21dizh0cI4pcsiZccigr7JalXPxiCTixRqL01jLBTAJ8J3SEXg8BBWKeb3L362L...
                      stats:
                        durationMs: 10932
                      logUuid: d25aa3b9-4f5c-46e4-be90-02334ea5bda5
                    error: null
                cancelled:
                  summary: Cancelled
                  value:
                    status: failed
                    progress:
                      message: Search cancelled
                      progress: 0
                    result: null
                    error: Search cancelled
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            The search belongs to another account, or search isn't turned on for
            your account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                forbidden:
                  summary: Another account's search
                  value:
                    status: error
                    message: You do not have permission to access this job.
                    code: FORBIDDEN
                not_available:
                  summary: Search not turned on for this account
                  value:
                    status: error
                    message: This feature isn't available on your account yet.
        '404':
          description: >-
            There's no search with this ID, or it finished more than an hour ago
            (24 hours for a failed one).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: error
                message: Search job not found
                code: JOB_NOT_FOUND
        '500':
          description: The search couldn't be loaded. Try again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: error
                message: Failed to retrieve job status
                code: INTERNAL_ERROR
        '503':
          description: The job queue is briefly unavailable. Try again in a few seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: error
                message: Job queue temporarily unavailable. Please try again.
                code: QUEUE_UNAVAILABLE
components:
  schemas:
    JobStatus:
      type: string
      enum:
        - waiting
        - delayed
        - active
        - completed
        - failed
      description: |
        - `waiting`: queued, not started yet.
        - `delayed`: waiting to be retried after a temporary problem.
        - `active`: running. `progress.message` says what it's doing.
        - `completed`: finished. The result is in `result`.
        - `failed`: couldn't be done. `error` says why, and you aren't charged.
    SearchResult:
      type: object
      description: The finished result of a search.
      properties:
        success:
          type: boolean
          description: >-
            `false` when no source returned any results. You aren't charged
            then.
        data:
          type: object
          description: >-
            One list per source you asked for, plus `nextPageTokens` and,
            sometimes, `extras`.
          properties:
            web:
              type: array
              items:
                $ref: '#/components/schemas/SearchResultItem'
              description: Web results, when you asked for `web`.
            news:
              type: array
              items:
                $ref: '#/components/schemas/SearchResultItem'
              description: News articles, when you asked for `news`.
            images:
              type: array
              items:
                $ref: '#/components/schemas/SearchResultItem'
              description: Images, when you asked for `images`.
            videos:
              type: array
              items:
                $ref: '#/components/schemas/SearchResultItem'
              description: Videos, when you asked for `videos`.
            research:
              type: array
              items:
                $ref: '#/components/schemas/SearchResultItem'
              description: Academic papers and preprints, when you asked for `research`.
            developer:
              type: array
              items:
                $ref: '#/components/schemas/SearchResultItem'
              description: GitHub issues and pull requests, when you asked for `developer`.
            extras:
              $ref: '#/components/schemas/SearchExtras'
            nextPageTokens:
              type: object
              additionalProperties:
                type: string
              description: >-
                One token per source that has more results. Send it back as
                `pageTokens` to get that source's next page. Missing for a
                source with no more results.
        stats:
          type: object
          description: How the search ran.
          properties:
            durationMs:
              type: integer
              description: How long the search took, in milliseconds.
        logUuid:
          type: string
          format: uuid
          description: >-
            The ID of this search in your [search
            logs](/api-reference/search/search-logs). When you fetch a next page
            with `pageTokens`, this stays the first page's ID.
    ErrorResponse:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
          description: What went wrong, as a sentence you can show to a person.
        code:
          type: string
          description: >-
            A stable code for the error, when there is one, such as
            `JOB_NOT_FOUND` or `SERVICE_BUSY`. Branch on this rather than on
            `message`.
        errors:
          description: >-
            On validation errors (`422`), every problem with the request.
            Scrape, batch, crawl, map and search return a list of sentences.
            Templates, presets and monitors return `{ field, message }` objects.
          oneOf:
            - type: array
              items:
                type: string
            - type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  message:
                    type: string
        retry_after:
          type: integer
          description: >-
            On `503 SERVICE_BUSY`, how many seconds to wait before sending the
            request again.
    SearchResultItem:
      type: object
      required:
        - title
        - url
        - position
      description: One search result. Which optional fields appear depends on the source.
      properties:
        title:
          type: string
          description: The result's title. Developer results start with `PR:` or `Issue:`.
        url:
          type: string
          description: The result's link. For images, the page the image is on.
        description:
          type: string
          description: >-
            The snippet shown with the result. For research, the abstract. For
            developer results, the repository, its state and the start of the
            body.
        position:
          type: integer
          description: The result's rank within its source, starting at 1.
        imageUrl:
          type: string
          description: Images only. The full-size image.
        thumbnailUrl:
          type: string
          description: Images and videos. A small preview image.
        imageWidth:
          type: integer
          description: Images only, when known. The width in pixels.
        imageHeight:
          type: integer
          description: Images only, when known. The height in pixels.
        date:
          type: string
          description: >-
            News, videos, research and developer results. As the source gives
            it, so it can be relative (`3 years ago`) or a date and time. For
            research, the publication date.
        source:
          type: string
          description: >-
            News, research and developer results. The publisher for news, the
            journal or database for research, and `GitHub` for developer
            results.
        duration:
          type: string
          description: Videos only. The length, such as `24:59`.
        authors:
          type: string
          description: >-
            Research and developer results. The authors as one comma-separated
            string for research, and the username of whoever opened the issue or
            pull request for developer results.
        doi:
          type: string
          description: Research only, when the paper has one. Its DOI.
        markdown:
          type: string
          description: >-
            Web results only, with `scrapeOptions`. The page as Markdown.
            Missing when the page couldn't be read in time, when it's past
            `scrapeOptions.maxResults`, or when you were out of credits. That's
            not an error.
        structuredData:
          type: object
          description: >-
            Web results only, with `scrapeOptions`, when the result is on one of
            the [popular sites](/sites/overview). The page's data, such as a
            product's price or a video's views.
    SearchExtras:
      type: object
      description: >-
        Extra panels that sometimes come with web results. Only present when the
        search found them, so never rely on them being there.
      properties:
        relatedSearches:
          type: array
          items:
            type: string
          description: Related queries people also search for.
        topStories:
          type: array
          description: News stories shown for the query.
          items:
            type: object
            required:
              - title
              - url
            properties:
              title:
                type: string
                description: The story's headline.
              url:
                type: string
                description: The story's link.
              source:
                type: string
                description: The publisher.
              date:
                type: string
                description: When it was published
                as shown.: null
        answerBox:
          type: object
          description: A direct answer, such as a currency or unit conversion.
          required:
            - type
            - value
          properties:
            type:
              type: string
              enum:
                - currency
                - unit_conversion
              description: What kind of answer it is.
            value:
              type: string
              description: The answer.
        knowledgeBox:
          type: object
          description: A short summary of a company, place or idea.
          required:
            - title
          properties:
            title:
              type: string
              description: What the summary is about.
            category:
              type: string
              description: What kind of thing it is.
            description:
              type: string
              description: The summary.
  responses:
    Unauthorized:
      description: The API key is missing, wrong, or turned off.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missing:
              summary: No key sent
              value:
                status: error
                message: Missing authentication
            invalid:
              summary: Wrong or turned-off key
              value:
                status: error
                message: Invalid token or API key
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

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