Move unused markdown documentation file in the query docstring
This api.md was not displayed in the documentation pages (see mkdocs.yml), but its content is quite variable.
This MR moves the content of this api.md file to the docstring of the query module.
(and also bumping up the pre-commit version of black)