$ curl -vL 'https://hoogle.haskell.org/?mode=json&hoogle=map&start=1&count=1' | jq
[
{
"url": "https://hackage.haskell.org/package/base/docs/Prelude.html#v:map",
"module": {
"url": "https://hackage.haskell.org/package/base/docs/Prelude.html",
"name": "Prelude"
},
"package": {
"url": "https://hackage.haskell.org/package/base",
"name": "base"
},
"item": "<span class=name><s0>map</s0></span> :: (a -> b) -> [a] -> [b]",
"type": "",
"docs": "<a>map</a> <tt>f xs</tt> is the list obtained by applying <tt>f</tt>\nto each element of <tt>xs</tt>, i.e.,\n\n<pre>\nmap f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn]\nmap f [x1, x2, ...] == [f x1, f x2, ...]\n</pre>\n"
}
]
We use(d) the JSON API of Hoogle version 4 at http://www.haskell.org/hoogle, but this is now a redirect to Hoogle version 5 at https://hoogle.haskell.org/.
Version 5 has changed the layout of the API responses, and also includes HTML markup. Example request/response from version 5:
There are 2 options for resolving this issue: