younifyd
Menu

Get Content

Query content entries by model

GET/content/{model}

Use it in a workflow

  1. Add a step and choose the Builder.io connector.
  2. Pick the Get Content action (under Content API).
  3. Fill in the fields below, then reference the result from later steps as {{getContent.response.data}}.

Request

Path parameters

modelstringrequired

The name of the Builder.io content model to query.

Query parameters

apiKeystringrequired

Your public Builder.io API key.

limitinteger

Maximum number of results to return. Maximum value is 100.

Default 10

offsetinteger

Number of results to skip for pagination.

Default 0

querystring

MongoDB-style JSON query filter applied to content fields. Example: {"data.slug":{"$eq":"my-page"}}

userAttributesstring

JSON object of user attributes used for targeting and personalization. Example: {"urlPath":"/about","country":"US"}

urlstring (uri)

The current page URL used for targeting by urlPath. Used as a shorthand for setting userAttributes.urlPath.

localestring

The locale code for localized content retrieval (e.g., "en-US").

enrichboolean

When true, enriches references and Symbol blocks with their full content data instead of returning only IDs.

Default false

fieldsstring

Comma-separated list of fields to include in the response. Reduces payload size by returning only specified fields.

includeRefsboolean

When true, includes referenced content objects inline.

Default false

cacheSecondsinteger

Override the CDN cache duration in seconds.

Response

Returns 200 with an object. Read it in later steps with {{getContent.response.data.<field>}}.

resultsarray<object>
@versioninteger

Schema version of the content entry.

idstring

Unique identifier for the content entry.

namestring

Human-readable name of the content entry.

publishedstring

Publication status of the content entry.

One ofpublisheddraftarchived

modelIdstring

The model type identifier for this content.

prioritynumber

Sort priority used when multiple entries match a query.

firstPublishedinteger

Unix timestamp (milliseconds) when first published.

lastUpdatedinteger

Unix timestamp (milliseconds) of the last update.

startDateinteger

Unix timestamp (milliseconds) after which the entry becomes active. Used for scheduled publishing.

endDateinteger

Unix timestamp (milliseconds) after which the entry is no longer served.

variationsobject

Map of variation IDs to variation data for A/B testing.

testVariationIdstring

ID of the winning or current test variation.

testVariationNamestring

Name of the current test variation.

dataobject3 fields

The model-specific field data for this content entry. Structure varies by model definition.

json
{
  "results": [
    {
      "@version": 2,
      "id": "abc123def456abc123def456abc12345",
      "name": "Home Page",
      "published": "published",
      "modelId": "page",
      "priority": 0,
      "firstPublished": 1700000000000,
      "lastUpdated": 1717000000000,
      "startDate": 1717000000000,
      "endDate": 1719600000000,
      "variations": {},
      "testVariationId": "string"
    }
  ]
}

Need more? See the Builder.io guide for connection setup and behaviour shared by every action.

Was this page helpful?