--- title: Widget API reference description: Service Portal includes client and server side APIs to use in widget client and server scripts.Global variable and functions available in widget client and server scripts. locale: en-US canonical_url: https://www.servicenow.com/docs/r/platform-user-interface/service-portal/widget-api-reference.html release: brazil product: Service Portal classification: service-portal topic_type: reference last_updated: "2026-09-10" reading_time_minutes: 2 breadcrumb: [Developing custom widgets, Service Portal, Configure UIs and portals, Configure user experiences] --- # Widget API reference Service Portal includes client and server side APIs to use in widget client and server scripts. ## Service Portal client-side APIs These are Service Portal APIs that you can use in a widget client controller. See the API reference for detailed class and method information.
| Class | Description |
|---|---|
| [spAriaUtil](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/spAriaUtil-API.md) | Shows messages on a screen reader. |
| [spContextManager](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/spContextManagerAPI.md) | Makes data from a Service Portal widget available to other applications and services in a Service Portal page. For example, pass widget data to Agent Chat when it opens in a Service Portal page. |
| [spUtil](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/spUtilAPI.md) | Utility methods to perform common functions in a Service Portal widget client script. |
| [spModal](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/SPModal-API.md) | Shows alerts, prompts, and confirmation dialogs in Service Portal widgets. The spModal class is available in Service Portal client scripts. |
| Class | Description |
|---|---|
| [GlideSPScriptable](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/server-api-reference/c_GlideSPScriptableScopedAPI.md) | The GlideSPScriptable API provides methods to interact with data and perform record operations in Service Portal widgets. |
| [GlideSPSearchAnalytics](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/server-api-reference/GlideSPSearchAnalyticsAPI.md) | The GlideSPSearchAnalytics API provides methods to generate search analytics from custom ServiceNow search widgets. |
| [SPScriptedFacet - Scoped](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/server-api-reference/SPScriptedFacetScopedAPI.md) | Defines facet items, filters, or mapped queries for a facets object. |
| [SPScriptedFacetService - Scoped](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/server-api-reference/SPScriptedFacetServiceScopedAPI.md) | Generates a multi-choice or single-choice facets object for an advanced search source. |
| [SPSEOUtilsSNC - Global](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/server-api-reference/SPSEOUtilsSNCAPI.md) | Return human-readable URLs for a specific page, or for the current page, based on the transaction request. |
| [SPWidgetAccessControl - Global](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/api-reference/server-api-reference/SPWidgetAccessControlGlobalAPI.md) | Check whether a provided table is granted access to a widget to ensure that a widget is securely accessed by an intended audience. |