# Search flights (JSON body) (/api-reference/flights/search-with-a-body)

`POST https://api.voyagelabs.ai/v1/flights/search`

**Search a trip, with the fields in a JSON body**

Needs a key: `X-API-Key: vl_live_...` (or `vl_test_...`), or `Authorization: Bearer <key>`.

## Request body

- `application/json`: object (SearchBody)

## Responses

- `200`: The search, complete or partial.
- `400`: `invalid_parameter`: A field is missing, malformed or out of range. `param` names it. `invalid_body`: A POST body is not a JSON object, or is over 16 KB.
- `401`: `unauthenticated`: No key, or a key that is not known.
- `403`: `forbidden`: The key is switched off, may not use this route, or was used from outside its partner's listed networks, by the address our load balancer saw (never an address the caller wrote in X-Forwarded-For).
- `429`: `rate_limited`: This key is over its own limit.
- `500`: `internal_error`: A fault in the service. The detail is logged, never sent.
- `502`: `supplier_error`: The supplier failed.
- `503`: `search_capacity`: New searches are temporarily unavailable. Trips already in memory can still answer.
- `504`: `supplier_timeout`: The search did not finish in time: 45 seconds for the first supplier.