setlist.fm Cities API

Cities resolved by GeoNames geoId.

OpenAPI Specification

setlistfm-cities-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: setlist.fm REST Artists Cities API
  description: 'The setlist.fm REST API provides read-only access to the world''s largest crowd-sourced concert setlist database. Look up artists (by MusicBrainz MBID), setlists and their revision history, venues, cities, and countries, and run full-text search across each. All endpoints are HTTP GET and return either JSON (Accept: application/json) or XML (Accept: application/xml, the default). Every request must include a valid API key in the `x-api-key` header; keys are issued from the setlist.fm API settings page. The API is free for non-commercial use only - commercial use requires contacting setlist.fm. Localized text is available via the `Accept-Language` header (en, es, fr, de, pt, tr, it, pl).'
  version: '1.0'
  contact:
    name: setlist.fm
    url: https://api.setlist.fm/docs/1.0/index.html
  termsOfService: https://www.setlist.fm/help/terms
servers:
- url: https://api.setlist.fm/rest/1.0
  description: setlist.fm REST API v1.0
security:
- apiKeyAuth: []
tags:
- name: Cities
  description: Cities resolved by GeoNames geoId.
paths:
  /city/{geoId}:
    get:
      operationId: getCity
      tags:
      - Cities
      summary: Get a city
      description: Returns a city for a given GeoNames geoId. Most city data originates from Geonames.org.
      parameters:
      - name: geoId
        in: path
        required: true
        description: The GeoNames geoId of the city.
        schema:
          type: string
      responses:
        '200':
          description: The requested city.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/City'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    Coords:
      type: object
      properties:
        lat:
          type: number
          format: double
        long:
          type: number
          format: double
    Country:
      type: object
      properties:
        code:
          type: string
          description: The ISO code of the country.
        name:
          type: string
    City:
      type: object
      properties:
        id:
          type: string
          description: The GeoNames geoId.
        name:
          type: string
        stateCode:
          type: string
        state:
          type: string
        coords:
          $ref: '#/components/schemas/Coords'
        country:
          $ref: '#/components/schemas/Country'
    Error:
      type: object
      properties:
        code:
          type: integer
        status:
          type: string
        message:
          type: string
        timestamp:
          type: string
  responses:
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key issued from https://www.setlist.fm/settings/api. Passed in the `x-api-key` request header on every call.