Module:ResolveEntityId/doc

Usage
Functions similarly to mw.wikibase.resolvePropertyId, but for Wikidata entities instead of properties.

Returns an entity id for the given label or id. This allows using the entity's labels instead of ids in all places. If no entity was found for the label or id, or if the label is ambiguous, a nil value is returned.

When attempting to resolve a label, only entities with English Wikipedia sitelinks are considered in the search. If a label exists in Wikidata, but does not have the requisite language sitelink, a nil value is returned.

Call from within a module (_id)
Example calls within a module might look like the following:

Use from within a template (entityid)
The following will return the entity id (or  if the ID doesn't exist):

The following will return the entity id (or the alternate text if the ID doesn't exist):

Deprecated (_entityid)
The  function, which required that the frame be passed as the first argument, has been deprecated because workarounds are no longer needed for phab:T143970.