Every APIs.json document starts with a small property that is easy to treat as an afterthought: aid. It names the provider, and each of the provider’s APIs gets its own aid built on top of it — stripe for the provider, stripe:payment-intents for one of its APIs. It looks like a label. It is actually a key, and once a catalog starts using it as one, getting it wrong costs a lot more than a bad label ever would.
APIs.json has carried aid since its early versions, but only by convention: lowercase, hyphens, a colon between provider and API. The new API Commons aid specification, a 0.1.0 draft dated November 12, turns that convention into a standard with a grammar, a JSON Schema and a reference linter. The reason it exists now is scale. The apis.io catalog holds 41,092 apis.yml documents and 193,626 API aids, according to the census in that repository, and that is enough to see where the convention holds and where it breaks. Mostly it holds. Where it breaks is in the places that matter for indexing: missing identifiers, prefixes that point at the wrong provider, and the same aid claimed by two documents.
What it looks like
aid: example-weather-com
name: Example Weather API
apis:
- aid: example-weather-com:forecasts
name: Forecasts API
- aid: example-weather-com:historical-observations
name: Historical Observations API
x-aid-aliases:
- example-weather-com:example-weather-com-history-api
The provider aid sits at the top of the apis.json or apis.yml document, and every entry in apis[] carries its own aid, prefixed with the provider’s. The grammar is deliberately strict: lowercase letters and digits joined by single hyphens, a provider aid of 2 to 64 characters, an API aid of at most 128. No dots, no underscores, no uppercase. A third colon-separated segment is reserved for later and must not be used yet.
Why it matters
For a catalog, the aid is the primary key, the page slug, the join key between artifacts — the OpenAPI, the AI preferences, the plans and rules all hang off it — and the handle for prefix search and filtering. Search stripe: and you get Stripe’s APIs because the identifier says so, not because a fuzzy match guessed.
For consumers, it means a link to an API stays a link. If a provider renames something and the catalog edits the aid in place, every URL moves and every bookmark, citation and integration that pointed at it breaks.
For agents, it matters even more. An agent reading an API doesn’t have the context a person has to notice that Stripe, stripe-api and stripe-com are the same company. A stable, predictable identifier is how one artifact can say, unambiguously, which API it is about — and how an agent can carry a reference from one step of a task to the next without guessing.
Getting it right
The specification splits its rules in two. Eight MUST rules make an aid usable as a key; a few SHOULD rules make it meaningful. A few practical points fall out of them:
- Derive the provider aid from the domain.
typesafe.aibecomestypesafe-ai. Dropping the TLD is fine only when what’s left is unambiguous and not a common word —stripeworks, but baretypesafematched two unrelated companies. - Name the API, not the provider or the format.
stripe:customers, notstripe:stripe-customers. The prefix already says whose it is. Skip a trailing-api, and keepopenapi,swaggerandspecout of the slug. - Make the prefix match. An API aid’s prefix must equal the document’s provider aid, and an API aid appears only once in a document. Within a catalog, an aid belongs to one owner.
- A rename is an alias, never an edit. Write the new aid, put the old one in
x-aid-aliases, and let the catalog redirect. An aid is never reissued to something else.
There is an honest tension in that last group. Plenty of existing aids break the SHOULD rules — stripe:stripe-accounts-api is a legal 0.1 aid. The specification’s answer is to apply the naming advice when an aid is created, not to rename a catalog in bulk, because a tidy rename that breaks every link is worse than an untidy name that keeps working. A catalog can compute a cleaner display form for search results, but that display form is never stored as the identifier.
This is a draft, and it is the least glamorous element in the commons. But it is the one everything else points at. You can read the element at apicommons.org/common/aid, and if you think the rules are wrong or missing something, suggest a change at github.com/api-commons/api-commons.