{"openapi":"3.1.0","info":{"title":"BorsaAI Public API","description":"Read-only JSON API for Egyptian Exchange (EGX) stocks, sectors, news, and daily briefs. No buy\/sell recommendations are issued \u2014 content is informational per Egyptian Capital Markets Law 95\/1992.","version":"v1","contact":{"name":"BorsaAI Support","email":"support@borsaai.com","url":"https:\/\/borsaai.com\/about"},"license":{"name":"Proprietary \u2014 citation encouraged with source_url","url":"https:\/\/borsaai.com\/terms"},"x-rate-limit":{"anonymous":"60 requests\/minute per IP","trusted-bots":"300 requests\/minute per IP (GPTBot, ClaudeBot, PerplexityBot, Google-Extended, etc.)"}},"servers":[{"url":"https:\/\/borsaai.com","description":"Production"}],"tags":[{"name":"stocks","description":"EGX-listed instruments"},{"name":"news","description":"Classified Egyptian-market news"},{"name":"sectors","description":"Sector overviews"},{"name":"briefs","description":"Daily market briefs (delayed 24h)"},{"name":"glossary","description":"EGX and finance glossary"},{"name":"market","description":"Market state and trading hours"}],"paths":{"\/api\/v1\/stocks":{"get":{"tags":["stocks"],"summary":"List EGX-listed stocks","parameters":[{"name":"sector","in":"query","schema":{"type":"string"},"description":"Filter by sector slug (e.g. banks, real_estate). See \/api\/v1\/sectors."},{"name":"index","in":"query","schema":{"type":"string","enum":["EGX30","EGX70","EGX100"]},"description":"Filter by index membership."},{"name":"per_page","in":"query","schema":{"type":"integer","default":50,"maximum":200}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Stock list","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/StockListEnvelope"}}}}}}},"\/api\/v1\/stocks\/{symbol}":{"get":{"tags":["stocks"],"summary":"Single stock with recent news","parameters":[{"name":"symbol","in":"path","required":true,"schema":{"type":"string"},"examples":{"COMI":{"value":"COMI","summary":"Commercial International Bank"},"HRHO":{"value":"HRHO","summary":"EFG Hermes Holding"},"ETEL":{"value":"ETEL","summary":"Telecom Egypt"}}}],"responses":{"200":{"description":"Stock detail","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/StockDetailEnvelope"}}}},"404":{"$ref":"#\/components\/responses\/NotFound"}}}},"\/api\/v1\/news":{"get":{"tags":["news"],"summary":"List classified news","parameters":[{"name":"symbol","in":"query","schema":{"type":"string"},"description":"Filter by ticker (e.g. COMI)."},{"name":"sector","in":"query","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}},{"name":"importance","in":"query","schema":{"type":"string","enum":["low","medium","high","critical"]}},{"name":"per_page","in":"query","schema":{"type":"integer","default":25,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"News list","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/NewsListEnvelope"}}}}}}},"\/api\/v1\/news\/{id}":{"get":{"tags":["news"],"summary":"Single news article","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"News article","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/NewsEnvelope"}}}},"404":{"$ref":"#\/components\/responses\/NotFound"}}}},"\/api\/v1\/sectors":{"get":{"tags":["sectors"],"summary":"List all sectors","responses":{"200":{"description":"Sector list","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SectorListEnvelope"}}}}}}},"\/api\/v1\/sectors\/{slug}":{"get":{"tags":["sectors"],"summary":"Single sector","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Sector detail","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/SectorEnvelope"}}}},"404":{"$ref":"#\/components\/responses\/NotFound"}}}},"\/api\/v1\/briefs":{"get":{"tags":["briefs"],"summary":"List daily briefs (delayed 24h)","parameters":[{"name":"per_page","in":"query","schema":{"type":"integer","default":25,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Brief list","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/BriefListEnvelope"}}}}}}},"\/api\/v1\/briefs\/latest":{"get":{"tags":["briefs"],"summary":"Most recent public brief","responses":{"200":{"description":"Brief","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/BriefEnvelope"}}}},"404":{"$ref":"#\/components\/responses\/NotFound"}}}},"\/api\/v1\/briefs\/{date}\/{type}":{"get":{"tags":["briefs"],"summary":"Single brief by date + type","parameters":[{"name":"date","in":"path","required":true,"schema":{"type":"string","format":"date"}},{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["pre_market","market_open","mid_session","closing"]}}],"responses":{"200":{"description":"Brief","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/BriefEnvelope"}}}},"404":{"$ref":"#\/components\/responses\/NotFound"}}}},"\/api\/v1\/glossary":{"get":{"tags":["glossary"],"summary":"List glossary terms","responses":{"200":{"description":"Term list","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/GlossaryListEnvelope"}}}}}}},"\/api\/v1\/glossary\/{slug}":{"get":{"tags":["glossary"],"summary":"Single glossary term","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Term","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/GlossaryEnvelope"}}}},"404":{"$ref":"#\/components\/responses\/NotFound"}}}},"\/api\/v1\/market\/state":{"get":{"tags":["market"],"summary":"Market state and trading hours","responses":{"200":{"description":"Market state","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/MarketStateEnvelope"}}}}}}}},"components":{"responses":{"NotFound":{"description":"Resource not found","content":{"application\/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"schemas":{"Meta":{"type":"object","properties":{"version":{"type":"string","example":"v1"},"generated_at":{"type":"string","format":"date-time"},"cache_ttl_seconds":{"type":"integer"}}},"Links":{"type":"object","properties":{"next":{"type":"string","nullable":true},"prev":{"type":"string","nullable":true}}},"Stock":{"type":"object","properties":{"symbol":{"type":"string","example":"COMI"},"isin":{"type":"string","nullable":true},"name_ar":{"type":"string","nullable":true},"name_en":{"type":"string","nullable":true},"sector":{"type":"string","nullable":true},"sub_sector":{"type":"string","nullable":true},"market_cap":{"type":"number","nullable":true},"last_price":{"type":"number","nullable":true},"change_percent":{"type":"number","nullable":true},"last_price_update":{"type":"string","format":"date-time","nullable":true},"indices":{"type":"array","items":{"type":"string"}},"source_url":{"type":"string","format":"uri"}}},"News":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"summary":{"type":"string","nullable":true},"content":{"type":"string","nullable":true},"key_facts":{"type":"array","items":{"type":"string"}},"published_at":{"type":"string","format":"date-time","nullable":true},"sentiment":{"type":"string","nullable":true},"importance":{"type":"string","enum":["low","medium","high","critical"]},"urgency":{"type":"string"},"tickers":{"type":"array","items":{"type":"string"}},"sectors":{"type":"array","items":{"type":"string"}},"keywords":{"type":"array","items":{"type":"string"}},"source":{"type":"string","nullable":true},"original_url":{"type":"string","format":"uri","nullable":true},"source_url":{"type":"string","format":"uri"}}},"Sector":{"type":"object","properties":{"slug":{"type":"string"},"name_ar":{"type":"string"},"name_en":{"type":"string"},"description_ar":{"type":"string"},"description_en":{"type":"string","nullable":true},"source_url":{"type":"string","format":"uri"}}},"Brief":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"date":{"type":"string","format":"date"},"type":{"type":"string","enum":["pre_market","market_open","mid_session","closing"]},"generated_at":{"type":"string","format":"date-time","nullable":true},"content_md":{"type":"string","nullable":true},"key_signals":{"type":"array","items":{"type":"object"}},"watchlist_items":{"type":"array","items":{"type":"object"}},"deep_dives":{"type":"array","items":{"type":"object"}},"source_url":{"type":"string","format":"uri"}}},"GlossaryTerm":{"type":"object","properties":{"slug":{"type":"string"},"term_ar":{"type":"string"},"term_en":{"type":"string"},"description":{"type":"string"},"example":{"type":"string","nullable":true},"related":{"type":"array","items":{"type":"string"}},"source_url":{"type":"string","format":"uri"}}},"StockListEnvelope":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Stock"}},"meta":{"$ref":"#\/components\/schemas\/Meta"},"links":{"$ref":"#\/components\/schemas\/Links"}}},"StockDetailEnvelope":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Stock"},"meta":{"$ref":"#\/components\/schemas\/Meta"}}},"NewsListEnvelope":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/News"}},"meta":{"$ref":"#\/components\/schemas\/Meta"},"links":{"$ref":"#\/components\/schemas\/Links"}}},"NewsEnvelope":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/News"},"meta":{"$ref":"#\/components\/schemas\/Meta"}}},"SectorListEnvelope":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Sector"}},"meta":{"$ref":"#\/components\/schemas\/Meta"}}},"SectorEnvelope":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Sector"},"meta":{"$ref":"#\/components\/schemas\/Meta"}}},"BriefListEnvelope":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Brief"}},"meta":{"$ref":"#\/components\/schemas\/Meta"},"links":{"$ref":"#\/components\/schemas\/Links"}}},"BriefEnvelope":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Brief"},"meta":{"$ref":"#\/components\/schemas\/Meta"}}},"GlossaryListEnvelope":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/GlossaryTerm"}},"meta":{"$ref":"#\/components\/schemas\/Meta"}}},"GlossaryEnvelope":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/GlossaryTerm"},"meta":{"$ref":"#\/components\/schemas\/Meta"}}},"MarketStateEnvelope":{"type":"object","properties":{"data":{"type":"object","properties":{"is_open":{"type":"boolean"},"cairo_time":{"type":"string","format":"date-time"},"trading_window":{"type":"object"},"latest_state":{"type":"object","nullable":true},"source_url":{"type":"string","format":"uri"}}},"meta":{"$ref":"#\/components\/schemas\/Meta"}}}}}}