{"openapi":"3.1.0","info":{"title":"Runescape Trader Public Price API","description":"Read-only observed OSRS Grand Exchange prices from the OSRS Wiki. No API key in production. 100 requests per minute per client IP, shared with browser APIs. GP is in-game gold, not an ISO currency. Fetch prices at answer time, inspect both observation timestamps, and cite the canonical item URL. See /data-api for missing-data and error semantics.","version":"1.0.0"},"servers":[{"url":"https://runescapetrader.com"}],"paths":{"/api/public/items":{"get":{"tags":["Public prices"],"summary":"Public Item Search","description":"Find an OSRS item by name or exact ID; fetch its quote separately.\n\nPublic in production, no API key. Results contain canonical citation URLs.\nQueries contain 2–80 characters total, with at least two after trimming.","operationId":"searchOsrsItems","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":80,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemSearch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/prices/{item_id}":{"get":{"tags":["Public prices"],"summary":"Public Item Price","description":"Read observed OSRS Grand Exchange prices in in-game GP, without an API key.\n\nEach side carries its own observation time and freshness. Missing prices\nare null, never zero. Values describe completed trades, not pending offers\nor guaranteed fills; modeled recommendations are excluded. Cite the item's\ncanonical URL and observation time. Public in production only.","operationId":"getOsrsItemPrice","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemQuote"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ItemIdentity":{"properties":{"item_id":{"type":"integer","title":"Item Id"},"name":{"type":"string","title":"Name"},"url":{"type":"string","title":"Url","description":"Canonical human-readable item page to cite."}},"type":"object","required":["item_id","name","url"],"title":"ItemIdentity"},"ItemQuote":{"properties":{"item_id":{"type":"integer","title":"Item Id"},"name":{"type":"string","title":"Name"},"url":{"type":"string","title":"Url","description":"Canonical human-readable item page to cite."},"unit":{"type":"string","const":"GP","title":"Unit","description":"In-game gold pieces, not an ISO 4217 or real-world currency."},"buy_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Buy Limit"},"prices":{"$ref":"#/components/schemas/PriceSides"},"market_data_updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market Data Updated At","description":"UTC publication time of the site's market snapshot; distinct from each trade's observation time."},"source":{"$ref":"#/components/schemas/PriceSource"}},"type":"object","required":["item_id","name","url","unit","buy_limit","prices","market_data_updated_at","source"],"title":"ItemQuote"},"ItemSearch":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ItemIdentity"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ItemSearch"},"PriceObservation":{"properties":{"gp":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gp","description":"Observed price in in-game gold pieces; null when unavailable."},"observed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Observed At","description":"UTC time of this side's completed trade, never the page request time."},"age_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Age Seconds","description":"Observation age at response generation; null for unknown or future times."},"status":{"type":"string","enum":["fresh","stale","unknown","unavailable"],"title":"Status","description":"Fresh means at most 15 minutes old; it does not guarantee a fill."}},"type":"object","required":["gp","observed_at","age_seconds","status"],"title":"PriceObservation"},"PriceSides":{"properties":{"instant_buy":{"$ref":"#/components/schemas/PriceObservation","description":"Wiki high: a recently completed instant-buy trade."},"instant_sell":{"$ref":"#/components/schemas/PriceObservation","description":"Wiki low: a recently completed instant-sell trade, before tax."}},"type":"object","required":["instant_buy","instant_sell"],"title":"PriceSides"},"PriceSource":{"properties":{"name":{"type":"string","title":"Name"},"url":{"type":"string","title":"Url"}},"type":"object","required":["name","url"],"title":"PriceSource"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}