How to get an Instagram profile picture by username

Instagram's Basic Display API is gone, the Graph API only covers business accounts, and scraping from cloud IPs gets rate-limited. Here's what actually works in 2026.

You have an Instagram handle and want the profile picture in your UI. In October 2026 there is no easy answer, and anyone telling you otherwise is selling proxies. Here is the honest state of things.

The official route: Graph API Business Discovery

Meta shut down the Instagram Basic Display API in December 2024. What is left is the Instagram Graph API, which is built for Business and Creator accounts. Its Business Discovery feature can read another account's public profile fields, including the profile picture, but:

If your product is a social media tool that already has Meta app review behind it, use this. It is the only route that works reliably.

Copying the CDN URL

The image itself is served from Instagram's CDN. Those URLs are signed and expire, so a URL you copy today breaks later. You cannot build one from the username either. Storing them is a recipe for broken images.

Reading the public profile

Every unofficial option, from a script you write to a hosted avatar API, works by fetching the public profile page. Instagram rate-limits that hard, and it is especially strict with requests from cloud and CDN IP ranges. Services that still manage it, like unavatar, route Instagram through paid residential proxies and pass that cost on.

avatarapi runs on Cloudflare, and Instagram rate-limits Cloudflare's IPs. So right now most /instagram/<username> lookups fail and return an error instead of an image. We would rather say that here than have you find out in production.

What to do instead

If you need Instagram specifically, use the Graph API for business accounts and accept that personal accounts are off limits.

If what you actually need is a face next to a name, ask for a handle on a platform that cooperates. GitHub, Bluesky, Twitch, and X all resolve reliably:

<img
  src="https://avatarsapi.com/github/torvalds?size=96"
  onerror="this.onerror=null; this.src='/default-avatar.svg'"
  alt="">

Whatever you pick, keep the onerror fallback. Any lookup can miss.

The same URL shape works for 72 platforms, with notes on which ones are flaky.

Try it: put https://avatarsapi.com/github/torvalds in an <img src>. No key, no signup. Read the docs or create a Project.