Payload CMS icon

Payload CMS

Interact with Payload CMS collections and globals

Global → Get

AI-generated

Summary

Retrieve global data from Payload CMS

Inputs

  • global (required) — The slug or name of the global to fetch
  • additionalOptions.depth — Depth to populate relationships in the response
  • additionalOptions.limit — Maximum number of documents to return
  • additionalOptions.page — Page number for pagination
  • additionalOptions.sort — Sort field (use - for descending)
  • additionalOptions.where — JSON filter clause
  • additionalOptions.select — Comma-separated list of fields to select
  • additionalOptions.locale — Locale for localized content
  • additionalOptions.upload — Binary property name to upload with the request
  • additionalOptions.query — Query parameters to append to the request URL

Output shape

An array of result objects, each containing a json field with the HTTP response data or an error object

Results may be paginated; optional fields can be omitted; errors are returned as objects when continueOnFail is disabled

Examples

Example 1: Fetch site settings

Set Global to 'siteSettings', keep defaults, execute

Example 2: Retrieve localized strings with depth 2

Global = 'locales', additionalOptions.depth = 2, execute

Example 3: Paginated fetch of 5 items

Global = 'categories', additionalOptions.limit = 5, additionalOptions.page = 1, execute

Links

Discussion