webflow.getSiteInfo()

Get metadata about the current site.

Syntax

1webflow.getSiteInfo(): Promise<{siteId: string; siteName: string; shortName: string}>

Returns

A Promise that resolves to a record containing information about the site that is currently open in the Designer - with the following properties


siteId : string

The unique ID of the current Webflow site.


siteName: string

The name of the current Webflow site.


shortName: string

The the short name of the current Webflow site.


Example

1const siteInfo = await webflow.getSiteInfo();
2console.log('Site ID:', siteInfo.siteId);
3console.log('Site Name:', siteInfo.siteName);