Integration guides

Finding a ski resort

Search by name, narrow geographic scope and retain stable identifiers.

Use mountain search for user-entered text. Pass q, optionally add country/state/stateCode/region, and copy the returned id and slug. Search is limited to published resorts and returns at most 50 results.

const url = new URL('https://api.icecoast.us/api/v1/mountains/search');
url.searchParams.set('q', 'Killington');
url.searchParams.set('country', 'US');
url.searchParams.set('limit', '5');
const response = await fetch(url, {
  headers: { 'X-API-Key': process.env.ICECOAST_API_KEY },
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const { data } = await response.json();
console.log(data.map(({ id, name, slug }) => ({ id, name, slug })));

For a country directory or export-like traversal, use mountain list with countryCode=US&published=true, then paginate. Search does not expose offset pagination.

Resorts can have similar names across countries. Show state/country to users and store the returned UUID rather than matching only by name. Do not assume an empty result means a resort does not exist in the real world.

Use include=places for discovery suggestions when needed. Geographic suggestions are not separate mountain records. Once selected, retrieve resort information.