The Penguin API - the smart solution to checking social media username availability!

Back in March 2018, I developed a public rest api to quickly and easily check the availability of a username/handle on various services and social media platforms.

The api returns a consistent response from each service, so it’s easy to automate. I don’t charge to use it, so anyone is welcome to use it however they like as long as they provide some small attribution to me. You can simply link my twitter.

API Usage
There are currently three main endpoints. These will never change format without proper notice as I don’t want to break anyone’s scripts. Also, the API is very stable and has 99% uptime.

Get a list of currently supported services (GET)
https://api.getpenguin.com/check/services

Response:

{
	"services" [
		"twitter",
		"instagram",
		"steamid",
		"steamgroup",
		"mixer",
		"youtube"
	]
}

Get a list of currently supported services with additional details about each service (GET)
https://api.getpenguin.com/check/services/details

Response:

{
	"services": [{
		"id": 1,
		"name": "Twitter",
		"slug": "twitter",
		"endpoints": {
			"baseUrl": "https://www.twitter.com",
			"profileUrl": "https://twitter.com/%name%",
			"requestUrl": "https://api.twitter.com/i/users/username_available.json?username=%name%"
		},
		"httpMethod": "GET",
		"usernameCriteria": {
			"minLength": 5,
			"maxLength": 15,
			"allowedUsernamePattern": "([a-zA-Z0-9_]+)",
			"prohibitedWords": ["twitter", "admin"]
		}
	}]
}

Checks a username on a specific service (GET)
https://api.getpenguin.com/check/[service]/[username]

For [service], plug in the slug found in the response for the service details endpoint.
For [username], plug in the username you want to check.

Response:

{
	"service":"twitter",
	"username":"acrockr",
	"status":"taken",
	"timestamp":1521982922188
}

If you end up using my API in a project, I’d love to hear about it here or on Twitter!

3 Likes

Cool! Hope you get more services soon.

1 Like

Yes, that’s the plan very soon! I’m even going to add support for check domain name availability as well. The API is for my upcoming iOS app by the same name. Stay tuned!

Update

  • Added a Swagger docs portal to make the documentation more professional. You can even test the endpoints right from the webpage.
    https://app.swaggerhub.com/apis-docs/CrocBuzz/penguin-api/

  • Added an endpoint to check the details of a single supported service in case you don’t need all of them. See Swagger for specifics.

1 Like

It also lists invalid accounts as available for Twitter (for example with a dash/hyphen in the username)

Twitter really does not help here; when I tried to make an account @xxx-yyy Twitter seemed to allow it, but silently changed it to @yyy_xxx… (yes, reversed!)

Yes, I’m aware of this. I haven’t made it filter out dis-allowed characters from input yet as each service has different rules. For example, Instagram allows periods in usernames, while Twitter does not.

OK.

Another issue I just experienced: banned Twitter accounts are listed as available.

Really nice idea and implementation!
However Twitter checks seem to now only return available for any handle.
Eg:
https://api.getpenguin.com/check/twitter/google

"status":"available"

while https://api.twitter.com/i/users/username_available.json?username=google

"msg":"Username is unavailable"