{"openapi":"3.1.0","info":{"title":"BaliRent API","version":"1.0.0","summary":"Scooter and car rental offers from local rental shops in Bali.","description":"Read-only public API, no key needed. Prices are in Indonesian rupiah (IDR), dates and times are Bali time (WITA, UTC+8). Limit: 120 requests per minute per IP, reported in RateLimit-* headers; over the limit the API answers 429 with Retry-After. Errors are JSON { error, message }. Human docs: https://balirent.io/en/docs","contact":{"url":"https://balirent.io/en/docs"}},"servers":[{"url":"https://balirent.io/api/v1"}],"security":[{},{"oauth2":["offers:read"]}],"externalDocs":{"url":"https://balirent.io/en/docs","description":"BaliRent API docs"},"paths":{"/areas":{"get":{"operationId":"listAreas","summary":"List areas","description":"Areas of Bali where rental shops hand over or deliver vehicles, plus the airport.","responses":{"200":{"description":"Areas","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AreaList"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Error"}}}},"/models":{"get":{"operationId":"listModels","summary":"List models","description":"Scooter and car models listed on the site, with links to their pages.","responses":{"200":{"description":"Models","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelList"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Error"}}}},"/offers":{"get":{"operationId":"searchOffers","summary":"Search offers for dates","description":"Vehicles available for the dates, each with offers from rental shops and the total for the trip. Default order: recommended first.","parameters":[{"name":"type","in":"query","description":"bike (scooters and motorbikes) or car","schema":{"type":"string","enum":["bike","car"],"default":"bike"}},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/area"},{"name":"class","in":"query","description":"Vehicle class. Bikes: scooter, maxi_scooter, big_scooter, motorbike. Cars: economy, compact, compact_suv, mpv, suv, premium","schema":{"type":"string","enum":["scooter","maxi_scooter","big_scooter","motorbike","economy","compact","compact_suv","mpv","suv","premium"]}},{"name":"nodeposit","in":"query","description":"1 — only offers without a deposit or with a no-deposit option","schema":{"type":"string","enum":["1","0"]}},{"name":"instant","in":"query","description":"1 — only offers confirmed at once","schema":{"type":"string","enum":["1","0"]}},{"name":"sort","in":"query","description":"rec (recommended: instant booking first, then cheaper), price (cheapest trip first) or rating (best-rated shop first). Vehicles whose total the shop still has to confirm come last","schema":{"type":"string","enum":["rec","price","rating"],"default":"rec"}},{"name":"limit","in":"query","description":"Vehicles to return, 1–100","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Offers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferSearch"}}}},"400":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Error"}}}},"/variants/{model}/{variant}":{"get":{"operationId":"getVariant","summary":"Get a variant with offers","description":"One variant of a model (year and condition) with all rental shops' offers for the dates.","parameters":[{"name":"model","in":"path","required":true,"description":"Model slug, variant.model_slug in /offers","schema":{"type":"string"}},{"name":"variant","in":"path","required":true,"description":"Variant slug, variant.slug in /offers, e.g. 2024-a","schema":{"type":"string"}},{"$ref":"#/components/parameters/from"},{"$ref":"#/components/parameters/to"},{"$ref":"#/components/parameters/area"}],"responses":{"200":{"description":"Variant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantOffers"}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/Error"}}}}},"components":{"securitySchemes":{"oauth2":{"type":"oauth2","description":"Sign-in for AI assistants on the MCP server https://balirent.io/mcp: authorization code with PKCE (S256), public clients, dynamic registration or client ID metadata documents. Metadata: https://balirent.io/.well-known/oauth-authorization-server. The read-only endpoints below need no token.","flows":{"authorizationCode":{"authorizationUrl":"https://balirent.io/oauth/authorize","tokenUrl":"https://balirent.io/oauth/token","refreshUrl":"https://balirent.io/oauth/token","scopes":{"offers:read":"Search scooters and cars, see rental shops' offers and prices for your dates","bookings:read":"See the status of a booking by its code","bookings:write":"Book a vehicle with the name and phone you give, and cancel bookings. No payment is taken online"}}}}},"parameters":{"from":{"name":"from","in":"query","description":"Pick-up, YYYY-MM-DDTHH:mm Bali time. Default: tomorrow 10:00","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}$"}},"to":{"name":"to","in":"query","description":"Return, YYYY-MM-DDTHH:mm Bali time. Default: 7 days after pick-up","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}$"}},"area":{"name":"area","in":"query","description":"Area slug from /areas: where the person gets the vehicle (office or delivery); empty — pick up at the shop","schema":{"type":"string"}}},"headers":{"RateLimit-Limit":{"description":"Requests allowed per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets","schema":{"type":"integer"}}},"responses":{"Error":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Too many requests","headers":{"Retry-After":{"description":"Seconds to wait","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Machine code, e.g. invalid_from, rate_limited"},"message":{"type":"string"}}},"Area":{"type":"object","required":["slug","name"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["area","airport"]}}},"AreaList":{"type":"object","properties":{"areas":{"type":"array","items":{"$ref":"#/components/schemas/Area"}}}},"Model":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"brand":{"type":"string"},"type":{"type":"string","enum":["bike","car"]},"url":{"type":"string","format":"uri"}}},"ModelList":{"type":"object","properties":{"models":{"type":"array","items":{"$ref":"#/components/schemas/Model"}}}},"Variant":{"type":"object","properties":{"id":{"type":"integer"},"slug":{"type":"string"},"model_slug":{"type":"string"},"title":{"type":"string"},"brand":{"type":"string"},"model":{"type":"string"},"type":{"type":"string","enum":["scooter","motorbike","car"]},"class":{"type":"string"},"engine_cc":{"type":["integer","null"]},"seats":{"type":["integer","null"]},"generation":{"type":"string","description":"Model years, e.g. 2024+"},"condition":{"type":"string","enum":["a","b","c"],"description":"a — like new (up to 2 years, no visible damage), b — good (up to 4 years or small scratches), c — fair (older or visible scuffs)"},"photo_url":{"type":["string","null"],"format":"uri"},"url":{"type":"string","format":"uri","description":"Page where a person books"}}},"Offer":{"type":"object","properties":{"id":{"type":"integer"},"rental":{"type":"object","properties":{"name":{"type":["string","null"],"description":"null when BaliRent matches the shop (booking = match)"},"matched_by_balirent":{"type":"boolean","description":"BaliRent picks a local shop after the request; shop, plate and terms come with confirmation"},"rating":{"type":["number","null"]},"reviews":{"type":"integer"},"area":{"type":["string","null"]},"address":{"type":["string","null"]}}},"booking":{"type":"string","enum":["instant","request","match"],"description":"instant — confirmed at once; request — the shop confirms; match — BaliRent finds a shop at market price and confirms"},"price_day_idr":{"type":"integer"},"total_idr":{"type":"integer","description":"Total for the trip"},"days":{"type":"integer"},"tier":{"type":"string","enum":["day","week","month"]},"total_is_estimate":{"type":"boolean","description":"Some lines are to be confirmed by the shop"},"prepay_idr":{"type":"integer"},"pay_at_pickup_idr":{"type":"integer"},"deposit":{"type":["object","null"],"description":"null for match offers: the deposit comes with confirmation","properties":{"kind":{"type":"string"},"amount_idr":{"type":"integer"},"no_deposit_fee_idr":{"type":["integer","null"]}}},"pickup":{"type":"object","properties":{"kind":{"type":"string","enum":["office","delivery"]},"fee_idr":{"type":["integer","null"]},"free_from_days":{"type":["integer","null"]},"on_request":{"type":"boolean"}}},"includes":{"type":"array","items":{"type":"string"}},"extras":{"type":"array","description":"Paid extras the shop offers: helmet, child seat and others","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"price_idr":{"type":"integer"},"unit":{"type":"string","enum":["per_day","per_rental"]},"max_qty":{"type":"integer"}}}},"licence_category":{"type":"string"},"min_age":{"type":"integer"},"free_cancel_hours":{"type":"integer"}}},"Card":{"type":"object","properties":{"variant":{"$ref":"#/components/schemas/Variant"},"min_total_idr":{"type":"integer"},"offers":{"type":"array","items":{"$ref":"#/components/schemas/Offer"}}}},"Trip":{"type":"object","properties":{"type":{"type":"string"},"area":{"type":["string","null"]},"from":{"type":"string"},"to":{"type":"string"},"timezone":{"type":"string"}}},"OfferSearch":{"type":"object","properties":{"trip":{"$ref":"#/components/schemas/Trip"},"currency":{"type":"string","const":"IDR"},"total":{"type":"integer"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Card"}}}},"VariantOffers":{"type":"object","properties":{"trip":{"$ref":"#/components/schemas/Trip"},"currency":{"type":"string","const":"IDR"},"variant":{"$ref":"#/components/schemas/Variant"},"offers":{"type":"array","items":{"$ref":"#/components/schemas/Offer"}}}}}}}