user/discover

GET or POST
https://keybase.io/_/api/1.0/user/discover.json
SAMPLE QUERIES
https://keybase.io/_/api/1.0/user/discover.json?twitter=malgorithms,maxtaco
https://keybase.io/_/api/1.0/user/discover.json?twitter=malgorithms,maxtaco&usernames_only=1
https://keybase.io/_/api/1.0/user/discover.json?twitter=malgorithms,maxtaco&usernames_only=1&flatten=1
https://keybase.io/_/api/1.0/user/discover.json?twitter=malgorithms&github=maxtaco
SAMPLE OUTPUT
// this example is for discover.json?twitter=jeresig,alexisohanian
// and the result for 'twitter' is an ARRAY OF ARRAYS. First, any matches for jeresig (there could be 0, 1, or more),
// then any matches for alexisohanian, etc.
//
// if you add 'usernames_only=1' or 'flatten=1' that will restructure results
//
{
  "status": {
    "code": 0,
    "name": "OK"
  },
  "matches": {
    "twitter": [
      [
        {
          "thumbnail": "https://s3.amazonaws.com/keybase_process...",
          "username": "jeresig",
          "uid": "1535b0c717c570f5d486e8823f948e00",
          "public_key": {
            "key_fingerprint": "17209477977b343fec42b6d41e872b3ad262c861",
            "bits": 4096,
            "algo": 1
          },
          "full_name": "John Resig",
          "ctime": 1414294364839,
          "remote_proofs": {
            "dns": [],
            "generic_web_site": [
              {
                "hostname": "ejohn.org",
                "protocol": "http:",
                "searchable": "ejohn"
              }
            ],
            "twitter": "jeresig",
            "github": "jeresig",
            "reddit": null,
            "hackernews": null
          }
        }
      ],
      [
        {
          "thumbnail": "https://s3.amazonaws.com/keybase_process...",
          "username": "alexisohanian",
          "uid": "9900486c291f5797e7bb902557205800",
          "public_key": {
            "key_fingerprint": "0185fcefa2a91fabdb25804b130889f31d10fddd",
            "bits": 4096,
            "algo": 1
          },
          "full_name": "Alexis Ohanian",
          "ctime": 1414363336217,
          "remote_proofs": {
            "dns": [],
            "generic_web_site": [],
            "twitter": "alexisohanian",
            "github": null,
            "reddit": "kn0thing",
            "hackernews": null
          }
        }
      ]
    ]
  }
  "csrf_token": "lgHZIDg2YzQ4ZTJhOTU3Y..."
}

For checking Keybase membership and getting display info

If you have a list of twitter usernames, github usernames, websites, etc., this service will provide you with a matching list of Keybase users.

Take special note that the returning data structure is designed to be ordered matches, based on the incoming query. If you pass both a twitter list and a github list, you'll get a dictionary back with "twitter" and "github" entries. Inside each will be an array of arrays. This is because it's hypothetically possible for multiple users to match a single query, and there are multiple queries per identity type.

You can flatten your results with flatten=1. This makes the results one single array and removes duplicates. Flattening is advised if your only goal is to get back a list of users of interest. usernames_only=1 is useful if you plan on following up with a user/lookup call and you just need id's.

For performance reasons, discover is designed only to get you the info needed to display matches. If you need more info, such as full public keys, you should use user/lookup.

By default, results come back with basic info on each user, designed for display purposes. If you need more info, such as

Acceptable params

  • flatten: if true, return a single array of results, with dupes removed.
  • usernames_only: don't reply with display info on the users, just their usernames

  • twitter: twitter usernames to include in results.
  • github: github usernames to match
  • hackernews: hacker news usernames to include in results.
  • web: domains to match (dns, http, or https)
  • key_fingerprint: PGP key fingerprints to match

Pssst, we're hiring.