{"openapi":"3.0.3","info":{"title":"Texas Brew Loop API","description":"Public API for Texas Brew Loop - a craft brewery trip planning platform.\n\nThis API provides comprehensive data for planning brewery visits across Texas,\nincluding brewery information, curated loops (routes), events, and intelligent\ntrip planning recommendations.\n\n## Features\n\n- **Breweries**: Full brewery directory with attributes, hours, and locations\n- **Loops**: Curated multi-brewery routes with logistics and decision support\n- **Events**: Brewery events calendar with filtering\n- **Planning**: Weekend plans, custom trip planning, and nearby search\n- **Decision Support**: AI-assisted loop recommendations\n\n## Rate Limiting\n\nAll endpoints are rate limited to 100 requests per minute per IP address.\nRate limit headers are included in all responses:\n\n- `X-RateLimit-Limit`: Maximum requests per window\n- `X-RateLimit-Remaining`: Remaining requests in current window\n- `X-RateLimit-Reset`: Unix timestamp when window resets\n\nWhen rate limited, the API returns a 429 status with a `Retry-After` header.\n\n## Caching\n\n- Static data (breweries, loops): 1 hour cache\n- Time-sensitive data (events): 15 minute cache\n- Dynamic data (planning, decisions): No cache\n","version":"1.0.0","contact":{"name":"Texas Brew Loop","url":"https://texasbrewloop.com"},"license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"}},"servers":[{"url":"https://texasbrewloop.com/api/v1","description":"Production server"},{"url":"http://localhost:3000/api/v1","description":"Development server"}],"tags":[{"name":"Breweries","description":"Brewery information and discovery"},{"name":"Loops","description":"Curated multi-brewery routes"},{"name":"Events","description":"Brewery events calendar"},{"name":"Planning","description":"Trip planning endpoints"},{"name":"Decision Support","description":"AI-assisted recommendations"},{"name":"Intelligence","description":"Composite intelligence endpoints — weighted scoring, comparisons, and smart suggestions"}],"paths":{"/breweries":{"get":{"tags":["Breweries"],"summary":"List breweries","description":"Get a paginated list of breweries with optional filtering","operationId":"listBreweries","parameters":[{"name":"region","in":"query","description":"Filter by region (comma-separated)","schema":{"type":"string"}},{"name":"attributes","in":"query","description":"Filter by attributes (dog_friendly, rv_parking, kid_friendly)","schema":{"type":"string"}},{"name":"styles","in":"query","description":"Filter by beer styles (comma-separated)","schema":{"type":"string"}},{"name":"q","in":"query","description":"Search by name or city","schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number (default 1)","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","description":"Results per page (default 20, max 100)","schema":{"type":"integer","default":20,"maximum":100}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreweryListResponse"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/breweries/{slug}":{"get":{"tags":["Breweries"],"summary":"Get brewery details","description":"Get full details for a single brewery. Use _links in the response to discover sub-resources: nearby places, loops, and events.","operationId":"getBrewery","parameters":[{"name":"slug","in":"path","required":true,"description":"Brewery slug","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BreweryDetailResponse"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/breweries/{slug}/nearby":{"get":{"tags":["Breweries"],"summary":"Get nearby places","description":"Get nearby restaurants, hotels, campgrounds, RV parks, airports, and EV charging stations for a brewery","operationId":"getBreweryNearby","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"category","in":"query","description":"Filter to a single category","schema":{"type":"string","enum":["restaurant","hotel","campground","rv_park","airport","ev_charging","dog_park","state_park","bbq"]}},{"name":"limit","in":"query","description":"Max places per category (default 5, max 20)","schema":{"type":"integer","default":5,"maximum":20}},{"name":"max_distance","in":"query","description":"Max distance in miles","schema":{"type":"number"}}],"responses":{"200":{"description":"Nearby places grouped by category (or filtered to one category)"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/breweries/{slug}/loops":{"get":{"tags":["Breweries"],"summary":"Get brewery loops","description":"Get all loops that contain this brewery","operationId":"getBreweryLoops","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of loops containing this brewery"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/breweries/{slug}/events":{"get":{"tags":["Breweries"],"summary":"Get brewery events","description":"Get events for a specific brewery","operationId":"getBreweryEvents","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"upcoming","in":"query","description":"Filter to upcoming events only (default true)","schema":{"type":"boolean","default":true}},{"name":"limit","in":"query","description":"Max events to return (default 10, max 50)","schema":{"type":"integer","default":10,"maximum":50}}],"responses":{"200":{"description":"List of events for this brewery"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/loops":{"get":{"tags":["Loops"],"summary":"List loops","description":"Get all curated loops with optional filtering","operationId":"listLoops","parameters":[{"name":"type","in":"query","description":"Filter by type (flagship, segment, thematic)","schema":{"type":"string","enum":["flagship","segment","thematic"]}},{"name":"featured","in":"query","description":"Filter by featured status","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoopListResponse"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/loops/{slug}":{"get":{"tags":["Loops"],"summary":"Get loop details","description":"Get full details for a loop including ordered brewery stops","operationId":"getLoop","parameters":[{"name":"slug","in":"path","required":true,"description":"Loop slug","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoopDetailResponse"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/events":{"get":{"tags":["Events"],"summary":"List events","description":"Get events with filtering and pagination","operationId":"listEvents","parameters":[{"name":"start_date","in":"query","description":"Events on/after date (ISO 8601)","schema":{"type":"string","format":"date"}},{"name":"end_date","in":"query","description":"Events on/before date (ISO 8601)","schema":{"type":"string","format":"date"}},{"name":"type","in":"query","description":"Event type filter (comma-separated)","schema":{"type":"string"}},{"name":"region","in":"query","description":"Region filter","schema":{"type":"string"}},{"name":"brewery","in":"query","description":"Brewery slug filter","schema":{"type":"string"}},{"name":"this_weekend","in":"query","description":"Quick filter for Friday-Sunday","schema":{"type":"boolean"}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventListResponse"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/plan/weekend":{"get":{"tags":["Planning"],"summary":"Weekend planning data","description":"Get recommended loops and events for this weekend","operationId":"planWeekend","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeekendPlanResponse"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/plan":{"get":{"tags":["Planning"],"summary":"One-call trip planner","description":"Plan a brewery day with one API call. Pass a city and preferences, get back an ordered itinerary with stops, hours, nearby food, and EV charging.","operationId":"planTrip","parameters":[{"name":"city","in":"query","required":true,"schema":{"type":"string"},"description":"City name (e.g., Dallas, Austin) or region slug (e.g., dfw, hill-country)"},{"name":"date","in":"query","schema":{"type":"string","format":"date"},"description":"Target date (YYYY-MM-DD). Defaults to next Saturday."},{"name":"preferences","in":"query","schema":{"type":"string"},"description":"Comma-separated: dog_friendly, kid_friendly, ev_charging, food, outdoor_seating"},{"name":"hours","in":"query","schema":{"type":"integer","default":6},"description":"Trip duration in hours (max 12)"},{"name":"max_stops","in":"query","schema":{"type":"integer","default":4},"description":"Maximum brewery stops (max 8)"}],"responses":{"200":{"description":"Trip plan with ordered stops"}}}},"/plan/trip":{"get":{"tags":["Planning"],"summary":"Custom trip planning","description":"Get loop recommendations based on constraints","operationId":"planMultiCityTrip","parameters":[{"name":"duration","in":"query","description":"Trip duration","schema":{"type":"string","enum":["day","weekend","week"]}},{"name":"must_have","in":"query","description":"Required attributes (comma-separated)","schema":{"type":"string"}},{"name":"avoid","in":"query","description":"Attributes to avoid (comma-separated)","schema":{"type":"string"}},{"name":"max_daily_stops","in":"query","description":"Maximum breweries per day","schema":{"type":"integer","default":3}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TripPlanResponse"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/plan/nearby":{"get":{"tags":["Planning"],"summary":"Find nearby breweries","description":"Find breweries near a location","operationId":"planNearby","parameters":[{"name":"lat","in":"query","required":true,"description":"Latitude","schema":{"type":"number","format":"double"}},{"name":"lng","in":"query","required":true,"description":"Longitude","schema":{"type":"number","format":"double"}},{"name":"radius_miles","in":"query","description":"Search radius in miles (default 25, max 100)","schema":{"type":"number","default":25,"maximum":100}},{"name":"limit","in":"query","description":"Maximum results (default 10)","schema":{"type":"integer","default":10}},{"name":"attributes","in":"query","description":"Filter by attributes (comma-separated)","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NearbyResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/decide/loop":{"get":{"tags":["Decision Support"],"summary":"Loop recommendations","description":"Get AI-assisted loop recommendations based on context","operationId":"decideLoop","parameters":[{"name":"user_context","in":"query","description":"What the user is looking for (free text)","schema":{"type":"string"}},{"name":"duration","in":"query","description":"Available time","schema":{"type":"string","enum":["day","weekend","week"]}},{"name":"party_size","in":"query","description":"Group size","schema":{"type":"integer"}},{"name":"has_dog","in":"query","description":"Traveling with dog","schema":{"type":"boolean"}},{"name":"has_rv","in":"query","description":"Traveling in RV","schema":{"type":"boolean"}},{"name":"has_kids","in":"query","description":"Traveling with children","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoopDecisionResponse"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/recommend":{"get":{"tags":["Intelligence"],"summary":"Get weighted brewery recommendations","description":"Returns ranked brewery recommendations based on location and preferences. Unlike flat filters, this uses weighted scoring combining distance, attribute match, Google rating, and loop connectivity.","parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number"},"description":"Latitude"},{"name":"lng","in":"query","required":true,"schema":{"type":"number"},"description":"Longitude"},{"name":"radius","in":"query","schema":{"type":"number","default":15,"maximum":50},"description":"Search radius in miles"},{"name":"dogFriendly","in":"query","schema":{"type":"boolean"},"description":"Prefer dog-friendly breweries"},{"name":"kidFriendly","in":"query","schema":{"type":"boolean"},"description":"Prefer kid-friendly breweries"},{"name":"outdoorSeating","in":"query","schema":{"type":"boolean"},"description":"Prefer outdoor seating"},{"name":"liveMusic","in":"query","schema":{"type":"boolean"},"description":"Prefer live music"},{"name":"rvParking","in":"query","schema":{"type":"boolean"},"description":"Prefer RV parking"},{"name":"tours","in":"query","schema":{"type":"boolean"},"description":"Prefer brewery tours"},{"name":"food","in":"query","schema":{"type":"boolean"},"description":"Prefer food available"},{"name":"limit","in":"query","schema":{"type":"integer","default":10,"maximum":25},"description":"Max results"}],"responses":{"200":{"description":"Ranked brewery recommendations with scores and match reasons"}}}},"/compare":{"get":{"tags":["Intelligence"],"summary":"Compare breweries side-by-side","description":"Returns a side-by-side comparison of 2-5 breweries including attributes, hours, styles, distances between each, shared loops, and a 'best for' summary.","parameters":[{"name":"breweries","in":"query","required":true,"schema":{"type":"string"},"description":"Comma-separated brewery slugs (2-5)"}],"responses":{"200":{"description":"Side-by-side comparison with distances and shared loops"}}}},"/next":{"post":{"tags":["Intelligence"],"summary":"Suggest next breweries to visit","description":"Given breweries you have already visited, suggests the best next stops using loop adjacency, attribute similarity, and geographic clustering. Avoids recommending what you have already done.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["visited"],"properties":{"visited":{"type":"array","items":{"type":"string"},"description":"Slugs of breweries already visited"},"preferences":{"type":"object","description":"Optional attribute preferences"},"limit":{"type":"integer","default":5,"maximum":15,"description":"Max suggestions"}}}}}},"responses":{"200":{"description":"Ranked suggestions with reasons and shared loop data"}}}},"/open-now":{"get":{"tags":["Intelligence"],"summary":"Find breweries currently open","description":"Returns breweries currently open based on real hours data, sorted by distance from the given location.","parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number"},"description":"Latitude"},{"name":"lng","in":"query","required":true,"schema":{"type":"number"},"description":"Longitude"},{"name":"radius","in":"query","schema":{"type":"number","default":15,"maximum":50},"description":"Search radius in miles"},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":50},"description":"Max results"}],"responses":{"200":{"description":"Currently open breweries sorted by distance"}}}},"/loops/find":{"get":{"tags":["Intelligence"],"summary":"Find loops connecting specific breweries","description":"Given a list of brewery slugs, returns loops containing any of those breweries, ranked by how many of the requested breweries each loop includes.","parameters":[{"name":"breweries","in":"query","required":true,"schema":{"type":"string"},"description":"Comma-separated brewery slugs (max 10)"}],"responses":{"200":{"description":"Matching loops ranked by brewery match count"}}}}},"components":{"schemas":{"Meta":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"version":{"type":"string"},"request_id":{"type":"string"}},"required":["timestamp","version"]},"Pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"total_pages":{"type":"integer"}},"required":["page","limit","total","total_pages"]},"ResourceLinks":{"type":"object","properties":{"self":{"type":"string"}},"additionalProperties":{"type":"string"}},"ErrorDetail":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object"}},"required":["code","message"]},"Brewery":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string","nullable":true},"address":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"coordinates":{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"}}},"attributes":{"type":"object","properties":{"dog_friendly":{"type":"boolean","nullable":true},"kid_friendly":{"type":"boolean","nullable":true},"rv_parking":{"type":"boolean","nullable":true},"food_options":{"type":"string","nullable":true},"outdoor_seating":{"type":"boolean","nullable":true},"live_music":{"type":"boolean","nullable":true},"wheelchair_accessible":{"type":"boolean","nullable":true},"tours_available":{"type":"boolean","nullable":true},"reservation_required":{"type":"string","nullable":true}}},"styles":{"type":"array","items":{"type":"string"}},"flagship_beers":{"type":"array","items":{"type":"string"}},"hours":{"type":"object"},"contact":{"type":"object","properties":{"phone":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"instagram":{"type":"string","nullable":true}}},"trust":{"type":"object","properties":{"hours_confidence":{"type":"string","enum":["high","medium","low","unknown"]},"last_verified":{"type":"string","format":"date-time","nullable":true},"enrichment_status":{"type":"string"},"enriched_at":{"type":"string","format":"date-time","nullable":true},"claimed":{"type":"boolean"},"verified":{"type":"boolean"}}},"google_rating":{"type":"number","nullable":true},"google_ratings_count":{"type":"integer","nullable":true},"price_level":{"type":"integer","nullable":true},"partner_brewery":{"type":"boolean"},"_links":{"$ref":"#/components/schemas/ResourceLinks"}}},"BreweryListResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"breweries":{"type":"array","items":{"$ref":"#/components/schemas/Brewery"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"meta":{"$ref":"#/components/schemas/Meta"}}},"BreweryDetailResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"brewery":{"$ref":"#/components/schemas/Brewery"}}},"meta":{"$ref":"#/components/schemas/Meta"}}},"DecisionSurface":{"type":"object","properties":{"use_this_when":{"type":"array","items":{"type":"string"}},"not_for":{"type":"array","items":{"type":"string"}},"tradeoffs":{"type":"array","items":{"type":"string"}}}},"Loop":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"type":{"type":"string","enum":["flagship","segment","thematic"]},"description":{"type":"string"},"stop_count":{"type":"integer"},"total_distance_miles":{"type":"number"},"estimated_duration":{"type":"string"},"primary_region":{"type":"string"},"decision_surface":{"$ref":"#/components/schemas/DecisionSurface"},"_links":{"$ref":"#/components/schemas/ResourceLinks"}}},"LoopBrewery":{"type":"object","properties":{"position":{"type":"integer"},"isAnchor":{"type":"boolean"},"notes":{"type":"string","nullable":true},"brewery":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"location":{"type":"object","properties":{"city":{"type":"string"},"region":{"type":"string"},"coordinates":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"}}}}}}},"distance_to_next_miles":{"type":"number","nullable":true},"drive_time_to_next_minutes":{"type":"integer","nullable":true}}},"LoopListResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"loops":{"type":"array","items":{"$ref":"#/components/schemas/Loop"}},"meta":{"type":"object","properties":{"total":{"type":"integer"}}}}},"meta":{"$ref":"#/components/schemas/Meta"}}},"LoopDetailResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"loop":{"allOf":[{"$ref":"#/components/schemas/Loop"},{"type":"object","properties":{"breweries":{"type":"array","items":{"$ref":"#/components/schemas/LoopBrewery"}}}}]}}},"meta":{"$ref":"#/components/schemas/Meta"}}},"Event":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"type_label":{"type":"string"},"description":{"type":"string","nullable":true},"start_date":{"type":"string","format":"date"},"start_time":{"type":"string","nullable":true},"end_time":{"type":"string","nullable":true},"is_recurring":{"type":"boolean"},"price":{"type":"string","nullable":true},"brewery":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"city":{"type":"string"}}},"_links":{"$ref":"#/components/schemas/ResourceLinks"}}},"EventListResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"meta":{"$ref":"#/components/schemas/Meta"}}},"WeekendPlanResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"weekend":{"type":"object","properties":{"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"}}},"recommended_loops":{"type":"array","items":{"type":"object","properties":{"loop":{"$ref":"#/components/schemas/Loop"},"events_this_weekend":{"type":"integer"},"reason":{"type":"string"}}}},"events":{"type":"array","items":{"$ref":"#/components/schemas/Event"}}}},"meta":{"$ref":"#/components/schemas/Meta"}}},"TripPlanResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"constraints":{"type":"object","properties":{"duration":{"type":"string"},"must_have":{"type":"array","items":{"type":"string"}},"avoid":{"type":"array","items":{"type":"string"}}}},"recommended_loop":{"type":"object","nullable":true,"properties":{"loop":{"$ref":"#/components/schemas/Loop"},"match_score":{"type":"number"},"match_reasons":{"type":"array","items":{"type":"string"}}}},"alternative_loops":{"type":"array","items":{"type":"object","properties":{"loop":{"$ref":"#/components/schemas/Loop"},"match_score":{"type":"number"},"match_reasons":{"type":"array","items":{"type":"string"}}}}}}},"meta":{"$ref":"#/components/schemas/Meta"}}},"NearbyResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"location":{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"description":{"type":"string"}}},"breweries":{"type":"array","items":{"type":"object","properties":{"brewery":{"$ref":"#/components/schemas/Brewery"},"distance_miles":{"type":"number"},"drive_time_minutes":{"type":"integer"},"direction":{"type":"string"}}}}}},"meta":{"$ref":"#/components/schemas/Meta"}}},"LoopRecommendation":{"type":"object","properties":{"loop":{"$ref":"#/components/schemas/Loop"},"score":{"type":"number"},"reasons":{"type":"array","items":{"type":"string"}},"considerations":{"type":"array","items":{"type":"string"}}}},"LoopDecisionResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"context":{"type":"object","properties":{"user_context":{"type":"string"},"duration":{"type":"string"},"party_size":{"type":"integer"},"has_dog":{"type":"boolean"},"has_rv":{"type":"boolean"},"has_kids":{"type":"boolean"}}},"recommendations":{"type":"array","items":{"$ref":"#/components/schemas/LoopRecommendation"}},"explanation":{"type":"string"}}},"meta":{"$ref":"#/components/schemas/Meta"}}}},"responses":{"BadRequest":{"description":"Bad request - invalid parameters","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"RateLimited":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds until rate limit resets","schema":{"type":"integer"}},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"InternalError":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorDetail"},"meta":{"$ref":"#/components/schemas/Meta"}}}}}}}}}