For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Resources
Get started
ReferenceGuidesExamplesChangelog
ReferenceGuidesExamplesChangelog
  • Designer API
    • Introduction
    • Getting Started
    • Webflow CLI
    • Error Handling
    • App Modes
  • Elements
    • Creating & Retrieving Elements
    • Element Properties & Methods
    • Element Types & Methods
  • Styles
    • Managing Style Properties
    • Managing Variable Modes
  • Components
  • Variables & Collections
    • Variable Collections
    • Variables
    • Variable Modes
  • Assets
  • Pages & Folders
  • Utilities
      • Get site information
      • Resize the extension
      • Close the extension
      • Get the current breakpoint
      • Get user ID token
      • Get user's Designer capabilities
      • Get the current Designer mode
      • Check for a Designer mode
      • Get the Designer's pseudo-state
      • Get launch context
      • Get app subscriptions
      • Get theme
      • Get theme styles
    • User Events & Notifications
    • App Intents & Connections
  • Additional Resources
    • API Playground
    • FAQs
LogoLogo
Resources
Get started
On this page
  • webflow.getSiteInfo()
  • Syntax
  • Returns
  • Example
UtilitiesSite Information & Settings

Get site information

Was this page helpful?
Previous

Resize the extension

Next
Built with

webflow.getSiteInfo()

Get metadata about the current site.

Syntax

1webflow.getSiteInfo(): Promise<{
2 siteId: string;
3 siteName: string;
4 shortName: string;
5 isPasswordProtected: boolean;
6 isPrivateStaging: boolean;
7 workspaceId: string;
8 workspaceSlug: string;
9 domains: Array<{
10 url: string;
11 lastPublished: string | null;
12 default: boolean;
13 stage: "staging" | "production";
14 }>;
15}>

Returns

A Promise that resolves to a record containing information about the site that’s currently open in the Designer. The record has the following properties:

PropertyTypeDescription
siteIdstringThe unique ID of the current Webflow site.
siteNamestringThe name of the current Webflow site.
shortNamestringThe short name of the current Webflow site.
isPasswordProtectedbooleanWhether the current site is password protected.
isPrivateStagingbooleanWhether the current site is private staging.
domainsArray<{url: string, lastPublished: string | null, default: boolean, stage: "staging" | "production"}>An array of objects containing information about the domains associated with the current site.
workspaceIdstringThe unique ID of the workspace that the current site belongs to.
workspaceSlugstringThe unique slug of the workspace that the current site belongs to.

Example

1const siteInfo = await webflow.getSiteInfo();
2
3console.log("Site ID:", siteInfo.siteId);
4console.log("Site Name:", siteInfo.siteName);
5console.log("Short Name:", siteInfo.shortName);
6console.log("Is Password Protected:", siteInfo.isPasswordProtected);
7console.log("Is Private Staging:", siteInfo.isPrivateStaging);
8console.log("Domains:", siteInfo.domains);
9console.log("Workspace ID:", siteInfo.workspaceId);
10console.log("Workspace Slug:", siteInfo.workspaceSlug);

Try this example