# List public flight history with local airport times and evidence, including bookings



Operation: listFlights
GET /api/flights.json

Access: anonymous. Automatic retries: none. Redirects: manual. Request body limit: 0 bytes.
Default timeout: 30 seconds. Response limit: 16 MiB. Pagination is opt-in and bounded; an exhausted bound reports incomplete execution.

[HTML reference](/developers/api/listFlights) · [Authoritative schemas](/api/openapi.json)

## Wire contract

```json
{
  "operationId": "listFlights",
  "summary": "List public flight history with local airport times and evidence, including bookings",
  "tags": [
    "Flights"
  ],
  "responses": {
    "200": {
      "description": "Flight history, newest departure first",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "flights": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string"
                    },
                    "flight": {
                      "type": "string"
                    },
                    "origin": {
                      "type": "string"
                    },
                    "destination": {
                      "type": "string"
                    },
                    "via": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "departs": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "arrives": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "arrivalNote": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "evidence": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "date",
                    "flight",
                    "origin",
                    "destination",
                    "via",
                    "departs",
                    "arrives",
                    "arrivalNote",
                    "evidence"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "flights"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "503": {
      "description": "Flight history unavailable",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/ProblemDetails"
          }
        }
      },
      "headers": {
        "Problem-Details": {
          "description": "draft-nottingham-problem-header-00 Structured Fields Dictionary. Carries type and Display String title; JSON problem content wins conflicts. Occurrence detail and instance remain in content.",
          "schema": {
            "type": "string",
            "maxLength": 4096
          }
        }
      }
    }
  }
}
```

## Synthetic examples

### curl

```bash
curl --fail-with-body --max-time 30 --max-filesize 16777216 --request GET 'https://irvinebroque.com/api/flights.json' --header 'Accept: application/json'
```

### TypeScript

```typescript
import { PublicApi } from '@irvinebroque/public-api';
const api = new PublicApi();
const result = await api.flights.list({});
console.log(result.status, result.headers.get('content-type')); // Keep transient capabilities in memory.
```

### CLI

```bash
irvinebroque flights list
```
