Ribnik (Serbian Cyrillic: Рибник) is a municipality located in Republika Srpska, an entity of Bosnia and Herzegovina. It is situated in the southern part of the Bosanska Krajina region. As of 2013, it has a population of 6,048 inhabitants. Seat of the municipality is the village of Gornji Ribnik.
Ribnik, briefly known as Srpski Ključ (Српски Кључ), was created from part of the pre-war municipality of Ključ (the other part of the pre-war municipality is now in the Federation of Bosnia and Herzegovina).
It is located between municipalities of Oštra Luka in the north, Banja Luka and Mrkonjić Grad in the east, Glamoč in the south, and Istočni Drvar, Bosanski Petrovac, and Ključ in the west.
According to the 2013 census results, the municipality of Ribnik has 6,048 inhabitants. The majority of its population are ethnic Serbs.