Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Piazzainfesta It Comuni API
version: 1.0.0
contact:
name: Richiedi una API key
url: https://piazzainfesta.it/contatti
description: 'Operations tagged Comuni across 2 of this provider''s published API definitions: openapi.json, piazzainfesta-it-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.piazzainfesta.it
security:
- ApiKey: []
tags:
- name: Comuni
paths:
/v1/comuni:
get:
summary: 'Lookup comuni: gli identificativi validi per il filtro comune'
parameters:
- name: regione
in: query
schema:
type: string
enum:
- Sicilia
- Piemonte
- Valle d'Aosta/Vallée d'Aoste
- Lombardia
- Liguria
- Trentino-Alto Adige/Südtirol
- Umbria
- Veneto
- Emilia-Romagna
- Toscana
- Friuli-Venezia Giulia
- Lazio
- Marche
- Campania
- Puglia
- Abruzzo
- Basilicata
- Calabria
- Molise
- Sardegna
responses:
'200':
description: I comuni delle regioni visibili alla chiave, anche senza eventi (eventi=0). Cache fino a 24 ore, vedi X-Cache
headers:
X-Cache:
description: HIT se la risposta arriva dalla cache del server, MISS se e' stata calcolata
schema:
type: string
enum:
- HIT
- MISS
ETag:
description: 'Impronta della risposta: rimandala in If-None-Match e se non e'' cambiato niente ricevi 304 senza corpo'
schema:
type: string
content:
application/json:
schema:
type: object
properties:
total:
type: integer
comuni:
type: array
items:
$ref: '#/components/schemas/Comune'
'304':
description: Non modificato dall'ETag che hai mandato in If-None-Match
'400':
description: Regione non valida
'401':
description: API key mancante o non valida
'403':
description: Regione o evento fuori dallo scope della chiave
'429':
description: Rate limit superato (120 req/min)
headers:
Retry-After:
description: Secondi da aspettare prima di riprovare
schema:
type: integer
X-RateLimit-Limit:
description: Richieste concesse al minuto
schema:
type: integer
X-RateLimit-Remaining:
description: Richieste ancora disponibili nella finestra
schema:
type: integer
X-RateLimit-Reset:
description: Quando riparte il conteggio, in secondi epoch
schema:
type: integer
tags:
- Comuni
operationId: getV1Comuni
x-operation-id-source: derived
servers:
- url: https://api.piazzainfesta.it
components:
schemas:
Comune:
type: object
properties:
comune:
type: string
description: 'Identificativo (slug): il valore da usare nel filtro comune di /v1/eventi'
example: genova
comune_nome:
type:
- string
- 'null'
example: Genova
provincia:
type:
- string
- 'null'
example: GE
regione:
type:
- string
- 'null'
example: Liguria
lat:
type:
- number
- 'null'
description: Centroide del comune
lon:
type:
- number
- 'null'
eventi:
type: integer
description: Numero di eventi pubblicati (0 se il comune non ne ha)
example: 42
securitySchemes:
ApiKey:
type: apiKey
in: header
name: X-Api-Key
x-refined-from:
- openapi.json
- piazzainfesta-it-openapi.json