{"openapi":"3.1.0","info":{"title":"gpxlist API","version":"1.0.0","description":"Search and download open hiking tracks. Every call except POST /keys needs a free key in the X-API-Key header. Limits per key: 1,000 requests an hour, 300 GPX downloads an hour, 20 zip downloads a day. Shared tracks are public domain (CC0 1.0); tracks from OpenStreetMap are © OpenStreetMap contributors under the ODbL 1.0, so credit them when you show or share them."},"servers":[{"url":"https://gpxlist.com/api/v1"}],"security":[{"key":[]}],"components":{"securitySchemes":{"key":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"What went wrong and what to do."}}},"Point":{"type":"object","properties":{"lat":{"type":"number","description":"Latitude"},"lon":{"type":"number","description":"Longitude"}}},"TrackSummary":{"type":"object","properties":{"id":{"type":"string","description":"Track id"},"name":{"type":"string","description":"Trail name"},"place":{"type":"string","description":"Public land and state, if known"},"lengthM":{"type":"number","description":"Length in meters"},"gainM":{"type":"number","description":"Total climb in meters"},"shape":{"type":"string","description":"Shape","enum":["loop","out-and-back","one-way"]},"tripType":{"type":"string","description":"Trip type","enum":["day hike","overnight","multi-day trek"]},"difficulty":{"type":"string","description":"Difficulty","enum":["easy","moderate","hard","strenuous"]},"trailhead":{"$ref":"#/components/schemas/Point"},"distanceM":{"type":"number","description":"Distance from the searched point, in meters (lat/lon searches only)"},"url":{"type":"string","description":"Track page"},"gpx":{"type":"string","description":"GPX download URL"}}},"Area":{"type":"object","properties":{"slug":{"type":"string","description":"Area id"},"kind":{"type":"string","description":"Kind of area"},"name":{"type":"string","description":"Name"},"state":{"type":"string","description":"Two-letter state"},"tracks":{"type":"number","description":"Published tracks"}}}}},"paths":{"/keys":{"post":{"summary":"Get a free API key","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","description":"Your email address"},"purpose":{"type":"string","description":"What you will build (optional)"}}}}}},"responses":{"201":{"description":"The key. It is shown only once.","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Send it in the X-API-Key header"},"limits":{"type":"object"}}}}}},"400":{"description":"The email address is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many keys from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tracks":{"get":{"summary":"Search tracks","parameters":[{"name":"q","in":"query","required":false,"description":"Text in the trail name or in a place it passes through","schema":{"type":"string"}},{"name":"area","in":"query","required":false,"description":"Area id (slug), for example pachaug-state-forest-ct","schema":{"type":"string"}},{"name":"bbox","in":"query","required":false,"description":"west,south,east,north in degrees","schema":{"type":"string"}},{"name":"lat","in":"query","required":false,"description":"Latitude of a point to search around","schema":{"type":"number"}},{"name":"lon","in":"query","required":false,"description":"Longitude of that point","schema":{"type":"number"}},{"name":"mi","in":"query","required":false,"description":"Radius around lat/lon in miles, up to 50 (default 10)","schema":{"type":"number"}},{"name":"type","in":"query","required":false,"description":"Trip type","schema":{"type":"string","enum":["day hike","overnight","multi-day trek"]}},{"name":"difficulty","in":"query","required":false,"description":"Difficulty","schema":{"type":"string","enum":["easy","moderate","hard","strenuous"]}},{"name":"min","in":"query","required":false,"description":"Shortest length in miles","schema":{"type":"number"}},{"name":"max","in":"query","required":false,"description":"Longest length in miles","schema":{"type":"number"}},{"name":"climb","in":"query","required":false,"description":"Most climb in feet","schema":{"type":"number"}},{"name":"sort","in":"query","required":false,"description":"Order","schema":{"type":"string","enum":["name","length","newest","climb","distance"]}},{"name":"page","in":"query","required":false,"description":"Page, from 1","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Tracks per page, up to 100 (default 20)","schema":{"type":"integer"}}],"responses":{"200":{"description":"One page of tracks","content":{"application/json":{"schema":{"type":"object","properties":{"tracks":{"type":"array","items":{"$ref":"#/components/schemas/TrackSummary"}},"page":{"type":"number","description":"This page"},"limit":{"type":"number","description":"Tracks per page"},"next":{"type":"string","description":"URL of the next page, or null"}}}}}},"400":{"description":"A parameter is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No valid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Hourly limit used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tracks/{id}":{"get":{"summary":"One track: trail, place, facts, and the line with elevations","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"description":"geojson for a GeoJSON Feature","schema":{"type":"string","enum":["geojson"]}}],"responses":{"200":{"description":"The track. line is [[lon, lat, ele], ...]."},"404":{"description":"No such track.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/tracks/{id}.gpx":{"get":{"summary":"Download one track as GPX","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"GPX 1.1","content":{"application/gpx+xml":{}}},"404":{"description":"No such track.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"GPX limit used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/areas":{"get":{"summary":"Search areas: states, national and state forests, parks, wilderness, preserves, counties, towns","parameters":[{"name":"q","in":"query","required":false,"description":"Text in the name","schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"description":"Kind of area","schema":{"type":"string"}},{"name":"state","in":"query","required":false,"description":"Two-letter state","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page, from 1","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Areas per page, up to 100 (default 50)","schema":{"type":"integer"}}],"responses":{"200":{"description":"One page of areas","content":{"application/json":{"schema":{"type":"object","properties":{"areas":{"type":"array","items":{"$ref":"#/components/schemas/Area"}},"page":{"type":"number","description":"This page"},"limit":{"type":"number","description":"Areas per page"},"next":{"type":"string","description":"URL of the next page, or null"}}}}}}}}},"/areas/{slug}":{"get":{"summary":"One area, with its bounding box and links to its tracks","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The area"},"404":{"description":"No such area.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/areas/{slug}/tracks.zip":{"get":{"summary":"Download every track in an area as GPX files in one zip (up to 500)","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ZIP of GPX files","content":{"application/zip":{}}},"404":{"description":"No such area.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Daily zip limit used up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}