Skip to content

How to query (search) structured content records via the Content API

The Content API exposes SCT records through two read-only endpoints: one for listing records by schema type, and one for fetching a single record by ID. This is the read path for headless and hybrid implementations. Think server-rendered sites, mobile apps, or any client that fetches structured content outside of PageBuilder.

For the PageBuilder content source approach, see How to Embed Structured Content Records in PageBuilder.

Before you start

You need:

  • Your Arc XP organization ID (org)
  • A bearer token with Content API read access
  • A schema with at least one published record
  • The schema name (e.g., events). This is the identifier from the schema definition, not its display name

Records only appear in the Content API after they are published. Draft records stay in the Draft API.

How records appear in responses

A Content API response for an SCT record includes two parts: server-assigned metadata and the field values from your schema.

{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"schema_name": "events",
"website": "the-daily-planet",
"created_at": "2026-05-01T14:30:00Z",
"updated_at": "2026-06-10T09:15:00Z",
"fields": {
"title": "Arc XP Summit 2026",
"event-date": "2026-09-15T09:00:00Z",
"location": {
"lat": 38.9072,
"lon": -77.0369
},
"ticket-url": "https://example.com/tickets"
}
}

The fields object contains the keys defined in your schema. The shape is consistent: you always get the same keys, whether or not a value was provided for a field.

Fetch a list of records

Terminal window
curl -G "https://api.{org}.arcpublishing.com/content/v5/search/schemas/" \
-H "Authorization: Bearer {your-token}" \
--data-urlencode "schema_name=events" \
--data-urlencode "website={your-site}" \
--data-urlencode "size=25" \
--data-urlencode "page=1"

Replace {org} with your organization ID and {your-site} with your site identifier.

The response is a paginated envelope:

{
"total": 87,
"documents": [
{ ... },
{ ... }
]
}

total is the count of all matching records. documents is the current page.

Query parameters:

ParameterTypeDescription
schema_namestringRequired. Schema identifier (e.g., events).
websitestringRequired. Your site identifier.
sizeintegerRecords per page. Default 25, max 100.
pageintegerPage number, starting at 1.
sortstringField key and direction: event-date:asc or title:desc. Field must have search_settings.retrieval set.
qstringStructured filter expression: field:value pairs, whitespace-separated, implicit AND. Not a free-text search box.

Fetch a single record by ID

Terminal window
curl -G "https://api.{org}.arcpublishing.com/content/v5/search/schemas/by-id/" \
-H "Authorization: Bearer {your-token}" \
--data-urlencode "id=a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
--data-urlencode "schema_name=events" \
--data-urlencode "website={your-site}"

Returns a single document object. You get a 404 if the record does not exist or hasn’t been published yet.

Filtering and sorting with indexed fields

Only fields with a search_settings.retrieval array set in the schema can be used in sort or q. Requesting a filter on a field with no retrieval array returns an error.

q is a structured filter expression: field:value pairs, whitespace-separated, implicit AND. That supports equality, range, and geo-distance queries against any field with search_settings.retrieval set:

  • String equality: schema_content.category:"music"
  • Number or boolean equality: schema_content.paid:true
  • Range, inclusive: schema_content.event_date:[2026-07-11 TO 2026-07-13]
  • Range, exclusive: schema_content.venue_capacity:{100 TO 500}
  • Open-ended range: schema_content.event_date:[2026-07-11 TO *]
  • Geo distance: schema_content.location_geo:33.77,-84.37,8km

Valid retrieval index kinds: keyword, semantic, geo, range. Which kinds are valid depends on the field’s type see Developer Guide for the full type-to-kind table. Range syntax and range-based sort only work on a field whose retrieval array includes "range".

To see which fields are indexed, fetch your schema definition:

Terminal window
curl "https://api.{org}.arcpublishing.com/draft/v1/schema-type/events" \
-H "Authorization: Bearer {your-token}"

Any field with a search_settings.retrieval array is queryable via the Content API. A field with only search_settings.editorial set is searchable in Data Manager but invisible to this API.

Examples

Fetch all events sorted by date

Terminal window
curl -G "https://api.{org}.arcpublishing.com/content/v5/search/schemas/" \
-H "Authorization: Bearer {your-token}" \
--data-urlencode "schema_name=events" \
--data-urlencode "website={your-site}" \
--data-urlencode "sort=event-date:asc" \
--data-urlencode "size=10"

Returns the next 10 events sorted chronologically. The event-date field must have search_settings: { "retrieval": ["range"] } in the schema for this sort to work (see the sort-mechanics caveat above).

Search events by keyword

Terminal window
curl -G "https://api.{org}.arcpublishing.com/content/v5/search/schemas/" \
-H "Authorization: Bearer {your-token}" \
--data-urlencode "schema_name=events" \
--data-urlencode "website={your-site}" \
--data-urlencode "q=summit" \
--data-urlencode "size=10"

Filters to records where category equals "music". Requires category to have search_settings: { "retrieval": ["keyword"] } in the schema.

Combine search and sort

Terminal window
curl -G "https://api.{org}.arcpublishing.com/content/v5/search/schemas/" \
-H "Authorization: Bearer {your-token}" \
--data-urlencode "schema_name=events" \
--data-urlencode "website={your-site}" \
--data-urlencode "q=summit" \
--data-urlencode "sort=event-date:asc"

Filters by keyword, then sorts the matching results by date.

Fetch a specific record

Get the id from a list response, or store it when the record is created via the Draft API.

Terminal window
curl -G "https://api.{org}.arcpublishing.com/content/v5/search/schemas/by-id/" \
-H "Authorization: Bearer {your-token}" \
--data-urlencode "id=a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
--data-urlencode "schema_name=events" \
--data-urlencode "website={your-site}"

Pagination

Use size (up to 100) and page to walk through results.

# Page 1
?schema_name=events&website=my-site&size=50&page=1
# Page 2
?schema_name=events&website=my-site&size=50&page=2

Calculate total pages from the first response: Math.ceil(total / size).