AeroModel

AeroModel

Documentation

Safe characters in URLs

The API expects URL-encoded query params. The following characters need explicit encoding:

CharacterEncodedUse case
#%23hex color (background=%23001a33)
(space)%20 or +airline / aircraft name in plain text
&%26name search containing &
?%3Fshould never appear in a value
=%3Dshould never appear in a value
/%2Fallowed but encode for safety
:%3Atolerated in backgroundGradient
,%2Ctolerated in backgroundGradient
+%2Bwhen not used to encode a space
Accented characters%xx%xx (UTF-8)airline name (e.g. aérienne)

Examples

Background color

# WRONG  — # is not transmitted to the API
?background=#001a33

# RIGHT
?background=%23001a33

Airline by name

# WRONG
?airline=Air France

# RIGHT
?airline=Air%20France
# or better: use the slug
?airline=air-france

Gradient

# WRONG  — bare #
?backgroundGradient=linear:90:#ff7e5f-0,#feb47b-1

# RIGHT
?backgroundGradient=linear:90:%23ff7e5f-0,%23feb47b-1

Helpers per language

LanguageFunction
JavaScript / TypeScriptencodeURIComponent(value) or URLSearchParams
Pythonurllib.parse.quote(value, safe="") or urlencode(params)
C#Uri.EscapeDataString(value) or HttpUtility.UrlEncode(value)
PowerShell[System.Uri]::EscapeDataString($value)
curl--data-urlencode with -G, or encode manually

Golden rule

Always use slugs (air-france, airbus-a320-200) rather than plain-text names. Slugs need no encoding and are stable over time.

If you really need to pass a name, go through a URLSearchParams (or equivalent) object — it does the encoding for you.

See also