🔍

Gravatar Lookup

Get the Gravatar image URL and profile for an email address

GET 1 credit /v1/email/gravatar
curl "https://email.toolkitapi.io/v1/email/[email protected]&size=200" \
  -H "x-api-key: YOUR_API_KEY"
import httpx

resp = httpx.get(
    "https://email.toolkitapi.io/v1/email/[email protected]&size=200",
)
print(resp.json())
const resp = await fetch("https://email.toolkitapi.io/v1/email/[email protected]&size=200", {
});
const data = await resp.json();
console.log(data);
# See curl example
Response 200 OK
{
  "email": "[email protected]",
  "email_hash": "b4c9a289323b21a01c3e940f150eb9b8",
  "avatar_url": "https://www.gravatar.com/avatar/b4c9a289323b21a01c3e940f150eb9b8?s=200&d=identicon",
  "profile_url": "https://www.gravatar.com/b4c9a289323b21a01c3e940f150eb9b8",
  "has_custom_avatar": true
}

Description

Get the Gravatar image URL and profile for an email address

How to Use

1

1. Pass the email address as the `email` query parameter.

2

2. Optionally set `size` (1–2048 pixels) for the avatar image dimensions.

3

3. Use the returned `avatar_url` as an image source in your application.

4

4. Link to `profile_url` if you want to show the user's Gravatar profile.

About This Tool

The Gravatar Lookup endpoint generates Gravatar URLs for any email address. Gravatar (Globally Recognized Avatar) is a service that maps email addresses to profile images. Many platforms (WordPress, GitHub, Stack Overflow) use Gravatar to display user avatars.

Provide an email address and optional image size, and get back the avatar URL, profile URL, and MD5 hash. The avatar URL includes a fallback to an identicon (auto-generated geometric pattern) if no custom avatar is set.

Why Use This Tool

Frequently Asked Questions

What if the email doesn't have a Gravatar?
The returned `avatar_url` includes `d=identicon` as the default, so it will always return an image — either the user's custom avatar or an auto-generated identicon pattern unique to their email hash.
How is the email hash generated?
The email is trimmed, lowercased, and then MD5-hashed. This matches Gravatar's standard hashing algorithm and can be used to construct Gravatar URLs client-side as well.
Does this endpoint make external API calls?
No, the avatar and profile URLs are generated locally using the standard Gravatar URL format. No external requests are made, making this endpoint very fast.

Start using Gravatar Lookup now

Get your free API key and make your first request in under a minute.