How to Find an Instagram User ID (Several Methods)
Published
Find an Instagram user ID, also called the PK, from page source, a lookup tool or the Graph API. See how it differs from the @username and what fails.
An Instagram user ID is the numeric identifier behind an account, distinct from its @username. You can find it by reading the embedded profile data in a public profile's page source, by using a lookup tool, or, for accounts you manage, through the Instagram Graph API. The number is permanent; the username is not.
Definition: the Instagram user ID, also called the PK
An Instagram user ID is the numeric primary key Instagram assigns to an account when it is created. In Instagram's own data structures the field is often named pk, short for primary key, which is why developers working with Instagram data use "PK" and "user ID" to mean the same value. It is a decimal integer, with length varying by account age: accounts created in Instagram's early years carry comparatively short numbers, while newer accounts carry considerably longer ones. The ID is immutable. Changing the username, the display name, the bio, the profile photo, or switching between personal, creator and business account types leaves it unchanged. Because of that permanence it is the correct value to record whenever you need a durable reference to an account. It is not a credential and confers no access: knowing an account's PK does not let you read content the owner has restricted, and it is not usable to log in or to message anyone.
How the user ID differs from the @username
The @username is the only account identifier Instagram shows in its interface. It appears in the profile URL as instagram.com/username, in mentions, and in search. It is also fully editable: a user can change it from settings, and once released the old handle becomes available for someone else to claim.
That reassignability is the problem. A record stored by username can point at a different person entirely after a handle change, not merely at nothing. If you maintain lists of creators, partners, or accounts you monitor, storing the numeric ID alongside the handle protects you from silently tracking the wrong account.
The same reasoning applies on every platform, which is why the practice generalises. A Facebook UID plays the same role for Facebook accounts, and both TikTok identifiers behave the same way: the handle moves, the number does not.
Method 1: read it from the public profile page source
Instagram serves public profile pages with account data embedded in the HTML. Opening the page source and searching for the identifier field will often reveal the number.
- Open the public profile in a desktop browser.
- View the page source, typically with Ctrl+U on Windows or Option+Command+U on macOS.
- Search within the source for
"profile_id", or for"id":"appearing near the username. - The numeric value adjacent to that field is the user ID.
Two caveats are worth stating plainly. Instagram changes its front-end markup regularly, so the specific field name that works today may not be present in a future revision; if a search string returns nothing, that is more likely a markup change than a missing ID. And this works only on accounts whose profiles are served publicly. A private account's profile page does not include the same data for a visitor who has not been approved as a follower.
Method 2: use a lookup tool
For one-off lookups, a tool is faster and does not break when markup shifts. The Instagram UID finder on 2uid.net takes a username or profile URL and returns the numeric identifier. The underlying operation is the same resolution step described above, performed server-side.
Set expectations honestly about scope. Lookup tools work with what Instagram serves publicly. They do not grant visibility into private accounts, and they are not a route around a privacy setting. If an account is private, treat its identifier as something you should not expect to obtain.
Method 3: the Instagram Graph API, for accounts you own or manage
Instagram's official API is the authoritative source and the right choice for anything production-facing, though it operates on a different model than casual lookups do.
Instagram's platform, documented in Meta's Instagram Platform developer documentation, is built around authorization. You connect an Instagram professional account, obtain an access token, and then read data about that account. The API refers to the connected account by an identifier returned during the connection flow, and for Business accounts linked to a Facebook Page the Instagram account ID is discoverable through that Page.
Crucially, the API does not provide a general lookup for arbitrary accounts. There is a Business Discovery capability that lets a connected professional account read limited public data about other professional accounts by username, but it is restricted in scope and does not extend to personal accounts. If your plan requires API access to accounts that have not authorized you and are not professional accounts, that plan does not have a compliant implementation.
Comparison of the three approaches
| Method | Works on accounts you do not own | Durability | Setup required | Best for |
|---|---|---|---|---|
| Page source inspection | Public accounts only | Low, markup changes | None | One-off checks, verifying a tool's output |
| Lookup tool | Public accounts only | Moderate | None | Quick lookups without technical steps |
| Instagram Graph API | Only with authorization, or limited Business Discovery | High, documented and supported | App registration, access token, review | Production integrations and analytics |
Why would you need an Instagram user ID?
Several real tasks require it. Scheduling and analytics platforms store accounts by numeric ID so their records survive handle changes. Advertisers connecting Instagram to Meta's ads tooling work with account identifiers when debugging which asset is attached to which campaign. Anyone handling brand protection uses the ID to distinguish an impersonation account from the genuine one, since a copycat can duplicate the display name and photo but not the ID.
There is also a mundane but common case: confirming you have the right account before a transaction. Creator marketplaces and partnership workflows involve a lot of handle-passing, and handles are easy to mistype in ways that still resolve to a real account. Checking the numeric ID removes that ambiguity.
Things that do not work, despite being widely suggested
A short list, because time wasted on these is common. Instagram's own app and web settings do not display your numeric user ID anywhere; there is no screen to look at. The ID is not derivable from the username by any transformation, since it is assigned at registration rather than computed. And no method obtains the ID of a private account from outside: the data is simply not served to you.
Avoid tools that ask you to log in with your Instagram credentials to perform a lookup. Handing account credentials to a third party is a security problem regardless of whether the lookup itself is legitimate, and no genuine ID lookup needs your password.
Frequently asked questions
What does PK mean on Instagram?
PK stands for primary key and refers to the account's numeric user ID. It is the field name Instagram's internal data structures use, so developers and tool documentation often say PK where general writing would say user ID. The two terms refer to the same number.
Can I find my own Instagram user ID in the app?
Not directly, since Instagram does not display it in settings. For your own account you can read it from your public profile's page source, use the 2uid.net Instagram UID finder, or connect the account through the Graph API if it is a professional account.
Does the Instagram user ID change if I change my username?
No. The numeric ID is assigned once and never reissued. Changing the username, switching account types, or updating any profile detail leaves it the same, which is why it is the dependable identifier to store.
How long is an Instagram user ID?
It varies with account age. Early accounts have shorter numbers and newer ones have longer, so length is a rough signal of when an account was created rather than a fixed format. Do not validate IDs by digit count.
Can I get the user ID of a private Instagram account?
Assume not. Private accounts do not serve the same profile data to non-followers, and claims that a tool retrieves identifiers for locked accounts should be treated as unverified. If an account is private, the respectful and accurate answer is that the ID is not available to you.
Is an Instagram user ID the same as a Facebook ID?
No. They are separate platforms with separate ID spaces, even though both are owned by Meta. An account linked across both has an Instagram ID and a Facebook identifier, and the two numbers are unrelated.
Do I need an Instagram user ID for the Graph API?
You need the Instagram account ID the API returns during the connection flow, which is what the API uses to address the account. You do not usually type an ID in by hand, because the authorization process supplies it.