import type { Metadata } from "next"; import Link from "next/link"; import { Breadcrumbs } from "@/components/entity/breadcrumbs"; import { SectionNav } from "@/components/entity/section-nav"; import { SourcesFooter } from "@/components/entity/sources-footer"; import { DatasetForm } from "@/components/intelligence/download/dataset-form"; import { ApiNote, HonestEmpty } from "@/components/intelligence/shared"; import { Badge } from "@/components/ui/badge"; import { Page, PageHeader, Section } from "@/components/ui/card"; import { EmptyState, OfflineNotice } from "@/components/ui/states"; import { api } from "@/lib/api"; import { fmtInt } from "@/lib/format"; import { routes } from "@/lib/routes"; import { pageMetadata } from "@/lib/seo"; export const revalidate = 120; export const metadata: Metadata = pageMetadata({ title: "Downloads", description: "Download the index as CSV, JSON or GeoJSON: facilities, projects, operators, events, cloud regions, internet exchanges, countries and markets — licence-gated, with attribution and excluded sources listed per dataset.", path: routes.download(), }); export default async function DownloadPage() { const r = await api.downloadDatasets(); const datasets = r.ok ? r.data : []; return ( {!r.ok && } {" "} API documentation {datasets.length === 0 ? ( ) : ( <> ({ id: d.key, label: d.label, count: d.rows }))} />
{datasets.map((d) => (
{fmtInt(d.rows)} rows {d.formats.map((f) => ( {f} ))}
} >
Licence

{d.license}

Attribution ({fmtInt(d.attribution.length)})
{d.attribution.length === 0 ? (

No attribution line recorded for this dataset’s sources — the source registry applies.

) : d.attribution.length <= 6 ? (
    {d.attribution.map((a) => (
  • {a}
  • ))}
) : (
Show all {fmtInt(d.attribution.length)} attribution lines
    {d.attribution.map((a) => (
  • {a}
  • ))}
)}
Excluded sources
{d.excludedSources.length === 0 ? (

None — every source behind this dataset allows redistribution with attribution.

) : (
    {d.excludedSources.map((s) => (
  • {s.name} — {s.reason}
  • ))}
)}
{d.filters.length === 0 && }
))} )}
); }