---
title: "FlightStats API: Search | Perceptlayer"
description: "Search from FlightStats as JSON. 1 credit per successful call."
url: https://perceptlayer.com/apis/flightstats/search
---

[APIs](https://perceptlayer.com/apis) / [FlightStats](https://perceptlayer.com/apis/flightstats) / Search

# FlightStats: Search

Search from FlightStats as JSON. 1 credit per successful call.

GET `/v1/flightstats/search`

## Parameters

Send parameters in the query string.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `query` | string | Required | Up to 60 characters |
| `type` | string | Required | airline, airport |

## Example request

FlightStats

GET /v1/flightstats/search?query=lufthansa&type=airline 

```
{
  "success": true,
  "data": {
    "query": "lufthansa",
    "type": "airline",
    "count": 4,
    "results": [
      {
        "code": "LH",
        "iata": "LH",
        "name": "Lufthansa"
      },
      {
        "code": "CL",
        "iata": "CL",
        "name": "Lufthansa CityLine"
      },
      {
        "code": "GEC",
        "iata": "GEC",
        "name": "Lufthansa Cargo"
      }
    ]
  },
  "meta": {
    "endpoint_family": "search",
    "request_id": "req_9bb228ec01cd4a8bb2b1aa93f6f43aa9",
    "credits_charged": 1,
    "credits_remaining": 974
  }
}
```

200 OK JSON X-Credits-Used: 1

Recorded from our API and shortened.

[Run this endpoint in the playground](https://perceptlayer.com/apis/flightstats?try=search#playground) with your own parameters. 1 credit per successful call; failed calls are free.

## Response fields

Each item in `data.results` has these 3 fields, read from a recorded call. The recording leaves out fields that were empty, so a live call can return more.

| Field | Type |
| --- | --- |
| `code` | string |
| `iata` | string |
| `name` | string |
