{"openapi":"3.1.0","info":{"title":"Piratefly Flight Price Verdict API","version":"1.0.0","description":"Is today's fare cheap? One endpoint compares the live cheapest fare on a route against that route's own observed price history and returns a verdict, the best months to fly and how far ahead to book. Never a bookable fare."},"servers":[{"url":"https://next.piratefly.com"}],"paths":{"/v1/analisi":{"get":{"summary":"Price verdict for a route","operationId":"getAnalisi","security":[{},{"ApiKeyAuth":[]}],"parameters":[{"name":"origine","in":"query","required":true,"schema":{"type":"string"},"example":"Stockholm","description":"Origin CITY name (not an IATA code)"},{"name":"destinazione","in":"query","required":true,"schema":{"type":"string"},"example":"Rome","description":"Destination CITY name (not an IATA code)"}],"responses":{"200":{"description":"Verdict against the route history","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Analisi"}}}},"404":{"description":"No live fare for that route"},"429":{"description":"Free tier cap: 30 requests/day per IP. Send an X-Api-Key to remove it."}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-Api-Key"}},"schemas":{"Analisi":{"type":"object","properties":{"origine":{"type":"string"},"destinazione":{"type":"string"},"valuta":{"type":"string","example":"EUR"},"verdetto":{"type":"object","properties":{"livello":{"type":"string","enum":["ottimo","buono","normale","caro","dati-insufficienti"]},"affidabilita":{"type":"string","enum":["alta","media","bassa"]},"percentile":{"type":"integer","description":"Where today's fare sits in this route's own history (0 = cheapest ever seen)"},"medianaCent":{"type":"integer"},"minimoCent":{"type":"integer"},"scartoMedianaCent":{"type":"integer"},"campione":{"type":"integer","description":"How many observed fares the verdict rests on"},"stagionale":{"type":"boolean"}}},"mesiPerConvenienza":{"type":"array","items":{"type":"object","properties":{"mese":{"type":"integer"},"medianaCent":{"type":"integer"},"campione":{"type":"integer"}}}},"anticipoConsigliato":{"type":"object","properties":{"daGiorni":{"type":"integer"},"aGiorni":{"type":"integer"},"medianaCent":{"type":"integer"},"campione":{"type":"integer"},"risparmioCent":{"type":["integer","null"]}}},"osservazioni":{"type":"integer"},"aggiornatoIl":{"type":"string","format":"date-time"}}}}}}