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

# Export municipality data as CSV

> Current municipalities with current officials and CSV export.



## OpenAPI

````yaml /openapi.json get /api/v1/municipalities/export/
openapi: 3.0.3
info:
  title: Firmium API
  version: v1
servers:
  - url: https://www.firmium.de/
security: []
tags:
  - name: v1
    description: Company and business data endpoints
paths:
  /api/v1/municipalities/export/:
    get:
      tags:
        - v1
      summary: Export municipality data as CSV
      description: Current municipalities with current officials and CSV export.
      operationId: municipalities_export_retrieve
      parameters:
        - in: query
          name: country_code
          schema:
            type: array
            items:
              type: string
          description: ISO 3166-1 alpha-2 country codes
          explode: true
          style: form
        - in: query
          name: country_code_exclude
          schema:
            type: array
            items:
              type: string
          description: Excluded ISO country codes
          explode: true
          style: form
        - in: query
          name: district
          schema:
            type: string
          description: District code or name
        - in: query
          name: official_code
          schema:
            type: array
            items:
              type: string
          description: One or more official municipality codes
          explode: true
          style: form
        - in: query
          name: official_role
          schema:
            type: string
            enum:
              - mayor
              - municipal_councillor
              - municipal_office_director
              - municipal_official
              - vice_mayor
          description: |-
            Current municipal role

            * `mayor` - Mayor
            * `vice_mayor` - Vice Mayor
            * `municipal_office_director` - Municipal Office Director
            * `municipal_councillor` - Municipal Councillor
            * `municipal_official` - Municipal Official
        - in: query
          name: q
          schema:
            type: string
          description: Search by official code, municipality, district, region or official
        - in: query
          name: state
          schema:
            type: string
          description: State or region code or name
        - in: query
          name: status
          schema:
            type: string
          description: National municipality type code
        - in: query
          name: uuid
          schema:
            type: array
            items:
              type: string
              format: uuid
          description: Municipality UUIDs
          explode: true
          style: form
      responses:
        '200':
          content:
            text/csv:
              schema:
                type: string
                format: binary
          description: ''
      security:
        - cookieAuth: []
        - SessionAuth: []
        - TokenAuth: []
components:
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: sessionid
    SessionAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Session authentication. Formats: Authorization: Session <sessionid> |
        Query: ?sessionid=<key> | Cookie: sessionid=<key>
    TokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Token authentication. Format: Token <key>'

````