Architect of the Capitol Buildings API

The Buildings API from Architect of the Capitol — 2 operation(s) for buildings.

OpenAPI Specification

architect-of-the-capitol-buildings-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Architect of the Capitol Data Accessibility Buildings API
  description: API providing access to public information about Capitol campus buildings, art collections, historic preservation projects, and congressional facilities.
  version: 1.0.0
  contact:
    name: Architect of the Capitol
    url: https://www.aoc.gov/
servers:
- url: https://api.aoc.gov/v1
  description: Production
tags:
- name: Buildings
paths:
  /buildings:
    get:
      summary: List Capitol campus buildings
      operationId: listBuildings
      tags:
      - Buildings
      parameters:
      - name: type
        in: query
        schema:
          type: string
          enum:
          - capitol
          - house-office
          - senate-office
          - library-of-congress
          - supreme-court
          - other
      - name: limit
        in: query
        schema:
          type: integer
          default: 20
      - name: offset
        in: query
        schema:
          type: integer
          default: 0
      responses:
        '200':
          description: List of buildings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuildingList'
  /buildings/{buildingId}:
    get:
      summary: Get building details
      operationId: getBuilding
      tags:
      - Buildings
      parameters:
      - name: buildingId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Building details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Building'
        '404':
          description: Building not found
components:
  schemas:
    BuildingList:
      type: object
      properties:
        total:
          type: integer
        offset:
          type: integer
        limit:
          type: integer
        buildings:
          type: array
          items:
            $ref: '#/components/schemas/Building'
    Coordinates:
      type: object
      properties:
        latitude:
          type: number
        longitude:
          type: number
    Building:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        type:
          type: string
        yearBuilt:
          type: integer
        architect:
          type: string
        description:
          type: string
        address:
          type: string
        squareFootage:
          type: integer
        floors:
          type: integer
        historicDesignation:
          type: string
        visitingHours:
          type: string
        coordinates:
          $ref: '#/components/schemas/Coordinates'