May 14, 2026 · 9 min read · Use cases
Corrected 14 November 2026: the earlier version showed fields the API does not return (a slug, a narrative, a list of airports, a sentiment trend) and a page size it does not allow. The calls and fields below are the real ones.
Generating 10,000 destination pages from one API.
Programmatic SEO for travel works when the underlying data is real. It fails when it's GPT slop. Here's the pattern: pull cities by score, fetch typed context per city, render at build time, and skip the LLM-generated paragraphs.
The build pipeline
The mental model is three API calls per page, executed at build time. No runtime LLM, no hallucination surface, no per-request cost.
// Step 1. Get the list of cities to render, 200 per page (offset up to 10,000)
GET /v1/cities?iso_alpha2=IN&min_score=50&limit=200&offset=0
→ [..., { id: "714bddd6-7ffa-4081-9449-0bff4f521451", name: "Agra", master_score: "69.38", tier: "Top", ... }, ...]
// Step 2. For each city, fetch its context
GET /v1/cities/714bddd6-7ffa-4081-9449-0bff4f521451/context
→ { city_id, name, admin, airport, tourism_circuits[], heritage_monuments_nearby[], ... }
// Step 3. And its narrative sections
GET /v1/narratives/714bddd6-7ffa-4081-9449-0bff4f521451
→ [{ section, content, word_count, source, license, ... }, ...]
The narrative is the part most teams overlook.
/v1/narratives/{city_id} returns written destination
sections, one row per section, each with its licence tag. Some are
Wikipedia or Wikivoyage extracts under CC BY-SA: credit them, or
leave them out (see the licence page). You
don't need to write or generate filler text to fill the page.
Static site generator integration
The pattern below is Next.js, but the shape is the same in Astro, Hugo, Eleventy, or your own pipeline.
// app/destinations/[slug]/page.tsx
export async function generateStaticParams() {
const r = await tmai("/v1/cities?iso_alpha2=IN&min_score=50&limit=200");
return r.map(c => ({ id: c.id }));
}
export default async function Page({ params }) {
const ctx = await tmai(`/v1/cities/${params.id}/context`);
const sections = await tmai(`/v1/narratives/${params.id}`);
const overview = sections.find(s => s.section === "overview");
return (
<article>
<h1>{ctx.name}, {ctx.admin.state_name}</h1>
{overview && <p>{overview.content}</p>}
<h2>Heritage</h2>
<ul>{ctx.heritage_monuments_nearby.map((h, i) => <li key={i}>{h.name}</li>)}</ul>
{ctx.airport && (
<p>Nearest airport: {ctx.airport.name} ({ctx.airport.iata}).</p>
)}
{ctx.tourism_circuits.length > 0 && (
<p>On the {ctx.tourism_circuits[0].name}, stop {ctx.tourism_circuits[0].sequence_no}.</p>
)}
</article>
);
}
The schema you write against
The shape of /v1/cities/{id}/context is stable across
countries. Build your template once and it works for every city
in coverage:
city_id,name,iso_alpha2and the city's licence tagadmin— state code and name, district, regionairport— IATA, name and distance_km of the nearest airport, or null where we hold nonetourism_circuits[]— named tourism circuits the city is on, with itssequence_noheritage_monuments_nearby[]— the ASI monument records attached to the city itself (India only), each with category, distance_km and licence tag. Agra, for example, has two records, both for Agra Fort (one as a World Heritage Site, one as a Monument of National Importance)inventory_counts— the places, hotels and restaurants the list routes serve for the citysentiment[]— on paid plans only; empty on the free trial
Coordinates are on the /v1/cities rows (latitude,
longitude), and the narrative sections come from
/v1/narratives/{city_id}.
Why not just generate the prose with an LLM?
Three reasons. First, Google has been measurably down-weighting pure LLM-generated filler since the 2024 helpful-content updates. Pages that look like every other AI travel page rank like every other AI travel page. Second, a model writing about second-tier Indian cities without grounding gets facts wrong, and you publish them. Third, the marginal cost of LLM tokens × 10,000 pages is non-trivial; pulling pre-written, license-tagged narrative is one HTTP call.
Indexability and freshness
Set up a weekly rebuild that re-pulls
/v1/cities/{id}/context for the top 2,000 cities by
master_score, and a monthly rebuild for the long tail. Changes in
our data reach your pages at the next rebuild. Your sitemap stays accurate; pages that lose
freshness stop ranking.
Schema markup, for free
Because every field is structured, your TouristAttraction
and Place JSON-LD writes itself. Pull lat/lon out of
the /v1/cities row, names out of
heritage_monuments_nearby[], and you
get rich-result-eligible markup without a manual review step.
Worked example: 13,754 Indian city pages
Filter on India with a min_score that leaves the pages
worth shipping (Agra's master_score is 69.38). Ship them as a typed sub-section of your domain,
cross-link by circuit and by state, and let the long tail
accumulate. Three months in, head terms still go to Wikipedia, but
the long tail — "things to do in Jodhpur near Mehrangarh," "ASI
monuments in Hampi" — starts converting.
Free trial: 5,000 data calls, once. No card. That is enough to prototype a full state. Growth at $249/mo is comfortable for a 10,000-page build with weekly refreshes.