Trek Bikes APItrekbikes.com ↗
Access Trek Bikes product catalog, specs, customer reviews, and store locator via 6 API endpoints. Search models, browse categories, and find nearby dealers.
What is the Trek Bikes API?
The Trek Bikes API provides 6 endpoints covering Trek's full bike catalog, dealer locator, and customer reviews. Use list_bikes_by_category to paginate through hundreds of models in categories like Electric, Mountain, and Gravel, each returning price, stock status, and image data. Other endpoints handle keyword search, detailed specs, proximity-based shop lookup, and PowerReviews-sourced customer ratings — all in structured JSON.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/2e90137f-b0a8-40af-829c-8882d4701140/get_bike_categories' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace trekbikes-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Trek Bikes API — search bikes, browse categories, get details, find shops."""
from parse_apis.trek_bikes_api import TrekBikes, Sort, BikeNotFound
client = TrekBikes()
# Search for bikes by keyword — limit caps total items fetched.
for bike in client.bikes.search(query="Madone", limit=3):
print(bike.name, bike.formatted_price)
# Drill into a single search result for full specs and stock status.
bike = client.bikes.search(query="Domane", limit=1).first()
if bike:
detail = bike.details()
print(detail.name, detail.stock_status, detail.formatted_price)
# Browse categories and list bikes in a category with sorting.
for cat_bike in client.categorybikes.list(category_code="B338", sort=Sort.PRICE_ASC, limit=3):
print(cat_bike.name, cat_bike.formatted_price, cat_bike.currency)
# Find nearby Trek-authorized shops.
for store in client.stores.find_nearby(latitude="40.7128", longitude="-74.0060", radius=50, limit=3):
print(store.display_name, store.formatted_distance)
# Browse all bike categories to discover subcategory codes.
category = client.categories.list(limit=1).first()
if category:
for sub in category.subcategories:
print(sub.name, sub.category_code)
# Typed error handling — catch BikeNotFound on a bad product drill-down.
try:
detail = bike.details()
print(detail.name)
except BikeNotFound as exc:
print(f"Not found: {exc.product_id}")
print("exercised: bikes.search / bike.details / categorybikes.list / stores.find_nearby / categories.list")
Retrieve the complete category tree for bikes including Electric, Mountain, Road, Gravel, City, and Kids sections. Each category includes subcategories with optional category codes for use in list_bikes_by_category. Returns all sections in a single call with no parameters.
No input parameters required.
{
"type": "object",
"fields": {
"categories": "array of category objects with section, name, uid, url, and subcategories"
},
"sample": {
"data": {
"categories": [
{
"uid": "Tier2Node_b2cElectricMTB",
"url": "/bikes/mountain-bikes/electric-mountain-bikes/c/B512/",
"name": "Tier2Node_b2cElectricMTB",
"section": "Electric",
"subcategories": [
{
"uid": "Tier3Link_b2cElectricMTBFullSuspPowerflyPlusFS",
"url": "/bikes/mountain-bikes/electric-mountain-bikes/powerfly/powerfly-full-suspension/c/B338/",
"name": "Powerfly+ FS",
"category_code": "B338"
}
]
}
]
},
"status": "success"
}
}About the Trek Bikes API
Catalog Browsing and Search
get_bike_categories returns the complete category tree — sections like Electric, Mountain, Road, Gravel, City, and Kids — including nested subcategories with uid, name, and url fields. Each subcategory carries a category code (e.g. B213-2, B338) that feeds directly into list_bikes_by_category. That endpoint accepts a category_code, an optional 0-based page integer, page_size, and a sort parameter. Its response includes a products array (each with code, name, formattedPrice, currency, and image) and a pagination object showing totalResults and totalPages. For ad-hoc lookup, search_bikes accepts a free-text query and returns matching products plus an array of suggestions strings for autocomplete-style interfaces.
Product Details and Reviews
get_bike_details accepts a product_id from any product listing and returns a richer object: description, stockStatus, specs, and a isBike boolean alongside the standard price and URL fields. get_bike_reviews takes the same product_id and returns PowerReviews data — a results array where each entry contains a page_id and a reviews list, plus a configuration object with display localizations and feature flags. Review content and ratings are available without separate authentication.
Store Locator
find_bike_shops accepts latitude, longitude, and an optional radius in miles, returning up to 15 Trek-authorized stores sorted by proximity. The stores response object includes each location's address, hours, and distance, along with pagination metadata and the source coordinates used for the query. This makes it straightforward to build dealer-finder features tied to any geolocation input.
The Trek Bikes API is a managed, monitored endpoint for trekbikes.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when trekbikes.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official trekbikes.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a bike comparison tool using
get_bike_detailsto surface specs and stock status side-by-side for multiple models. - Power a category browser with
get_bike_categoriesto render Trek's full navigation tree and link each node to paginatedlist_bikes_by_categoryresults. - Implement an autocomplete search bar using
search_bikesquery suggestions and returned product names. - Show nearest Trek dealers on a map by passing user coordinates to
find_bike_shopsand rendering the address and hours fields. - Aggregate customer sentiment for specific models by pulling
get_bike_reviewsresults and averaging rating data from the PowerReviews payload. - Sync Trek product inventory into an internal catalog by polling
list_bikes_by_categorypages and trackingstockStatuschanges fromget_bike_details.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Trek Bikes have an official public developer API?+
What does `get_bike_details` return beyond what the listing endpoints provide?+
get_bike_details returns a specs object with technical specifications, a description field with full model copy, a stockStatus value, and an isBike boolean — fields that are absent from the products array returned by list_bikes_by_category or search_bikes.How does pagination work in `list_bikes_by_category`?+
page parameter. The response pagination object returns currentPage, pageSize, totalPages, and totalResults, so you can calculate how many requests are needed to fetch a full category before making them.Does the API cover Trek accessories, components, or apparel — not just bikes?+
Is review data available for all bike models?+
product_id has PowerReviews data attached to it. Models with no customer reviews will return an empty reviews list. Aggregate rating summaries beyond individual review text are not broken out as separate fields in the current response shape. You can fork the API on Parse and revise it to extract and surface summary statistics if needed.