# How do I convert a CAGE code to a UEI? Look the CAGE code up in a SAM.gov registration: the registration that lists it carries the UEI. On SAM.gov that is an entity search by CAGE; in this API it is one 1-credit call to /cage/{cage}, which returns the UEI, legal name, status, expiry and exclusion flag together. CAGE codes are assigned by the Defense Logistics Agency and identify a physical location; the UEI identifies the registered entity.Checked on 2026-11-15.Official source: [DLA CAGE](https://cage.dla.mil/) | CAGE issuer | Defense Logistics Agency | | --- | --- | | CAGE format | 5 characters | | UEI format | 12 characters | | Example | CAGE 53U20 = UEI UAVDK5WWYDZ5 | ## The answer in detail CAGE codes are assigned by the Defense Logistics Agency and identify a physical location; the UEI identifies the registered entity. Every SAM.gov registration with a CAGE code links the two, so the conversion is a lookup, not a calculation.It fails in two cases: the CAGE belongs to a firm that is not registered in SAM.gov (it may still exist in DLA's CAGE system), or the code was retired. Of the 881,370 registrations loaded here, 785,998 carry a CAGE code.For foreign firms the equivalent is an NCAGE code, issued through NATO; SAM.gov registrations of foreign entities show it in the same field. ## How the options compare | Option | Price | Access and limits | Coverage and history | Best for | Checked | | --- | --- | --- | --- | --- | --- | | [SAM.gov APIs (official)](https://open.gsa.gov/api/entity-api/) | Free | 10 requests a day with no SAM.gov role, 1,000 with a role or a non-federal system account; keys expire every 90 days | The live, authoritative record: entities, opportunities, exclusions, contract awards, hierarchy, subawards | Anyone who needs the official record itself, at low volume | 2026-11-12 | | [GovCon API (govconapi.com)](https://govconapi.com/pricing) | Developer $19/mo, Pro $39/mo; 14-day trial | 1,000 requests an hour (50 a minute burst); trial 50 a day | 12,265,150 contracts and 758,552 opportunities from FY2025; 904,090 entities, monthly | Developers who want the lowest entry price and FY2025+ history | 2026-11-15 | | [samgovapi.io](https://samgovapi.io/pricing) | Free (100 credits a month, no card); Developer $49/mo, Pro $149/mo, Scale $499/mo | 20 to 180 requests a minute by plan, no daily cap; REST, MCP and keyless MCP search | 881,370 entities (1 Nov 2026 extract), 74,420 notices, 169,191 exclusions, 114,954 awards since 1 Oct 2026 | Developers and AI agents who want entities, bids and exclusions joined in one API | 2026-11-15 | ## Where samgovapi.io is the weaker choice - CAGE codes outside SAM.gov registrations are only on cage.dla.mil. - Entity data comes from the SAM.gov monthly public extract (this one dated 1 Nov 2026; the next is due about 17 Dec 2026), so a registration renewed since then still shows its old expiry date until the next load. The live SAM.gov API shows it the same day. ## Try it CAGE 53U20 resolves to UEI UAVDK5WWYDZ5 (Booz Allen Hamilton, Stafford, VA) in the 1 Nov 2026 extract. ``` curl "https://samgovapi.io/api/v1/cage/53U20" \ -H "Authorization: Bearer $SAMGOVAPI_API_KEY" # No key needed: the hosted MCP server's fetch tool curl -s https://samgovapi.io/api/mcp -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"fetch","arguments":{"id":"cage:53U20"}}}' ``` ## Questions Is a CAGE code the same as a UEI?No. The UEI identifies the entity in SAM.gov; the CAGE code identifies a location and comes from DLA.Can I convert a UEI to a CAGE code too?Yes, the same registration lists both, so /entities/{uei} returns the CAGE code. ## Related - [CAGE code lookup](https://samgovapi.io/cage-code-lookup) - [How to find a CAGE code](https://samgovapi.io/guides/how-to-find-cage-code) - [API docs](https://samgovapi.io/docs) - [Pricing](https://samgovapi.io/pricing) - [Answers](https://samgovapi.io/answers)Updated 2026-11-15. Sources checked 2026-11-15.Independent. Not affiliated with, endorsed by or sponsored by GSA, SAM.gov or any U.S. government agency. Registering in SAM.gov is free at sam.gov.

---

HTML version: https://samgovapi.io/answers/cage-code-to-uei . Markdown: https://samgovapi.io/answers/cage-code-to-uei.md

Independent. Not affiliated with, endorsed by or sponsored by GSA, SAM.gov or any U.S. government agency. Registering in SAM.gov is free at sam.gov.

Get a free API key: https://samgovapi.io/sign-up?ref=ai-claudebot
