Docs > The API >


CORS Support Yes! AJAX can work from any website.
SAMPLE QUERIES,max,fake_user2 # nulls come back,public_keys
// note that `them` is an array because certain lookups
// such as `domain` and `usernames` (which itself can be a list)
// can produce multiple results
  "status": {
    "code": 0,
    "name": "OK"
  "them": [{
    "id": "9a2c8a8ac48162723c7992570c87da00",
    "basics": {
      "username": "maxtaco",
      "ctime": 1399919269,
      "mtime": 1399919269,
      "id_version": 5,
      "track_version": 1,
      "last_id_change": 1399919279
    "pictures": {
      "primary": {
        "url": "",
        "width": 200,
        "height": 200
    "public_keys": {
      "primary": {
        "key_fingerprint": "e53878dbb0e644cff5f10e20fa9930221099dd13",
        "kid": "0101995d003...",
        "key_type": 1,
        "bundle": "-----BEGIN PGP PUBLIC KEY.../*cropped for display*/",
        "mtime": 1400074240,
        "ctime": 1400074240,
        "ukbid": "4f8bc40c19626b015308fcb9ef8c5811",
  "csrf_token": "lgHZIDQ1NTU0ODE3NzY5ZmM5N..."

When users cannot be found

If you pass a comma-separated usernames parameter with N names, you will get back a matching N-sized array, but with null for any users who could not be found. We imagine this is easier to deal with.

For external identities, such as domains, this API only supports passing one lookup item at a time (no comma-separated list), but the returning result is still an array. Why? Well, multiple people may prove ownership of a domain, and possibly other search fields. See as an example. Unlike a usernames lookup, this resulting array cannot have any null values in it. It will only return legitimate matches, and therefore its length could be 0, 1, or more.

User objects are massive

The above example is a pretty small result. A user object is a large dictionary and could contain pretty much everything about a user that you have access to. (See the user objects page in the documentation for more info.)

To avoid getting more data than you need, you can (should!) specify a comma-separated list of fields you desire. Acceptable values are:

  • pictures
  • basics
  • public_keys
  • profile
  • proofs_summary
  • remote_key_proofs
  • sigs
  • cryptocurrency_addresses New


Also note that this API call, along with both user/autocomplete and username/pgp_keys.asc is available via AJAX using CORS. Combining the three, you can search Keybase from any page on the web, present results to a viewer, and let them encrypt or verify.