{"openapi":"3.1.0","info":{"title":"Ghorar Dim API — The Horse's Egg Hatched","summary":"The world's first machine-readable, musicologically rigorous archive of the Bengali band scene.","description":"## ঘোড়ার ডিম ফুটেছে।\n\nThey said a structured, machine-readable database of Bengali bands and independent artists was a *ghorar dim* — a fool's errand. We built it anyway. Zero AI hallucinations allowed. Every `youtube_video_id` is checked by a human who has better things to do than trust a 240p uncle upload.\n\n### What you get\n- **Bands** with `scene_region`, `origin_city`, `movement_tags`, and `socio_political_context` — because a metal band from Chittagong is not a folk-rock act from Kolkata.\n- **Albums** with strict `DD-MM-YYYY` dates and `total_duration_seconds` that actually matches the tracks (within 5 seconds, we're not monsters).\n- **Songs** with separated credits (lyricist, composer, producer — the vocalist is not automatically the author, sorry).\n- **Lyrics** as plain + LRC-synced + `section_breakdown` (intro, verse, chorus, solo, outro).\n- **Trust layer**: every entity carries `fact_check_status` (`verified`, `community_reviewed`, `unverified`). If we don't know, we say so. Unlike your cousin.\n\n### Base URL\n`https://ghorardim-15c5d011.fastapicloud.dev/v1` (production) · `http://localhost:8000/v1` (local)\n\n### Response shape\nLists: `{ \"data\": [...], \"meta\": { \"total\", \"limit\", \"offset\" } }`\nSingles: `{ \"data\": {...}, \"meta\": { \"fact_check_status\", \"citations\" } }`\nErrors (the witty way): `{ \"error\", \"code\", \"message\" }` — e.g. \"This egg hasn't hatched.\"\n\n### Rate limiting\nScaffolded but disabled in this build. Flip `GHORARDIM_RATE_LIMIT_ENABLED=true` (and install `slowapi`) when you're ready. We trust you. For now.\n\n_Built with chai. Powered by the scene. সুরগুলির ঠিকানা._","version":"1.0.0","x-logo":{"url":"https://ghorardim.anuragpanda.in/logo.png","altText":"Ghorar Dim"}},"servers":[{"url":"http://localhost:8000","description":"Local hatchery"},{"url":"https://ghorardim-15c5d011.fastapicloud.dev","description":"Production (the real egg)"}],"paths":{"/v1/health":{"get":{"tags":["system"],"summary":"Health check","description":"Operational status, uptime, loaded data counts, and rate-limiting state. Returns 200 OK if the egg is alive.","operationId":"health_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/bands":{"get":{"tags":["bands"],"summary":"List bands","description":"Paginated, filterable list of bands and independent artists. No filter = all (paginated). Filters are AND-combined. Sorting: name_asc (default), name_desc, founding_date_asc, founding_date_desc.","operationId":"list_bands_v1_bands_get","parameters":[{"name":"scene_region","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scene Region"}},{"name":"origin_country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Country"}},{"name":"genre","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Genre"}},{"name":"active_years","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Years"}},{"name":"data_completeness","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Completeness"}},{"name":"fact_check_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fact Check Status"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"name_asc","title":"Sort"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bands/all":{"get":{"tags":["bands"],"summary":"List all bands","description":"Returns every band in the archive without pagination. Use responsibly — 36+ eggs.","operationId":"list_all_bands_v1_bands_all_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/bands/{band_id}":{"get":{"tags":["bands"],"summary":"Get a band","description":"Full band profile: identity, lineup (current + past), discography stubs, social links, movement tags, trust status. Slugs (folder name or normalized English name) also resolve here.","operationId":"get_band_v1_bands__band_id__get","parameters":[{"name":"band_id","in":"path","required":true,"schema":{"type":"string","title":"Band Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bands/{band_id}/members":{"get":{"tags":["bands"],"summary":"Band members","description":"Current and past lineup with roles and active flag. We separate current from past because people leave bands. (Usually.)","operationId":"band_members_v1_bands__band_id__members_get","parameters":[{"name":"band_id","in":"path","required":true,"schema":{"type":"string","title":"Band Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bands/{band_id}/albums":{"get":{"tags":["bands"],"summary":"Band discography","description":"All albums by this band, sorted by release date (DD-MM-YYYY).","operationId":"band_albums_v1_bands__band_id__albums_get","parameters":[{"name":"band_id","in":"path","required":true,"schema":{"type":"string","title":"Band Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bands/{band_id}/songs":{"get":{"tags":["bands"],"summary":"Band songs","description":"All songs by this band, ordered by album then track number. Great for building a playlist.","operationId":"band_songs_v1_bands__band_id__songs_get","parameters":[{"name":"band_id","in":"path","required":true,"schema":{"type":"string","title":"Band Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bands/{band_id}/similar":{"get":{"tags":["bands"],"summary":"Similar bands","description":"Bands sharing genres/region/country, ranked by overlap. Not a recommendation engine — just metadata math.","operationId":"similar_bands_v1_bands__band_id__similar_get","parameters":[{"name":"band_id","in":"path","required":true,"schema":{"type":"string","title":"Band Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/albums":{"get":{"tags":["albums"],"summary":"List albums","description":"Paginated album list with optional filters: type, release_format (substring), year, band_id, fact_check_status, q.","operationId":"list_albums_v1_albums_get","parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"release_format","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Release Format"}},{"name":"year","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Year"}},{"name":"band_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Band Id"}},{"name":"fact_check_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fact Check Status"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/albums/all":{"get":{"tags":["albums"],"summary":"List all albums","description":"Every album in the archive, no pagination. (Currently mostly Fossils. The rest are still hatching.)","operationId":"list_all_albums_v1_albums_all_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/albums/{album_id}":{"get":{"tags":["albums"],"summary":"Get an album","description":"Full album metadata including concept_story, socio_political_context, tracklist stubs, and trust status.","operationId":"get_album_v1_albums__album_id__get","parameters":[{"name":"album_id","in":"path","required":true,"schema":{"type":"string","title":"Album Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/albums/{album_id}/songs":{"get":{"tags":["albums"],"summary":"Album tracklist","description":"Songs of this album ordered by track_number, with durations, credits, and section breakdowns.","operationId":"album_songs_v1_albums__album_id__songs_get","parameters":[{"name":"album_id","in":"path","required":true,"schema":{"type":"string","title":"Album Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/songs":{"get":{"tags":["songs"],"summary":"List songs","description":"Paginated song list. Filter by band, album, lyrical theme, language, has_lyrics, has_synced_lyrics, or q.","operationId":"list_songs_v1_songs_get","parameters":[{"name":"band_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Band Id"}},{"name":"album_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Album Id"}},{"name":"lyrical_themes","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lyrical Themes"}},{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"}},{"name":"has_lyrics","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Lyrics"}},{"name":"has_synced_lyrics","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Synced Lyrics"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/songs/all":{"get":{"tags":["songs"],"summary":"List all songs","description":"Every song in the archive (70+ for Fossils alone). No pagination.","operationId":"list_all_songs_v1_songs_all_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/songs/{song_id}":{"get":{"tags":["songs"],"summary":"Get a song","description":"Full song metadata: credits, lyrics object (plain + synced + section breakdown), themes, YouTube id, concept note.","operationId":"get_song_v1_songs__song_id__get","parameters":[{"name":"song_id","in":"path","required":true,"schema":{"type":"string","title":"Song Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/songs/{song_id}/lyrics":{"get":{"tags":["songs"],"summary":"Song lyrics","description":"Dedicated lyrics endpoint: plain_lyrics, synced_lyrics (LRC), transliteration, script, section_breakdown, verified flag. Lightweight for lyric apps.","operationId":"song_lyrics_v1_songs__song_id__lyrics_get","parameters":[{"name":"song_id","in":"path","required":true,"schema":{"type":"string","title":"Song Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/songs/{song_id}/youtube":{"get":{"tags":["songs"],"summary":"YouTube redirect","description":"HTTP 302 redirect to the official YouTube upload. No JSON, just the video. If no official upload exists, 404 with a witty message.","operationId":"song_youtube_v1_songs__song_id__youtube_get","parameters":[{"name":"song_id","in":"path","required":true,"schema":{"type":"string","title":"Song Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/search":{"get":{"tags":["search"],"summary":"Global search","description":"Fuzzy search across bands, albums, and songs in Bengali and Latin script. type: band | album | song | all.","operationId":"search_v1_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","title":"Q"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","pattern":"^(band|album|song|all)$","default":"all","title":"Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/discover/random":{"get":{"tags":["discover"],"summary":"Random pick","description":"Returns a random band or song. Perfect for 'discover a new Bengali band' widgets.","operationId":"random_entity_v1_discover_random_get","parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string","pattern":"^(band|song)$","default":"band","title":"Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/discover/context/{tag}":{"get":{"tags":["discover"],"summary":"Context by tag","description":"Bands and songs tied to a movement tag, genre, lyrical theme, or keyword (e.g. bangladesh-liberation-war, urban-alienation).","operationId":"context_v1_discover_context__tag__get","parameters":[{"name":"tag","in":"path","required":true,"schema":{"type":"string","title":"Tag"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/nest":{"post":{"tags":["nest"],"summary":"Submit contribution","description":"Community submission (correction or new data) with a citation URL. Lands in the pending review pipeline. We'll credit you. Unless you add a wrong YouTube link.","operationId":"submit_contribution_v1_nest_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContributionIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/nest/contributions":{"get":{"tags":["nest"],"summary":"List contributions","description":"Recent community contributions for transparency and credit.","operationId":"list_contributions_v1_nest_contributions_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/nest/contributions/{contribution_id}":{"get":{"tags":["nest"],"summary":"Get contribution","description":"Status of a specific contribution: pending, approved, or rejected.","operationId":"get_contribution_v1_nest_contributions__contribution_id__get","parameters":[{"name":"contribution_id","in":"path","required":true,"schema":{"type":"string","title":"Contribution Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/meta/enums":{"get":{"tags":["meta"],"summary":"Accepted enums","description":"All accepted enum values (genres, movement tags, lyrical themes, languages, scenes, countries, album types, etc.) for building filters and dropdowns dynamically.","operationId":"enums_v1_meta_enums_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/meta/stats":{"get":{"tags":["meta"],"summary":"Global stats","description":"Totals for landing-page counters: bands, albums, songs, verified YouTube links, synced lyrics.","operationId":"stats_v1_meta_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"tags":["system"],"summary":"Health check","description":"Operational status, uptime, loaded data counts, and rate-limiting state. Returns 200 OK if the egg is alive.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1":{"get":{"summary":"V1 Root","operationId":"v1_root_v1_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"ContributionIn":{"properties":{"entity_type":{"type":"string","title":"Entity Type"},"entity_id":{"type":"string","title":"Entity Id"},"field":{"type":"string","title":"Field"},"value":{"title":"Value"},"citation_url":{"type":"string","title":"Citation Url","default":""},"contributor":{"type":"string","title":"Contributor","default":"anonymous"}},"type":"object","required":["entity_type","entity_id","field","value"],"title":"ContributionIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"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"}}},"tags":[{"name":"system","description":"Health, uptime, and the honest truth about whether the egg is still alive. (It is.)"},{"name":"bands","description":"Bands and independent artists from Kolkata to Dhaka and the diaspora. No solo-artist laundering, no hallucinated lineups."},{"name":"albums","description":"Discographies with release dates in DD-MM-YYYY, because ISO is for people who don't respect cassettes."},{"name":"songs","description":"Tracks, credits (lyricist ≠ vocalist, deal with it), durations in whole seconds, and section breakdowns."},{"name":"search","description":"Fuzzy search across bands, albums, and songs in Bengali and Latin script. Searching 'Rabindra Sangeet' will not be judged. Much."},{"name":"discover","description":"Random picks and socio-political context tags. For when you want a new band and a history lesson."},{"name":"nest","description":"Community contributions. Submit corrections with a citation, or get roasted. Your call."},{"name":"meta","description":"Enums and global stats. For dropdowns, counters, and showing off."}],"externalDocs":{"description":"The full Ghorar Dim dataset, schema, and editorial rules","url":"https://ghorardim-15c5d011.fastapicloud.dev/docs"}}