APIsChangelog
Log In

Get site information

webflow.getSiteInfo()

Get metadata about the current site.

Syntax

webflow.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

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