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

# Inspect a package release

> Get an overview of a package and one of its published releases, including its description, license, and deprecation status. You can also include download counts, GitHub repository details, security advisories, and release notes.

Use this endpoint to evaluate a dependency or check a version you already use. For a release history, use `GET /v1/changelog`; for a full advisory list, use `GET /v1/packages/{registry}/{name}/vulnerabilities`.

## Selector catalogue

Use the following selectors with the `fields` query parameter to choose which fields the response includes. See [Choose what the response includes](https://docs.githits.com/api/requests-and-responses#choose-what-the-response-includes) for details.

| Selector | Data | Default |
| --- | --- | --- |
| `package` | Package description, homepage, repository URL, version count and latest-release publication timestamp. | Yes |
| `selected_version` | Selected release publication timestamp, license, deprecation state and deprecation reason. | Yes |
| `package.downloads` | Download counts for the last month and all time, plus the refresh timestamp. | No |
| `package.github_repository` | Linked GitHub repository owner, name, stars, forks, subscribers, open-issue count, archive state, language, license, topics and timestamps. | No |
| `security` | Selected-release affected flag and advisory count, plus the package-wide advisory count. | No |
| `security.recent_vulnerabilities` | Up to five newest advisories affecting the selected release; selecting this group also includes security counts. | No |
| `selected_version.changelog` | Exact selected-release changelog metadata and entry details. | No |
| `selected_version.changelog.body` | Exact selected-release changelog body; selecting this group also implies changelog metadata. | No |
| `package.*` | Bundle of package metadata, package.downloads and package.github_repository. | No |
| `security.*` | Bundle of security counts and security.recent_vulnerabilities previews. | No |
| `selected_version.*` | Bundle of selected-version metadata, selected_version.changelog and selected_version.changelog.body. | No |




## OpenAPI

````yaml https://api.githits.dev/v1/openapi.json get /v1/packages/{registry}/{name}
openapi: 3.1.0
info:
  description: >-
    Explore package metadata, security advisories, dependencies, documentation
    and source code with the GitHits API.


    ## Choose an operation


    | Task | Operations |

    | --- | --- |

    | Inspect a package | Release metadata, vulnerabilities and dependencies |

    | Review releases or upgrades | Changelog and batch upgrade reviews |

    | Read documentation | List package documentation, then read a page |

    | Navigate source code | List files, read a file or search text within a
    target |

    | Compare source trees | Compare files, line statistics and patches between
    package versions or repository refs |

    | Discover relevant content | Search across packages, repositories and
    documentation sites; retrieve a search's status and retained results |

    | Resolve a target name | Find ranked package, repository and
    documentation-site targets |

    | Ask a cited question | Generate an answer grounded in a package,
    repository or documentation site, or continue a conversation |

    | Generate an example | Generate and save a code example, then submit
    feedback |

    | Find a language identifier | Search supported programming languages |


    ## Authenticate and send requests


    The production API origin is `https://api.githits.dev`; development uses
    `https://api-dev.githits.dev`. Examples target production. Replace `<token>`
    with your GitHits token. Send the token in `Authorization: Bearer <token>`.
    JSON request bodies use `Content-Type: application/json`; public JSON field
    names use `snake_case`.


    Percent-encode a package name or opaque read target as one path segment,
    including any embedded slash. For query values, encode a literal plus sign
    as `%2B`; ordinary form decoding interprets `+` as a space. Each operation
    documents its accepted parameters and encoding rules.


    ## Select the data you need


    Where supported, `fields` is a comma-separated **query parameter**,
    including on POST requests. Omit it to use the operation's defaults.
    Supplying it replaces those defaults; required identity and information
    needed to interpret the result remain present.


    A **selector** names a supported **group** of response fields. Groups are
    atomic: their members are selected together. A **wildcard bundle**, such as
    `vulnerabilities.*`, selects only the groups listed for that bundle. A bare
    group does not automatically include nested groups. Arbitrary subfields and
    undeclared wildcards are not supported.


    Each operation lists its selectors, defaults, dependencies and the data they
    return. Selection can reduce transferred data without reducing the work
    needed to produce it; consult its parameter and response field
    documentation. Small fixed responses do not offer `fields`.


    ## Interpret responses and errors


    An omitted optional field can mean unselected or unavailable data, according
    to the operation's contract. Null has an operation-specific meaning: it can
    mark unavailable or inapplicable data, or an unselected search result. Empty
    arrays, zero and false are values, not substitutes for unavailable data.
    Always retain the result's completeness and freshness information when
    displaying or processing it.


    **Requested** identity records caller intent; **resolved** identity records
    what that intent resolved to; **served** identity identifies the artifact
    that produced the response. These can differ while indexing or refresh work
    continues. Use served identity when an exact follow-up read is required,
    preserving package-relative or repository-relative path scope.


    Errors normally use `application/problem+json`. Branch on the stable `code`,
    not the human-readable `detail`. Include `X-Request-ID` when reporting a
    problem; error `instance` matches that ID. Respect `Retry-After` when
    present. If request identity cannot be created, the response is an empty
    HTTP 500 without a request ID. Responses use `Cache-Control: no-store`.


    Timeouts do not guarantee that work stopped. Read the documented timeout
    responses, especially for Ask, generated examples and append-only feedback.
    Optional `X-GitHits-*` request headers attribute client, agent and session
    usage. The OpenAPI extension `x-githits-cost` is provisional operation
    metadata, not a price or a measure of computation.


    ## Contract status


    This API is pre-production. The external v1 contract is not yet frozen.
  license:
    name: Proprietary
  title: GitHits Public API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.githits.dev
security: []
tags:
  - description: >-
      Package metadata, release history, vulnerabilities, dependency graphs and
      upgrade comparisons. Each operation documents its registry, version and
      evidence scope.
    name: Packages
  - description: >-
      Discover existing documentation pages and read their content with exact
      source locators and availability information.
    name: Documentation
  - description: >-
      Enumerate files, read exact content and grep within a package or
      repository. Responses retain served identity, indexing state and
      completeness information.
    name: Code
  - description: >-
      Discover evidence across package, repository and documentation-site
      targets, then retrieve retained search results and progress.
    name: Search
  - description: >-
      Find supported programming-language names and aliases for example
      requests.
    name: Languages
  - description: >-
      Generate code examples for programming tasks, with source references and
      license attribution.
    name: Examples
  - description: Rate generated examples or sessions and provide written feedback.
    name: Feedback
  - description: >-
      Preview operations for target resolution, source comparison and cited
      questions. Routes use /v1/experimental and may later move to permanent v1
      locations under a documented migration policy.
    name: Experimental
paths:
  /v1/packages/{registry}/{name}:
    get:
      tags:
        - Packages
      summary: Inspect a package release
      description: >
        Get an overview of a package and one of its published releases,
        including its description, license, and deprecation status. You can also
        include download counts, GitHub repository details, security advisories,
        and release notes.


        Use this endpoint to evaluate a dependency or check a version you
        already use. For a release history, use `GET /v1/changelog`; for a full
        advisory list, use `GET /v1/packages/{registry}/{name}/vulnerabilities`.


        ## Selector catalogue


        Use the following selectors with the `fields` query parameter to choose
        which fields the response includes. See [Choose what the response
        includes](https://docs.githits.com/api/requests-and-responses#choose-what-the-response-includes)
        for details.


        | Selector | Data | Default |

        | --- | --- | --- |

        | `package` | Package description, homepage, repository URL, version
        count and latest-release publication timestamp. | Yes |

        | `selected_version` | Selected release publication timestamp, license,
        deprecation state and deprecation reason. | Yes |

        | `package.downloads` | Download counts for the last month and all time,
        plus the refresh timestamp. | No |

        | `package.github_repository` | Linked GitHub repository owner, name,
        stars, forks, subscribers, open-issue count, archive state, language,
        license, topics and timestamps. | No |

        | `security` | Selected-release affected flag and advisory count, plus
        the package-wide advisory count. | No |

        | `security.recent_vulnerabilities` | Up to five newest advisories
        affecting the selected release; selecting this group also includes
        security counts. | No |

        | `selected_version.changelog` | Exact selected-release changelog
        metadata and entry details. | No |

        | `selected_version.changelog.body` | Exact selected-release changelog
        body; selecting this group also implies changelog metadata. | No |

        | `package.*` | Bundle of package metadata, package.downloads and
        package.github_repository. | No |

        | `security.*` | Bundle of security counts and
        security.recent_vulnerabilities previews. | No |

        | `selected_version.*` | Bundle of selected-version metadata,
        selected_version.changelog and selected_version.changelog.body. | No |
      operationId: get_package_info
      parameters:
        - description: >-
            Registry that publishes the package, such as npm or pypi. Use a
            lowercase identifier from the supported values.
          example: npm
          in: path
          name: registry
          required: true
          schema:
            enum:
              - npm
              - pypi
              - hex
              - crates
              - vcpkg
              - zig
              - nuget
              - maven
              - packagist
              - rubygems
              - go
              - swift
            type: string
        - description: >-
            Name of the package in its registry. Encode a scoped name as one
            path segment, for example `%40scope%2Fpackage`. Accepts 1–255 UTF-8
            bytes without control characters; spelling and whitespace are
            preserved.
          example: express
          in: path
          name: name
          required: true
          schema:
            type: string
        - description: >-
            Release to inspect: an exact published version or a constraint
            supported by the registry. Omit for the registry’s current release.
            Leading and trailing whitespace is removed; blank means omitted.
            Numeric Go versions gain lowercase `v`; other prefixed versions pass
            through to resolution. The normalized value allows up to 100 UTF-8
            bytes without control characters. Encode a literal `+` as `%2B`, for
            example `v2.0.0%2Bincompatible`.
          example: 4.18.2
          in: query
          name: version
          required: false
          schema:
            type: string
        - description: >-
            Response groups to include, separated by commas. Defaults to
            `package,selected_version`; an explicit selection replaces these
            defaults. Package identity and selected-release identity are always
            returned. Selecting recent vulnerabilities also includes security
            counts; selecting a changelog body also includes its release
            metadata. Unselected groups are omitted. Selected nullable fields
            are null when unavailable.


            Use the case-sensitive selectors in the catalogue. Order and
            duplicate selectors do not affect the result. ASCII whitespace
            around selectors is ignored. The decoded value is limited to 2048
            UTF-8 bytes. Empty or unknown selectors and repeated `fields` query
            parameters return `400 VALIDATION_ERROR`. A group does not include
            nested groups unless the catalogue says so; only listed wildcard
            bundles are supported.
          example: selected_version,security
          in: query
          name: fields
          required: false
          schema:
            default: package,selected_version
            type: string
        - description: >-
            Optional client attribution: trimmed printable ASCII, at most 80
            bytes. Invalid optional values are dropped.
          in: header
          name: X-GitHits-Client-Name
          required: false
          schema:
            type: string
        - description: >-
            Optional client-version attribution: trimmed printable ASCII, at
            most 80 bytes. Invalid optional values are dropped.
          in: header
          name: X-GitHits-Client-Version
          required: false
          schema:
            type: string
        - description: >-
            Optional agent attribution: trimmed printable ASCII, at most 160
            bytes. Invalid optional values are dropped.
          in: header
          name: X-GitHits-Agent
          required: false
          schema:
            type: string
        - description: >-
            Optional session attribution: trimmed printable ASCII, at most 128
            bytes. Invalid optional values are dropped; no session is created.
          in: header
          name: X-GitHits-Session-ID
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                default:
                  summary: Current release with default metadata
                  value:
                    package:
                      description: Web framework
                      homepage: https://expressjs.com
                      latest_version: 5.1.0
                      latest_version_published_at: null
                      name: express
                      registry: npm
                      repository_url: https://github.com/expressjs/express
                      version_count: 100
                    selected_version:
                      deprecated: false
                      deprecation_reason: null
                      is_latest: true
                      license: MIT
                      published_at: null
                      requested_version: null
                      resolved_version: 5.1.0
                historical_without_current:
                  summary: >-
                    Exact historical release without an authoritative current
                    release
                  value:
                    package:
                      description: Web framework
                      homepage: https://expressjs.com
                      latest_version: null
                      latest_version_published_at: null
                      name: express
                      registry: npm
                      repository_url: https://github.com/expressjs/express
                      version_count: 100
                    selected_version:
                      deprecated: false
                      deprecation_reason: null
                      is_latest: false
                      license: MIT
                      published_at: null
                      requested_version: 4.18.2
                      resolved_version: 4.18.2
                release_notes:
                  summary: version=5.1.0&fields=selected_version.changelog.body
                  value:
                    package:
                      latest_version: 5.1.0
                      name: express
                      registry: npm
                    selected_version:
                      changelog:
                        detail_source: releases
                        entry:
                          body: Illustrative release notes.
                          html_url: >-
                            https://github.com/expressjs/express/releases/tag/v5.1.0
                          normalized_version: 5.1.0
                          published_at: null
                          version: v5.1.0
                        has_changelog: true
                      is_latest: true
                      requested_version: 5.1.0
                      resolved_version: 5.1.0
                security_only:
                  summary: version=4.18.2&fields=security.*
                  value:
                    package:
                      latest_version: 5.1.0
                      name: express
                      registry: npm
                    security:
                      affected_vulnerability_count: 1
                      package_vulnerability_count: 3
                      recent_vulnerabilities:
                        - osv_id: GHSA-example
                          published_at: null
                          severity_score: 7.5
                          summary: Illustrative advisory preview
                      selected_version_affected: true
                    selected_version:
                      is_latest: false
                      requested_version: 4.18.2
                      resolved_version: 4.18.2
              schema:
                $ref: '#/components/schemas/PackageInfoReport'
          description: Resolved package and release facts with selected optional groups.
          headers:
            Cache-Control:
              schema:
                enum:
                  - no-store
                type: string
            X-Request-ID:
              description: >-
                Request trace ID for diagnostics; matches problem.instance on
                failures.
              schema:
                type: string
        '400':
          content:
            application/problem+json:
              example:
                code: VALIDATION_ERROR
                detail: The request is invalid.
                instance: 4bf92f3577b34da6a3ce929d0e0e4736
                status: 400
                title: Validation error
                type: about:blank
              schema:
                $ref: '#/components/schemas/ProblemResponse'
          description: 'VALIDATION_ERROR: The request is invalid.'
          headers:
            Cache-Control:
              schema:
                enum:
                  - no-store
                type: string
            X-Request-ID:
              description: >-
                Request trace ID for diagnostics; matches problem.instance on
                failures.
              schema:
                type: string
        '401':
          content:
            application/problem+json:
              example:
                code: AUTHENTICATION_REQUIRED
                detail: A bearer credential is required.
                instance: 4bf92f3577b34da6a3ce929d0e0e4736
                status: 401
                title: Authentication required
                type: about:blank
              schema:
                $ref: '#/components/schemas/ProblemResponse'
          description: 'AUTHENTICATION_REQUIRED: A bearer credential is required.'
          headers:
            Cache-Control:
              schema:
                enum:
                  - no-store
                type: string
            WWW-Authenticate:
              schema:
                type: string
            X-Request-ID:
              description: >-
                Request trace ID for diagnostics; matches problem.instance on
                failures.
              schema:
                type: string
        '403':
          content:
            application/problem+json:
              example:
                code: FORBIDDEN
                detail: The caller is not allowed to access this resource.
                instance: 4bf92f3577b34da6a3ce929d0e0e4736
                status: 403
                title: Forbidden
                type: about:blank
              schema:
                $ref: '#/components/schemas/ProblemResponse'
          description: >-
            FORBIDDEN, ACCOUNT_INACTIVE, FEATURE_FLAG_REQUIRED,
            TERMS_ACCEPTANCE_REQUIRED: Access is not permitted; terms errors may
            include HTTPS acceptance links.
          headers:
            Cache-Control:
              schema:
                enum:
                  - no-store
                type: string
            X-Request-ID:
              description: >-
                Request trace ID for diagnostics; matches problem.instance on
                failures.
              schema:
                type: string
        '404':
          content:
            application/problem+json:
              example:
                available_package_versions:
                  - 5.1.0
                  - 4.18.2
                code: VERSION_NOT_FOUND
                detail: >-
                  No package version matches the requested version or
                  constraint. Try a published version or adjust the constraint.
                instance: 4bf92f3577b34da6a3ce929d0e0e4736
                status: 404
                title: Version not found
                type: about:blank
              schema:
                $ref: '#/components/schemas/PackageInfoProblem'
          description: >-
            PACKAGE_NOT_FOUND, VERSION_NOT_FOUND, NO_RELEASED_VERSIONS,
            NO_CURRENT_RELEASE: The package or requested release is unavailable.
            Request an exact published release when no current release exists.
          headers:
            Cache-Control:
              schema:
                enum:
                  - no-store
                type: string
            X-Request-ID:
              description: >-
                Request trace ID for diagnostics; matches problem.instance on
                failures.
              schema:
                type: string
        '405':
          content:
            application/problem+json:
              example:
                code: METHOD_NOT_ALLOWED
                detail: The requested method is not supported for this route.
                instance: 4bf92f3577b34da6a3ce929d0e0e4736
                status: 405
                title: Method not allowed
                type: about:blank
              schema:
                $ref: '#/components/schemas/ProblemResponse'
          description: 'METHOD_NOT_ALLOWED: the route does not support this HTTP method.'
          headers:
            Allow:
              description: 'Supported methods: GET, HEAD.'
              schema:
                type: string
            Cache-Control:
              schema:
                enum:
                  - no-store
                type: string
            X-Request-ID:
              description: >-
                Request trace ID for diagnostics; matches problem.instance on
                failures.
              schema:
                type: string
        '422':
          content:
            application/problem+json:
              example:
                code: UNSUPPORTED_PACKAGE_VARIANTS
                detail: The package release has unsupported artifact variants.
                instance: 4bf92f3577b34da6a3ce929d0e0e4736
                status: 422
                title: Unsupported package variants
                type: about:blank
              schema:
                $ref: '#/components/schemas/ProblemResponse'
          description: >-
            UNSUPPORTED_PACKAGE_VARIANTS: The release has unsupported artifact
            variants.
          headers:
            Cache-Control:
              schema:
                enum:
                  - no-store
                type: string
            X-Request-ID:
              description: >-
                Request trace ID for diagnostics; matches problem.instance on
                failures.
              schema:
                type: string
        '429':
          content:
            application/problem+json:
              example:
                code: RATE_LIMITED
                detail: The request was rate limited.
                instance: 4bf92f3577b34da6a3ce929d0e0e4736
                status: 429
                title: Rate limited
                type: about:blank
              schema:
                $ref: '#/components/schemas/ProblemResponse'
          description: 'RATE_LIMITED: Respect Retry-After when present.'
          headers:
            Cache-Control:
              schema:
                enum:
                  - no-store
                type: string
            Retry-After:
              schema:
                type: string
            X-Request-ID:
              description: >-
                Request trace ID for diagnostics; matches problem.instance on
                failures.
              schema:
                type: string
        '500':
          description: >-
            Request identity could not be created. Empty body without
            X-Request-ID; no problem object is available.
          headers:
            Cache-Control:
              schema:
                enum:
                  - no-store
                type: string
          x-githits-empty-identity-failure: true
        '502':
          content:
            application/problem+json:
              example:
                code: UPSTREAM_ERROR
                detail: The upstream service failed to provide a response.
                instance: 4bf92f3577b34da6a3ce929d0e0e4736
                status: 502
                title: Upstream error
                type: about:blank
              schema:
                $ref: '#/components/schemas/ProblemResponse'
          description: >-
            UPSTREAM_ERROR: A required source response or selected facet failed;
            report persistent failures.
          headers:
            Cache-Control:
              schema:
                enum:
                  - no-store
                type: string
            X-Request-ID:
              description: >-
                Request trace ID for diagnostics; matches problem.instance on
                failures.
              schema:
                type: string
        '504':
          content:
            application/problem+json:
              example:
                code: TIMEOUT
                detail: The upstream request did not complete in time.
                instance: 4bf92f3577b34da6a3ce929d0e0e4736
                status: 504
                title: Upstream timeout
                type: about:blank
              schema:
                $ref: '#/components/schemas/ProblemResponse'
          description: 'TIMEOUT: The request deadline elapsed; upstream work may continue.'
          headers:
            Cache-Control:
              schema:
                enum:
                  - no-store
                type: string
            X-Request-ID:
              description: >-
                Request trace ID for diagnostics; matches problem.instance on
                failures.
              schema:
                type: string
      security:
        - bearer_auth: []
      x-codeSamples:
        - label: Current release
          lang: HTTP
          source: |-
            GET /v1/packages/npm/express HTTP/1.1
            Host: api.githits.dev
            Authorization: Bearer <token>
        - label: Security for an exact release
          lang: HTTP
          source: >-
            GET /v1/packages/npm/express?version=4.18.2&fields=security.*
            HTTP/1.1

            Host: api.githits.dev

            Authorization: Bearer <token>
        - label: Release notes with body
          lang: HTTP
          source: >-
            GET
            /v1/packages/npm/express?version=5.1.0&fields=selected_version.changelog.body
            HTTP/1.1

            Host: api.githits.dev

            Authorization: Bearer <token>
        - label: Package metadata and downloads
          lang: HTTP
          source: >-
            GET /v1/packages/npm/express?fields=package,package.downloads
            HTTP/1.1

            Host: api.githits.dev

            Authorization: Bearer <token>
components:
  schemas:
    PackageInfoReport:
      description: >-
        One inspected release with selected package-wide and release-specific
        facts.
      properties:
        package:
          $ref: '#/components/schemas/PackageInfoPackage'
          description: Canonical package identity and selected package-wide metadata.
        security:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PackageInfoSecurity'
              description: >-
                Selected security facts; omitted when unselected and null when
                unavailable.
        selected_version:
          $ref: '#/components/schemas/PackageInfoSelectedVersion'
          description: The concrete release inspected by this request.
      required:
        - package
        - selected_version
      type: object
    ProblemResponse:
      description: >-
        The stable problem document returned for an unsuccessful public API
        request.
      properties:
        acceptance_url:
          description: An optional acceptance URL supplied by the upstream allow-list.
          type: string
        code:
          description: The stable uppercase API error code.
          type: string
        detail:
          description: A stable, client-safe explanation of the failure.
          type: string
        instance:
          description: The active request trace ID.
          type: string
        status:
          description: The HTTP status returned with this problem.
          format: int32
          minimum: 0
          type: integer
        terms_url:
          description: An optional terms URL supplied by the upstream allow-list.
          type: string
        title:
          description: A short, stable title for the error.
          type: string
        type:
          description: The generic RFC 9457 problem type.
          type: string
      required:
        - type
        - title
        - status
        - detail
        - instance
        - code
      type: object
    PackageInfoProblem:
      allOf:
        - $ref: '#/components/schemas/ProblemResponse'
        - properties:
            available_package_versions:
              description: >-
                Up to ten published version suggestions, not a complete version
                inventory.
              items:
                type: string
              maxItems: 10
              type: array
          type: object
      description: Package-inspection failure with optional bounded version guidance.
    PackageInfoPackage:
      description: Package-wide facts, distinct from the selected release.
      properties:
        description:
          description: Package description; selected by package, null when unavailable.
          type:
            - string
            - 'null'
        downloads:
          $ref: '#/components/schemas/PackageInfoDownloads'
          description: >-
            Download counts; omitted when unselected. When selected, the object
            is

            present even if every count is unavailable.
        github_repository:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PackageInfoGithubRepository'
              description: >-
                Linked GitHub repository; omitted when unselected, null when
                unavailable.
        homepage:
          description: Package homepage; selected by package, null when unavailable.
          type:
            - string
            - 'null'
        latest_version:
          description: >-
            Current release designated by the registry; null when none is
            available.

            An exact historical release can still be inspected when this is
            null.
          type:
            - string
            - 'null'
        latest_version_published_at:
          description: >-
            Publication time of the authoritative current release; selected by
            package, nullable.
          type:
            - string
            - 'null'
        name:
          description: Canonical package name.
          type: string
        registry:
          description: Canonical lowercase package registry.
          type: string
        repository_url:
          description: Source repository URL; selected by package, null when unavailable.
          type:
            - string
            - 'null'
        version_count:
          description: Published release count; selected by package, including known zero.
          format: int64
          minimum: 0
          type: integer
      required:
        - registry
        - name
        - latest_version
      type: object
    PackageInfoSecurity:
      description: >-
        Active alias-deduplicated advisory facts, excluding withdrawn
        advisories.
      properties:
        affected_vulnerability_count:
          description: >-
            Active advisories affecting the selected release; not preview
            length.
          format: int64
          minimum: 0
          type: integer
        package_vulnerability_count:
          description: >-
            Active advisories across package history, including those not
            affecting this release.
          format: int64
          minimum: 0
          type: integer
        recent_vulnerabilities:
          description: >-
            Up to five newest active advisories affecting this release; omitted
            when unselected.

            For the full list and severity filters, use
            `/v1/packages/{registry}/{name}/vulnerabilities`

            with `resolved_version` as its version parameter.
          items:
            $ref: '#/components/schemas/PackageInfoAdvisory'
          maxItems: 5
          type: array
        selected_version_affected:
          description: Whether an active advisory affects the inspected release.
          type: boolean
      required:
        - selected_version_affected
        - affected_vulnerability_count
        - package_vulnerability_count
      type: object
    PackageInfoSelectedVersion:
      description: Identity and selected facts for the inspected release.
      properties:
        changelog:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PackageInfoChangelog'
              description: >-
                Exact selected-release changelog; omitted when unselected, null
                when unavailable.
        deprecated:
          description: Selected-release deprecation flag; selected by `selected_version`.
          type: boolean
        deprecation_reason:
          description: >-
            Registry deprecation reason; selected by `selected_version`,
            nullable.
          type:
            - string
            - 'null'
        is_latest:
          description: >-
            Whether the inspected release is the registry’s current release.

            False also applies when no current release exists, so it does not
            always mean an upgrade is available.
          type: boolean
        license:
          description: >-
            Selected-release license; null for unknown, with no package or
            GitHub fallback.
          type:
            - string
            - 'null'
        published_at:
          description: >-
            Selected-release publication time; selected by `selected_version`,
            nullable.
          type:
            - string
            - 'null'
        requested_version:
          description: >-
            Version or constraint after request normalization and source
            identifier sanitization;

            null when omitted. This may differ from the original query text.
          type:
            - string
            - 'null'
        resolved_version:
          description: Concrete published release selected by the registry resolver.
          type: string
      required:
        - requested_version
        - resolved_version
        - is_latest
      type: object
    PackageInfoDownloads:
      description: >-
        Package-wide download counts. JSON integers can exceed JavaScript Number
        precision; use a lossless parser for exact large values.
      properties:
        last_month:
          description: Downloads in the last month; null when unavailable.
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        refreshed_at:
          description: When download counts were refreshed; null when unavailable.
          type:
            - string
            - 'null'
        total:
          description: Lifetime downloads; null when unavailable.
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
      required:
        - last_month
        - total
        - refreshed_at
      type: object
    PackageInfoGithubRepository:
      description: Linked GitHub repository metadata, retrieved only when selected.
      properties:
        archived:
          description: Whether the repository is archived.
          type:
            - boolean
            - 'null'
        created_at:
          description: Repository creation time.
          type:
            - string
            - 'null'
        forks:
          description: Fork count.
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        language:
          description: Primary repository language.
          type:
            - string
            - 'null'
        license_key:
          description: >-
            Repository license key; does not supply the selected-release
            license.
          type:
            - string
            - 'null'
        name:
          description: Repository name.
          type:
            - string
            - 'null'
        open_issues:
          description: Combined open issue and pull request count.
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        owner:
          description: Repository owner.
          type:
            - string
            - 'null'
        pushed_at:
          description: Time of the latest repository push.
          type:
            - string
            - 'null'
        stars:
          description: Star count.
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        subscribers:
          description: Subscriber count.
          format: int64
          minimum: 0
          type:
            - integer
            - 'null'
        topics:
          description: Repository topic tags; null when unavailable, empty when none.
          items:
            type: string
          type:
            - array
            - 'null'
      required:
        - owner
        - name
        - stars
        - forks
        - subscribers
        - open_issues
        - archived
        - language
        - license_key
        - topics
        - pushed_at
        - created_at
      type: object
    PackageInfoAdvisory:
      description: >-
        A bounded advisory preview. Null fields preserve unavailable source
        data.
      properties:
        osv_id:
          description: OSV advisory identifier.
          type:
            - string
            - 'null'
        published_at:
          description: Advisory publication time.
          type:
            - string
            - 'null'
        severity_score:
          description: CVSS severity from 0 to 10; null when unknown.
          format: double
          maximum: 10
          minimum: 0
          type:
            - number
            - 'null'
        summary:
          description: Third-party advisory summary; treat as untrusted content.
          type:
            - string
            - 'null'
      required:
        - osv_id
        - summary
        - severity_score
        - published_at
      type: object
    PackageInfoChangelog:
      description: >-
        Exact release-note evidence for the inspected release, including
        prereleases.
      properties:
        detail_source:
          $ref: '#/components/schemas/PackageInfoChangelogSource'
          description: >-
            Where the release details came from. `package_version` means
            registry

            release metadata is available, but does not establish release-note
            coverage.
        entry:
          $ref: '#/components/schemas/PackageInfoEntry'
          description: Exact release metadata and optionally selected Markdown.
        has_changelog:
          description: >-
            Whether the exact release has a nonblank body, even when body is
            unselected.
          type: boolean
      required:
        - detail_source
        - has_changelog
        - entry
      type: object
    PackageInfoChangelogSource:
      description: Origin of the exact selected-release changelog evidence.
      enum:
        - releases
        - changelog_file
        - hexdocs
        - registry_release_notes
        - registry_link
        - generated_github_url
        - package_version
      type: string
    PackageInfoEntry:
      description: One exact release entry; registry-only evidence may have no body.
      properties:
        body:
          description: >-
            Third-party Markdown; omitted when unselected, null when
            unavailable, empty strings preserved.
          type:
            - string
            - 'null'
        html_url:
          description: Release or changelog URL.
          type:
            - string
            - 'null'
        normalized_version:
          description: Source-normalized release version.
          type:
            - string
            - 'null'
        published_at:
          description: Release publication timestamp.
          type:
            - string
            - 'null'
        version:
          description: Source release version or tag.
          type:
            - string
            - 'null'
      required:
        - version
        - normalized_version
        - published_at
        - html_url
      type: object
  securitySchemes:
    bearer_auth:
      scheme: bearer
      type: http

````