openapi: 3.1.0
info:
  title: 'Laravel API Documentation'
  description: 'Open Brewery DB is a free dataset and API with public information on breweries, cideries, brewpubs, and bottleshops'
  version: 1.0.0
servers:
  -
    url: 'https://api.openbrewerydb.org'
tags:
  -
    name: Endpoints
    description: ''
paths:
  /v1/breweries:
    get:
      summary: 'List breweries.'
      operationId: listBreweries
      description: 'Returns a paginated list of breweries based on optional filters and sorting.'
      parameters: []
      responses:
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    examples:
                      - 'The by city field must be at least 3 characters. (and 8 more errors)'
                  errors:
                    type: object
                    properties:
                      by_city:
                        type: array
                        items:
                          type: string
                        examples:
                          -
                            - 'The by city field must be at least 3 characters.'
                      by_country:
                        type: array
                        items:
                          type: string
                        examples:
                          -
                            - 'The by country field must be at least 3 characters.'
                      by_dist:
                        type: array
                        items:
                          type: string
                        examples:
                          -
                            - 'The by dist must be a valid coordinate pair (latitude,longitude).'
                      by_ids:
                        type: array
                        items:
                          type: string
                        examples:
                          -
                            - 'The by ids field must be at least 3 characters.'
                      by_name:
                        type: array
                        items:
                          type: string
                        examples:
                          -
                            - 'The by name field must be at least 3 characters.'
                      by_postal:
                        type: array
                        items:
                          type: string
                        examples:
                          -
                            - 'The by postal field must be at least 3 characters.'
                      by_state:
                        type: array
                        items:
                          type: string
                        examples:
                          -
                            - 'The by state field must be at least 3 characters.'
                      by_type:
                        type: array
                        items:
                          type: string
                        examples:
                          -
                            - 'The by_type contains invalid brewery type: architecto'
                      exclude_types:
                        type: array
                        items:
                          type: string
                        examples:
                          -
                            - 'The exclude_types contains invalid brewery type: architecto'
                examples:
                  -
                    message: 'The by city field must be at least 3 characters. (and 8 more errors)'
                    errors:
                      by_city:
                        - 'The by city field must be at least 3 characters.'
                      by_country:
                        - 'The by country field must be at least 3 characters.'
                      by_dist:
                        - 'The by dist must be a valid coordinate pair (latitude,longitude).'
                      by_ids:
                        - 'The by ids field must be at least 3 characters.'
                      by_name:
                        - 'The by name field must be at least 3 characters.'
                      by_postal:
                        - 'The by postal field must be at least 3 characters.'
                      by_state:
                        - 'The by state field must be at least 3 characters.'
                      by_type:
                        - 'The by_type contains invalid brewery type: architecto'
                      exclude_types:
                        - 'The exclude_types contains invalid brewery type: architecto'
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                per_page:
                  type: integer
                  description: 'Must be at least 1. Must not be greater than 200.'
                  examples:
                    - 1
                page:
                  type: integer
                  description: 'Must be at least 1.'
                  examples:
                    - 22
                sort:
                  type: string
                  description: ''
                  examples:
                    - architecto
                by_city:
                  type: string
                  description: 'Must be at least 3 characters. Must not be greater than 255 characters.'
                  examples:
                    - 'n'
                by_country:
                  type: string
                  description: 'Must be at least 3 characters. Must not be greater than 255 characters.'
                  examples:
                    - g
                by_dist:
                  type: string
                  description: ''
                  examples:
                    - architecto
                by_dist_radius:
                  type: number
                  description: 'Must be at least 0.1. Must not be greater than 10000.'
                  examples:
                    - 22
                by_dist_unit:
                  type: string
                  description: ''
                  enum:
                    - km
                    - mi
                  examples:
                    - mi
                by_ids:
                  type: string
                  description: 'Must be at least 3 characters. Must not be greater than 255 characters.'
                  examples:
                    - g
                by_name:
                  type: string
                  description: 'Must be at least 3 characters. Must not be greater than 255 characters.'
                  examples:
                    - z
                by_postal:
                  type: string
                  description: 'Must be at least 3 characters. Must not be greater than 255 characters.'
                  examples:
                    - m
                by_state:
                  type: string
                  description: 'Must be at least 3 characters. Must not be greater than 255 characters.'
                  examples:
                    - i
                by_type:
                  type: string
                  description: ''
                  examples:
                    - architecto
                exclude_types:
                  type: string
                  description: ''
                  examples:
                    - architecto
      security: []
  /v1/breweries/meta:
    get:
      summary: 'Get metadata about the brewery'
      operationId: getMetadataAboutTheBrewery
      description: 'Takes the same filters as List Breweries.'
      parameters: []
      responses:
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    examples:
                      - 'The by city field must be at least 3 characters. (and 8 more errors)'
                  errors:
                    type: object
                    properties:
                      by_city:
                        type: array
                        items:
                          type: string
                        examples:
                          -
                            - 'The by city field must be at least 3 characters.'
                      by_country:
                        type: array
                        items:
                          type: string
                        examples:
                          -
                            - 'The by country field must be at least 3 characters.'
                      by_dist:
                        type: array
                        items:
                          type: string
                        examples:
                          -
                            - 'The by dist must be a valid coordinate pair (latitude,longitude).'
                      by_ids:
                        type: array
                        items:
                          type: string
                        examples:
                          -
                            - 'The by ids field must be at least 3 characters.'
                      by_name:
                        type: array
                        items:
                          type: string
                        examples:
                          -
                            - 'The by name field must be at least 3 characters.'
                      by_postal:
                        type: array
                        items:
                          type: string
                        examples:
                          -
                            - 'The by postal field must be at least 3 characters.'
                      by_state:
                        type: array
                        items:
                          type: string
                        examples:
                          -
                            - 'The by state field must be at least 3 characters.'
                      by_type:
                        type: array
                        items:
                          type: string
                        examples:
                          -
                            - 'The by_type contains invalid brewery type: architecto'
                      exclude_types:
                        type: array
                        items:
                          type: string
                        examples:
                          -
                            - 'The exclude_types contains invalid brewery type: architecto'
                examples:
                  -
                    message: 'The by city field must be at least 3 characters. (and 8 more errors)'
                    errors:
                      by_city:
                        - 'The by city field must be at least 3 characters.'
                      by_country:
                        - 'The by country field must be at least 3 characters.'
                      by_dist:
                        - 'The by dist must be a valid coordinate pair (latitude,longitude).'
                      by_ids:
                        - 'The by ids field must be at least 3 characters.'
                      by_name:
                        - 'The by name field must be at least 3 characters.'
                      by_postal:
                        - 'The by postal field must be at least 3 characters.'
                      by_state:
                        - 'The by state field must be at least 3 characters.'
                      by_type:
                        - 'The by_type contains invalid brewery type: architecto'
                      exclude_types:
                        - 'The exclude_types contains invalid brewery type: architecto'
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                per_page:
                  type: integer
                  description: 'Must be at least 1. Must not be greater than 200.'
                  examples:
                    - 1
                page:
                  type: integer
                  description: 'Must be at least 1.'
                  examples:
                    - 22
                sort:
                  type: string
                  description: ''
                  examples:
                    - architecto
                by_city:
                  type: string
                  description: 'Must be at least 3 characters. Must not be greater than 255 characters.'
                  examples:
                    - 'n'
                by_country:
                  type: string
                  description: 'Must be at least 3 characters. Must not be greater than 255 characters.'
                  examples:
                    - g
                by_dist:
                  type: string
                  description: ''
                  examples:
                    - architecto
                by_dist_radius:
                  type: number
                  description: 'Must be at least 0.1. Must not be greater than 10000.'
                  examples:
                    - 22
                by_dist_unit:
                  type: string
                  description: ''
                  enum:
                    - km
                    - mi
                  examples:
                    - km
                by_ids:
                  type: string
                  description: 'Must be at least 3 characters. Must not be greater than 255 characters.'
                  examples:
                    - g
                by_name:
                  type: string
                  description: 'Must be at least 3 characters. Must not be greater than 255 characters.'
                  examples:
                    - z
                by_postal:
                  type: string
                  description: 'Must be at least 3 characters. Must not be greater than 255 characters.'
                  examples:
                    - m
                by_state:
                  type: string
                  description: 'Must be at least 3 characters. Must not be greater than 255 characters.'
                  examples:
                    - i
                by_type:
                  type: string
                  description: ''
                  examples:
                    - architecto
                exclude_types:
                  type: string
                  description: ''
                  examples:
                    - architecto
      security: []
  /v1/breweries/random:
    get:
      summary: 'Get a random brewery.'
      operationId: getARandomBrewery
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      examples:
                        - 99526c72-24a9-4027-bad0-a1e42218b60a
                    name:
                      type: string
                      examples:
                        - 'Side By Each Brewing Co'
                    brewery_type:
                      type: string
                      examples:
                        - planning
                    address_1:
                      type:
                        - string
                        - 'null'
                      examples:
                        - null
                    address_2:
                      type:
                        - string
                        - 'null'
                      examples:
                        - null
                    address_3:
                      type:
                        - string
                        - 'null'
                      examples:
                        - null
                    city:
                      type: string
                      examples:
                        - Auburn
                    state_province:
                      type: string
                      examples:
                        - Maine
                    postal_code:
                      type: string
                      examples:
                        - 04210-3739
                    country:
                      type: string
                      examples:
                        - 'United States'
                    longitude:
                      type:
                        - string
                        - 'null'
                      examples:
                        - null
                    latitude:
                      type:
                        - string
                        - 'null'
                      examples:
                        - null
                    phone:
                      type: string
                      examples:
                        - '2073479920'
                    website_url:
                      type:
                        - string
                        - 'null'
                      examples:
                        - null
                    state:
                      type: string
                      examples:
                        - Maine
                    street:
                      type:
                        - string
                        - 'null'
                      examples:
                        - null
                examples:
                  -
                    -
                      id: 99526c72-24a9-4027-bad0-a1e42218b60a
                      name: 'Side By Each Brewing Co'
                      brewery_type: planning
                      address_1: null
                      address_2: null
                      address_3: null
                      city: Auburn
                      state_province: Maine
                      postal_code: 04210-3739
                      country: 'United States'
                      longitude: null
                      latitude: null
                      phone: '2073479920'
                      website_url: null
                      state: Maine
                      street: null
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                size:
                  type: integer
                  description: 'Must be at least 1. Must not be greater than 50.'
                  examples:
                    - 1
      security: []
  /v1/breweries/search:
    get:
      summary: 'Search for breweries.'
      operationId: searchForBreweries
      description: 'The search performs partial, case-insensitive matching against brewery names.'
      parameters: []
      responses:
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    examples:
                      - 'The query field must be at least 3 characters.'
                  errors:
                    type: object
                    properties:
                      query:
                        type: array
                        items:
                          type: string
                        examples:
                          -
                            - 'The query field must be at least 3 characters.'
                examples:
                  -
                    message: 'The query field must be at least 3 characters.'
                    errors:
                      query:
                        - 'The query field must be at least 3 characters.'
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                per_page:
                  type: integer
                  description: 'Must be at least 1. Must not be greater than 200.'
                  examples:
                    - 1
                query:
                  type: string
                  description: 'Must be at least 3 characters. Must not be greater than 255 characters.'
                  examples:
                    - 'n'
              required:
                - query
      security: []
  '/v1/breweries/{id}':
    get:
      summary: 'Get a single brewery.'
      operationId: getASingleBrewery
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    examples:
                      - ae7b3174-8be8-4d53-a3a5-9b8240970eea
                  name:
                    type: string
                    examples:
                      - "'s"
                  brewery_type:
                    type: string
                    examples:
                      - brewpub
                  address_1:
                    type: string
                    examples:
                      - '1 Friesener Straße'
                  address_2:
                    type:
                      - string
                      - 'null'
                    examples:
                      - null
                  address_3:
                    type:
                      - string
                      - 'null'
                    examples:
                      - null
                  city:
                    type: string
                    examples:
                      - Kronach
                  state_province:
                    type: string
                    examples:
                      - Bayern
                  postal_code:
                    type: string
                    examples:
                      - '96317'
                  country:
                    type: string
                    examples:
                      - Germany
                  longitude:
                    type: number
                    examples:
                      - 11.327765
                  latitude:
                    type: number
                    examples:
                      - 50.241246
                  phone:
                    type: string
                    examples:
                      - '+49 9261 628000'
                  website_url:
                    type: string
                    examples:
                      - 'http://www.antla.de'
                  state:
                    type: string
                    examples:
                      - Bayern
                  street:
                    type: string
                    examples:
                      - '1 Friesener Straße'
                examples:
                  -
                    id: ae7b3174-8be8-4d53-a3a5-9b8240970eea
                    name: "'s"
                    brewery_type: brewpub
                    address_1: '1 Friesener Straße'
                    address_2: null
                    address_3: null
                    city: Kronach
                    state_province: Bayern
                    postal_code: '96317'
                    country: Germany
                    longitude: 11.327765
                    latitude: 50.241246
                    phone: '+49 9261 628000'
                    website_url: 'http://www.antla.de'
                    state: Bayern
                    street: '1 Friesener Straße'
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the brewery.'
        required: true
        schema:
          type: string
          examples:
            - ae7b3174-8be8-4d53-a3a5-9b8240970eea
