Skip to content

Docs / All tools / Base tools

kiwi.book_flight

Search for and book flights on Kiwi.com.

40 credits. Per booking. 0 when cancelled.

Example prompt

Send this to your AI app when Heelo is connected:

Book a flight from NYC to London next Friday

Input fields

FieldTypeDescription
queryRequiredstringNatural-language flight booking request
historyarray of object
headlessboolean

Output fields

The fields in data when status is success.

FieldType
phasestring
answerstring
flightsarray of object
collectedobject
statusobject
questionobject

Code

The call with the input fields that the tool needs. Set HEELO_API_KEY to your API key.

import os
import requests

response = requests.post(
    "https://toolsprimitives.uk/v1/tools/kiwi.book_flight/invoke",
    headers={"Authorization": f"Bearer {os.environ['HEELO_API_KEY']}"},
    json={"input": {
        "query": "Book a flight from NYC to London next Friday",
    }},
    timeout=120,
)
response.raise_for_status()
print(response.json())