Travel Risk API · Schema

TripRequest

TravelTravel RiskTravel AdvisoriesAviationAirportsRisk ScoringSafetyDisaster Alerts

Properties

Name Type Description
trip_id object
segments array
include_flight_status boolean
View JSON Schema on GitHub

JSON Schema

travel-risk-api-trip-request-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/travel-risk-api/main/json-schema/travel-risk-api-trip-request-schema.json",
  "title": "TripRequest",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/travel-risk-api-openapi.yml#/components/schemas/TripRequest",
  "properties": {
    "trip_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ],
      "title": "Trip Id"
    },
    "segments": {
      "items": {
        "$ref": "#/$defs/Segment"
      },
      "type": "array",
      "maxItems": 30,
      "minItems": 1,
      "title": "Segments"
    },
    "include_flight_status": {
      "type": "boolean",
      "title": "Include Flight Status",
      "default": true
    }
  },
  "type": "object",
  "required": [
    "segments"
  ],
  "$defs": {
    "Segment": {
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "flight",
            "stay"
          ],
          "title": "Type",
          "default": "flight"
        },
        "flight": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Flight",
          "description": "IATA flight number, e.g. UA1"
        },
        "from_airport": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "From Airport",
          "description": "Departure airport IATA code"
        },
        "to_airport": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "To Airport",
          "description": "Arrival airport IATA code"
        },
        "country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Country",
          "description": "Stay country: ISO 3166 alpha-3, alpha-2 or name"
        },
        "city": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "City"
        },
        "lat": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Lat"
        },
        "lon": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Lon"
        },
        "start": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Start",
          "description": "Departure or check-in time (ISO 8601)"
        },
        "end": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "End",
          "description": "Arrival or check-out time (ISO 8601)"
        }
      },
      "type": "object",
      "title": "Segment"
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/travel-risk-api-trip-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.