This is similar to Hoogle https://hoogle.haskell.org/ in the Haskell world. I know there are people interested in exploring this idea in OCaml, but as far as I know this doesn’t yet exist.
Also specific to the OCaml API, you can search by types in the manual… And Merlin offers a similar feature which I believe is project-wide… We already have step 1, a central package index, covered… Just need to consolidate these individual effots to give that index a good API search tool.