GovInfo Related API

Discover relationships between documents available on GovInfo

OpenAPI Specification

govinfo-related-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: GovInfo Collections Related API
  description: The GovInfo API provides services for developers and webmasters to access GovInfo content and metadata, including search, packages, granules, collections, related items, and published documents from the U.S. Government Publishing Office. Requires an api.data.gov API key.
  contact:
    name: Developer Hub
    url: https://github.com/usgpo/api
  license:
    name: License
    url: https://github.com/usgpo/api/blob/master/LICENSE.md
  version: '2.0'
servers:
- url: https://api.govinfo.gov
  description: GovInfo API production server
tags:
- name: Related
  description: Discover relationships between documents available on GovInfo
paths:
  /related/{accessId}:
    get:
      tags:
      - Related
      summary: Get a list of relationships for a given accessId
      operationId: relatedPackageDetails
      parameters:
      - name: accessId
        in: path
        description: The unique accessId (packageId or granuleId) for a given piece of GovInfo content
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      security:
      - apiKeyScheme: []
  /related/{accessId}/{collection}:
    get:
      tags:
      - Related
      summary: Get a list of relationships for a given accessId
      operationId: relatedVersionsDetails
      parameters:
      - name: accessId
        in: path
        description: The unique accessId (packageId or granuleId) for a given piece of GovInfo content
        required: true
        schema:
          type: string
      - name: collection
        in: path
        description: CollectionCode associated with a given relationshp - e.g. BILLS would display all related Bill Versions
        required: true
        schema:
          type: string
          enum:
          - BILLS
          - CPD
          - CPRT
          - CRPT
          - FR
          - HOB
          - PLAW
          - STATUTE
          - USCODE
          - CMR
      - name: granuleClass
        in: query
        required: false
        schema:
          type: string
      - name: subGranuleClass
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
      security:
      - apiKeyScheme: []
components:
  securitySchemes:
    apiKeyScheme:
      type: apiKey
      name: api_key
      in: query