AirportFYI Embed Widget
Free · Zero Dependencies · Shadow DOM

Embed AirportFYI
on Any Website

Add AirportFYI transport data widgets to your blog, app, or documentation with a single script tag. Shadow DOM isolation ensures zero CSS conflicts.

Airports

airports

Transport

Routes

142

Alliance

Star

Fleet

287

Powered by airportfyi.com ↗

Quick Start

Add the script tag and use the custom element — it just works.

① Add the script

HTML
<script src="https://cdn.jsdelivr.net/npm/airportfyi-embed@1/dist/embed.min.js"></script>

② Use the element

HTML
<data-airportfyi-entity
  slug="airports"
  theme="auto"
  style-variant="technical"
></data-airportfyi-entity>

That's it. The widget loads data from the AirportFYI API, renders in Shadow DOM, and adapts to the page's color scheme automatically.

Widget Options

All widgets share these data-* attributes.

Attribute Type Default Description
slug string required Entity identifier (e.g. JFK, united-airlines)
theme string "auto" Color theme: light · dark · sepia · auto
style-variant string "technical" Visual style: technical · modern
size string "default" Widget size: compact (280px) · default (420px) · large (720px)
lang string "en" Display language (ISO 639-1, e.g. ja, es)
limit number 5 Max results for list/search widgets
rich-snippet boolean false Inject FAQPage JSON-LD into host page (FAQ widgets only)
no-powered-by boolean false Hide the "Powered by airportfyi.com" backlink

Styles & Themes

2 visual styles × 4 color themes = 8 combinations.

light

Clean white background. Ideal for light-themed sites.

dark

Deep dark background. Matches dark-mode layouts.

sepia

Warm amber tone. Great for editorial content.

auto

Follows OS prefers-color-scheme with live updates.

technical

Structured data layout with clear hierarchy, specification tables, and monospace labels. Designed for aviation and railway technical data.

modern

Clean card-based layout with rounded corners and subtle shadows. Works well in content sites, travel blogs, and general-purpose embeds.

CDN Options

Three ways to load the widget bundle.

Recommended

jsDelivr

Global CDN, automatic versioning, 99.9% uptime SLA.

HTML
<script src="https://cdn.jsdelivr.net/npm/airportfyi-embed@1/dist/embed.min.js"></script>

npm + bundler

Import in your JS bundle (Vite, Webpack, Rollup).

SHELL
npm install airportfyi-embed
JS
import "airportfyi-embed";

Self-hosted (R2)

Download and host on your own CDN or R2 bucket.

HTML
<script src="/assets/airportfyi-embed.min.js"></script>

Download from GitHub Releases.

Transport FYI Family

AirportFYI is part of the Transport FYI family — aviation, rail, and flight data for developers.

Site Domain Focus npm Package
AirportFYI airportfyi.com 4,500+ airports, IATA/ICAO codes, runways, routes airportfyi-embed
AirlineFYI airlinefyi.com Airlines, fleets, alliances, global routes airlinefyi-embed
PlaneFYI planefyi.com Aircraft models, specs, manufacturers, seat maps planefyi-embed
TrainFYI trainfyi.com Railway stations, train routes, rail networks, amenities trainfyi-embed

FYIPedia Developer Ecosystem

AirportFYI Embed is part of FYIPedia — open-source data widgets across 6 domain families.

Family Sites Focus
Transport FYI ★ AirportFYI, AirlineFYI, PlaneFYI, TrainFYI Aviation, airlines, aircraft, railways
Creative FYI ColorFYI, FontFYI, EmojiFYI, SymbolFYI, UnicodeFYI Design tools, typography, characters
Geo FYI DistanceFYI, MountainFYI, QuakeFYI, ZipFYI Distance, geography, seismic, postal
Health FYI AnatomyFYI, PillFYI, DrugFYI, NutriFYI Anatomy, medications, nutrition
Network FYI CableFYI, IPFYI, StatusCodeFYI Internet infrastructure, IP, protocols
Nature FYI SpeciesFYI, BirdFYI, FishFYI, PlantFYI, DinoFYI Wildlife, species, paleontology