ManKier API v1

v1 was deprecated 2017-03-31

If you're building something new, see the current API.

If you're already using v1, it will continue working, but the contents of the html_description field mentioned below changed on 2017-04-06 to match what's returned for the description field in the current API.
(But note: the current API enables retrieving a list of available sections, and the contents of a specified section.)


Man Page Data

Search man pages starting with who:
https://www.mankier.com/api/mans/?q=who

Result (up to 20 entries):

{
  "q": "who",
  "truncated": false,
  "results": [
    {"text": "who(1)", "url": "https://www.mankier.com/1/who"},
    {"text": "whoami(1)", "url": "https://www.mankier.com/1/whoami"}
    ...
  ]
}
  

Get a description for a man page:
https://www.mankier.com/api/mans/who.1

Result:

{
  "name": "who",
  "num": "1",
  "html_description": "<p>Print information about users who are currently [...]",
  "section_name": "General commands",
  "url": "https://www.mankier.com/1/who"
}
  

Get all the connections from and to a man page, and also any connections between its connections:
https://www.mankier.com/api/mesh/who.1

Result:

[
  {"f": "talk.1", "t": "who.1"},
  {"f": "write.1", "t": "who.1"},
  ...
]
  

Add callback parameter if you need it:
https://www.mankier.com/api/mans/who.1&callback=cb

Requests are served with this header:
Access-Control-Allow-Origin *

Explain a Shell Command

Explain ls -lh, wrapping text at 70 chars (optional):
https://www.mankier.com/api/explain/?cols=70&q=ls -lh

Result:

ls(1)
  list directory contents

  -l (-L)
    use a long listing format

  -h (-H, --HUMAN-READABLE)
    with -L and/or -S, print human readable sizes (e.g., 1K 234M 2G)
                                          https://www.mankier.com/1/ls