List all records
To retrieve a collection of records, send a GET request to the /items
endpoint. The collection is paginated, so make sure to iterate over all the pages if you need every record in the collection!
Begin by reading the Introduction to records guide to familiarize yourself with field types, API response modes, and the concepts of block manipulation!
Response modes: Regular vs. Nested
The GET /items
endpoint, just like the single record endpoint, supports two different response modes that control how block fields are returned in the JSON payload. You can switch between them using the nested query parameter.
- Regular mode (default): This is the most efficient mode for listing multiple records. Any block fields (like Modular Content) will contain an array of block IDs, not the full block content. This keeps the response size small and fast.
- Nested mode (
nested=true
): This mode returns the complete content for any block fields. Instead of just IDs, the API will return full block objects, including all their attributes. This is useful when you need to display the blocks' content immediately without making additional API calls, or to read existing content and then make an update.
Please note that if you don't specify any parameters, the API will return return the first 30 records. They can be from any model in your project.
import { buildClient, inspectItem, type ItemTypeDefinition,} from "@datocms/cma-client-node";
type EnvironmentSettings = { locales: "en" };
/* * Article * ├─ title: string * └─ content: text */
// 👇 Definitions can be generated automatically using CLI: https://www.datocms.com/cma-ts-schema
type Article = ItemTypeDefinition< EnvironmentSettings, "T6TO3fbwRdyhcljYV8fyhg", { title: { type: "string" }; content: { type: "text" }; }>;
async function run() { // Make sure the API token has access to the CMA, and is stored securely const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const results = await client.items.list<Article>({ version: "current" });
console.log("-- LISTING ITEMS --"); results.forEach((item) => { console.log(inspectItem(item)); });}
run();
Showing the default number of results (30 records) from any model
-- LISTING ITEMS --└ Item "cEzRZmM3SyeHmAxS5KE9dg" (item_type: "T6TO3fbwRdyhcljYV8fyhg") ├ title: "Third Article" └ content: "This is the content of the third article."
└ Item "f2Ev8ybUTq6DFk348JeW1w" (item_type: "T6TO3fbwRdyhcljYV8fyhg") ├ title: "Second Article" └ content: "This is the content of the second article."
└ Item "VJ2-B9zJQPG-xdwU-vJdOw" (item_type: "T6TO3fbwRdyhcljYV8fyhg") ├ title: "First Article" └ content: "This is the content of the first article."
When nested: true
, the maximum number of records you can request at once is restricted to 30, in contrast to the standard 500.
import { buildClient, inspectItem, type ItemTypeDefinition,} from "@datocms/cma-client-node";
type EnvironmentSettings = { locales: "en" };
/* * BlogPost * ├─ title: string * └─ content: structured_text * ├─ HeroBlock: headline, subtitle * ├─ TextBlock: content * └─ ImageBlock: image, caption */
// 👇 Definitions can be generated automatically using CLI: https://www.datocms.com/cma-ts-schema
type HeroBlock = ItemTypeDefinition< EnvironmentSettings, "GURToKAcQIyC-rTypPeHTw", { headline: { type: "string" }; subtitle: { type: "text" }; }>;
type TextBlock = ItemTypeDefinition< EnvironmentSettings, "Y5l8wbEDQLKj7qm22CTucQ", { content: { type: "text" }; }>;
type ImageBlock = ItemTypeDefinition< EnvironmentSettings, "ZsoQdbEVTkizaFPrama3IA", { image: { type: "file" }; caption: { type: "string" }; }>;
type BlogPost = ItemTypeDefinition< EnvironmentSettings, "U4jwHd5-RCy2ItsDuWLMTQ", { title: { type: "string" }; content: { type: "structured_text"; blocks: HeroBlock | TextBlock | ImageBlock; }; }>;
async function run() { // Make sure the API token has access to the CMA, and is stored securely const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const records = await client.items.list<BlogPost>({ nested: true, // But retrieve its nested block content as well version: "current", });
console.log("-- RECORDS WITH NESTED BLOCKS --"); records.forEach((item) => { console.log(inspectItem(item)); });}
run();
-- RECORDS WITH NESTED BLOCKS --└ Item "ZJ3ESh8pTBaRS5ED8loc2w" (item_type: "U4jwHd5-RCy2ItsDuWLMTQ") ├ title: "Understanding Modular Content" └ content ├ heading (level: 1) │ └ span "Welcome to Modular Content" ├ block │ └ Item "Sb5aNY5hQHaN_4KMU96H6A" (item_type: "GURToKAcQIyC-rTypPeHTw") │ ├ headline: "Hero Section" │ └ subtitle: "This is a hero block that introduces the content" ├ paragraph │ └ span "This blog post demonstrates how to work with structured text and modu..." ├ block │ └ Item "G_06E4v8SvqdChpFnEELxA" (item_type: "Y5l8wbEDQLKj7qm22CTucQ") │ └ content: "Modular content allows you to create flexible, reusable components that can b..." ├ block │ └ Item "T2lBvPruQwGAQTM9_ywm-g" (item_type: "ZsoQdbEVTkizaFPrama3IA") │ ├ image │ │ └ upload_id: "dLJdPzC3TW-mJXGo7K73Gg" │ └ caption: "A beautiful landscape showcasing the power of visual content" └ paragraph └ span "This concludes our example of nested blocks and structured content."
└ Item "T2lBvPruQwGAQTM9_ywm-g" (item_type: "ZsoQdbEVTkizaFPrama3IA") ├ image │ └ upload_id: "dLJdPzC3TW-mJXGo7K73Gg" └ caption: "A beautiful landscape showcasing the power of visual content"
└ Item "G_06E4v8SvqdChpFnEELxA" (item_type: "Y5l8wbEDQLKj7qm22CTucQ") └ content: "Modular content allows you to create flexible, reusable components that can b..."
└ Item "Sb5aNY5hQHaN_4KMU96H6A" (item_type: "GURToKAcQIyC-rTypPeHTw") ├ headline: "Hero Section" └ subtitle: "This is a hero block that introduces the content"
The following table contains the list of all the possible arguments, along with their type, description and examples values.
Query parameters
For Modular Content, Structured Text and Single Block fields. If set, returns full payload for nested blocks instead of IDs
Attributes to filter records
Record (or block record) IDs to fetch, comma separated. If you use this filter, you must not use filter[type]
or filter[fields]
"c89tCUarTvGKxA37acCEWA,aCiWeOsUT3mxY0KIzUfAhw"
Model ID or api_key
to filter. If you use this filter, you must not use filter[ids]
. Comma separated values are accepted, but you must not use filter[fields]
in this case
"cat,dog"
Textual query to match. You must not use filter[ids]
. If locale
is defined, search within that locale. Otherwise environment's main locale will be used.
"foo"
Same as GraphQL API records filters: you must use square brackets to indicate nesting levels. E.g. if you wanna filter by parent record in a tree of records, you must use filter[fields][parent][eq]=<ID_VALUE>
. Use snake_case for fields names. If locale
is defined, search within that locale. Otherwise environment's main locale will be used.
{ name: { eq: "Buddy" } }
When set, only valid records are included in the results.
"true"
When filter[query]
or field[fields]
is defined, filter by this locale. Default: environment's main locale
"it"
Parameters to control offset-based pagination
The (zero-based) offset of the first entity returned in the collection (defaults to 0)
200
The maximum number of entities to return (defaults to 30, maximum is 500)
Fields used to order results. You must specify also filter[type]
with one element only to be able use this option. Format: <field_name>_(ASC|DESC)
, where <field_name>
can be either the API key of a model's field, or one of the following meta columns: id
, _updated_at
, _created_at
, _status
, _published_at
, _first_published_at
, _publication_scheduled_at
, _unpublishing_scheduled_at
, _is_valid
, position
(only for sortable models). You can pass multiple comma separated rules.
"name_DESC"
Whether you want the currently published versions (published
, default) of your records, or the latest available (current
)
"current"
Returns
Returns an array of resource objects of type item
Other examples
To fetch a specific page, you can use the page
object in the query params together with its offset
and limit
parameters. They will still be from any model in your project.
To get 2 records starting from position 4, we should use: limit: 2
and offset: 3
(because record counting starts from 0)
import { buildClient, inspectItem, type ItemTypeDefinition,} from "@datocms/cma-client-node";
type EnvironmentSettings = { locales: "en" };
/* * BlogPost * ├─ title: string * ├─ content: text * └─ author: string */
// 👇 Definitions can be generated automatically using CLI: https://www.datocms.com/cma-ts-schema
type BlogPost = ItemTypeDefinition< EnvironmentSettings, "P--WAiOJQraTyQb3pwnNog", { title: { type: "string" }; content: { type: "text" }; author: { type: "string" }; }>;
async function run() { // Make sure the API token has access to the CMA, and is stored securely const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const twoRecords = await client.items.list<BlogPost>({ page: { limit: 2, offset: 3, }, version: "current", });
console.log("-- PAGINATED ITEMS --"); twoRecords.forEach((item) => { console.log(inspectItem(item)); });}
run();
-- PAGINATED ITEMS --└ Item "G9k168YbTietmuwlA7-evg" (item_type: "P--WAiOJQraTyQb3pwnNog") ├ title: "GraphQL Queries in DatoCMS" ├ content: "How to write efficient GraphQL queries to fetch your content." └ author: "Bob GraphQL"
└ Item "Wgx-4iIaTTWsjgj7kjxV1w" (item_type: "P--WAiOJQraTyQb3pwnNog") ├ title: "Using the Management API" ├ content: "A comprehensive guide to using the DatoCMS Content Management API." └ author: "Alice Engineer"
Instead of fetching a single page at a time, sometimes you want to get all the pages together.
You can do this using the client.items.listPagedIterator()
method with an async iteration statement, which will handle pagination for you. All the details on how to use listPagedIterator()
are outlined on this page.
Note that this will return records across all your models, unless you specify a filter. Unfiltered, this is useful for fetching all the records in your project (e.g. for backup or export purposes). To filter by IDs or models, see the other examples below.
import { buildClient, inspectItem, type ItemTypeDefinition,} from "@datocms/cma-client-node";
type EnvironmentSettings = { locales: "en" };
/* * Product * ├─ name: string * └─ price: float * * Category * ├─ name: string * └─ description: text * * Review * ├─ rating: integer * └─ comment: text */
// 👇 Definitions can be generated automatically using CLI: https://www.datocms.com/cma-ts-schema
type Product = ItemTypeDefinition< EnvironmentSettings, "GURToKAcQIyC-rTypPeHTw", { name: { type: "string" }; price: { type: "float" }; }>;
type Category = ItemTypeDefinition< EnvironmentSettings, "Y5l8wbEDQLKj7qm22CTucQ", { name: { type: "string" }; description: { type: "text" }; }>;
type Review = ItemTypeDefinition< EnvironmentSettings, "ZsoQdbEVTkizaFPrama3IA", { rating: { type: "integer" }; comment: { type: "text" }; }>;
async function run() { // Make sure the API token has access to the CMA, and is stored securely const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
// We'll be building up an array of all records using an AsyncIterator, `client.items.listPagedIterator()` const allRecords = [];
for await (const record of client.items.listPagedIterator< Product | Category | Review >({ version: "current" })) { allRecords.push(record); }
console.log("-- ALL RECORDS ACROSS ALL PAGES --"); allRecords.forEach((item) => { console.log(inspectItem(item)); });}
run();
Showing all results of client.items.listPagedIterator()
, from any model
-- ALL RECORDS ACROSS ALL PAGES --└ Item "ApidnkdFSgSa0fMnxut7ug" (item_type: "Y5l8wbEDQLKj7qm22CTucQ") ├ name: "Audio" └ description: "Audio equipment and sound devices"
└ Item "PeKN3Mx1QMiQpxR6rIfV1Q" (item_type: "ZsoQdbEVTkizaFPrama3IA") ├ rating: 5 └ comment: "Excellent product, highly recommended!"
└ Item "Fo_aNiUGQce74zJQLghgEA" (item_type: "Y5l8wbEDQLKj7qm22CTucQ") ├ name: "Electronics" └ description: "Electronic devices and accessories"
└ Item "DfAtrqEiQC-BpxRkCgFxug" (item_type: "GURToKAcQIyC-rTypPeHTw") ├ name: "Bluetooth Speaker" └ price: 49.99
└ Item "XfVkvL9YT2K0KrhaqEXtrg" (item_type: "ZsoQdbEVTkizaFPrama3IA") ├ rating: 4 └ comment: "Good quality, worth the price."
└ Item "d2InAHvfQze_HvxdtX3Iyw" (item_type: "GURToKAcQIyC-rTypPeHTw") ├ name: "Wireless Headphones" └ price: 99.99
You can retrieve a list of records (or blocks) by their record IDs. They can be from the same or different models.
import { buildClient, inspectItem, type ItemTypeDefinition,} from "@datocms/cma-client-node";
type EnvironmentSettings = { locales: "en" };
/* * Dog * ├─ name: string * └─ breed: string * * Song * ├─ title: string * ├─ artist: string * └─ duration: integer */
// 👇 Definitions can be generated automatically using CLI: https://www.datocms.com/cma-ts-schema
type Dog = ItemTypeDefinition< EnvironmentSettings, "GURToKAcQIyC-rTypPeHTw", { name: { type: "string" }; breed: { type: "string" }; }>;
type Song = ItemTypeDefinition< EnvironmentSettings, "Y5l8wbEDQLKj7qm22CTucQ", { title: { type: "string" }; artist: { type: "string" }; duration: { type: "integer" }; }>;
async function run() { // Make sure the API token has access to the CMA, and is stored securely const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const records = await client.items.list<Dog | Song>({ filter: { // Specific record IDs: one dog record, and one song record // Note that it's a comma-separated string with no spaces ids: "ZsoQdbEVTkizaFPrama3IA,U4jwHd5-RCy2ItsDuWLMTQ", }, version: "current", });
console.log("-- ITEMS BY SPECIFIC IDS --"); records.forEach((item) => { console.log(inspectItem(item)); });}
run();
Showing two records from different models: dog and song. The returned record order is random, not the order of the record IDs you specified.
-- ITEMS BY SPECIFIC IDS --└ Item "U4jwHd5-RCy2ItsDuWLMTQ" (item_type: "Y5l8wbEDQLKj7qm22CTucQ") ├ title: "Bohemian Rhapsody" ├ artist: "Queen" └ duration: 355
└ Item "ZsoQdbEVTkizaFPrama3IA" (item_type: "GURToKAcQIyC-rTypPeHTw") ├ name: "Buddy" └ breed: "Golden Retriever"
You can filter the records by one or more model types. You can use either the model's api_key
(that you define) or its unique ID (generated by DatoCMS). Multiple comma-separated values are accepted:
import { buildClient, inspectItem, type ItemTypeDefinition,} from "@datocms/cma-client-node";
type EnvironmentSettings = { locales: "en" };
/* * Cat * ├─ name: string * ├─ breed: string * └─ age: integer * * Dog * ├─ name: string * ├─ breed: string * └─ age: integer */
// 👇 Definitions can be generated automatically using CLI: https://www.datocms.com/cma-ts-schema
type Cat = ItemTypeDefinition< EnvironmentSettings, "GURToKAcQIyC-rTypPeHTw", { name: { type: "string" }; breed: { type: "string" }; age: { type: "integer" }; }>;
type Dog = ItemTypeDefinition< EnvironmentSettings, "Y5l8wbEDQLKj7qm22CTucQ", { name: { type: "string" }; breed: { type: "string" }; age: { type: "integer" }; }>;
async function run() { // Make sure the API token has access to the CMA, and is stored securely const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const records = await client.items.list<Cat | Dog>({ filter: { // Filtering by the model with api_key "cat" and the model with ID of "dog" type: "cat,Y5l8wbEDQLKj7qm22CTucQ", }, version: "current", });
console.log("-- FILTERED BY MODEL TYPE --"); records.forEach((item) => { console.log(inspectItem(item)); });}
run();
-- FILTERED BY MODEL TYPE --└ Item "bVlcRGmFRqiK1nKPbesN8w" (item_type: "GURToKAcQIyC-rTypPeHTw") ├ name: "Mittens" ├ breed: "Siamese" └ age: 2
└ Item "CEtirbQ_SnmHpowQ2tZ-ow" (item_type: "Y5l8wbEDQLKj7qm22CTucQ") ├ name: "Max" ├ breed: "Labrador" └ age: 4
└ Item "KyueUsNkQfWh71dfxstVWQ" (item_type: "Y5l8wbEDQLKj7qm22CTucQ") ├ name: "Buddy" ├ breed: "Golden Retriever" └ age: 5
└ Item "bRfo6K_YRJa1RrPfpUQTOg" (item_type: "GURToKAcQIyC-rTypPeHTw") ├ name: "Whiskers" ├ breed: "Persian" └ age: 3
By default, the API only returns published records. Using the version
parameter, you can choose to also include drafts and updates.
version: 'current'
will return the most recent versions of the queried records. Sometimes this can be the same as the published version, but other times it could be an unpublished draft or update:
draft
means the record has been created and saved, but not yet published (or was unpublished)published
means the record has been published, and there are no later changes (i.e., the published version is the most recent version)updated
means the record was previously published, but there are new changes that have been saved and not yet published (the current version is ahead of the published version)
To get only draft, updated, or published records, you can filter on this response's record.meta.status
property on the client side, after the fetch:
import { buildClient, inspectItem, type ItemTypeDefinition,} from "@datocms/cma-client-node";
type EnvironmentSettings = { locales: "en" };
/* * Post * ├─ title: string * ├─ content: text * └─ author: string */
// 👇 Definitions can be generated automatically using CLI: https://www.datocms.com/cma-ts-schema
type Post = ItemTypeDefinition< EnvironmentSettings, "GURToKAcQIyC-rTypPeHTw", { title: { type: "string" }; content: { type: "text" }; author: { type: "string" }; }>;
const getPublishedAndDraftRecordsOfModel = async () => { const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN, });
const allRecords = await client.items.list<Post>({ filter: { type: "post", // Model name or internal ID }, version: "current", // Fetch the latest version of the records, regardless of publication status });
// Records that have been saved but not published (or were unpublished later) const newDraftsOnly = allRecords.filter( (record) => record.meta.status === "draft", );
// Records that were published but have unsaved changes ahead of the published version const updatedRecordsOnly = allRecords.filter( (record) => record.meta.status === "updated", );
// Records that were published and have no further changes const publishedRecordsOnly = allRecords.filter( (record) => record.meta.status === "published", );
console.log(`There are ${allRecords.length} total records in this model.`); console.log(`${publishedRecordsOnly.length} are published.`); console.log(`${updatedRecordsOnly.length} have unpublished updates.`); console.log(`${newDraftsOnly.length} are unpublished drafts.`);
console.log("\n-- PUBLISHED RECORDS --"); publishedRecordsOnly.forEach((item) => { console.log(inspectItem(item)); });
console.log("\n-- DRAFT RECORDS --"); newDraftsOnly.forEach((item) => { console.log(inspectItem(item)); });
console.log("\n-- UPDATED RECORDS --"); updatedRecordsOnly.forEach((item) => { console.log(inspectItem(item)); });};
getPublishedAndDraftRecordsOfModel();
There are 4 total records in this model.2 are published.1 have unpublished updates.1 are unpublished drafts.
-- PUBLISHED RECORDS --└ Item "Z1iG3QGISZON0p6ctQR7bg" (item_type: "GURToKAcQIyC-rTypPeHTw") ├ title: "Another Published Post" ├ content: "This is another published post to show multiple published items." └ author: "Alice Publisher"
└ Item "Ssc2tQvNS-i0yjrcmq824A" (item_type: "GURToKAcQIyC-rTypPeHTw") ├ title: "Published Article" ├ content: "This is a published article that's live on the website." └ author: "John Author"
-- DRAFT RECORDS --└ Item "cjwt438ZT2ChDWpolIm2Sg" (item_type: "GURToKAcQIyC-rTypPeHTw") ├ title: "Draft Article" ├ content: "This is a draft article that hasn't been published yet." └ author: "Jane Writer"
-- UPDATED RECORDS --└ Item "YWrNII0ETpWdjXaO76AW3Q" (item_type: "GURToKAcQIyC-rTypPeHTw") ├ title: "Updated Article [EDITED]" ├ content: "This article was published but then updated with new content." └ author: "Bob Editor"
Within a specified model, you can further filter its records by their field values.
You must specify a single model using filter[type]
. You cannot filter by field value across multiple models at once.
Valid filters are documented at GraphQL API records filters, so please check there. However, you cannot use deep filtering on Modular Content and Structured Text fields at the moment.
- You may add an optional
locale
parameter if you are filtering by a localized field. - You may add an optional
order_by
parameter.
In this example, we are filtering the model dog
by:
- A single-line string field,
name in ['Buddy','Rex']
(matchingBuddy
ORRex
) - A single-line string field,
breed eq 'mixed'
(matching exactlymixed
) - A date field (
_updated_at
) (and ordering the results by the same)
import { buildClient, inspectItem, type ItemTypeDefinition,} from "@datocms/cma-client-node";
type EnvironmentSettings = { locales: "en" };
/* * Dog * ├─ name: string * ├─ breed: string * ├─ age: integer * ├─ weight: float * └─ is_trained: boolean */
// 👇 Definitions can be generated automatically using CLI: https://www.datocms.com/cma-ts-schema
type Dog = ItemTypeDefinition< EnvironmentSettings, "GURToKAcQIyC-rTypPeHTw", { name: { type: "string" }; breed: { type: "string" }; age: { type: "integer" }; weight: { type: "float" }; is_trained: { type: "boolean" }; }>;
async function run() { // Make sure the API token has access to the CMA, and is stored securely const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const records = await client.items.list<Dog>({ filter: { type: "dog", fields: { name: { in: ["Buddy", "Rex"], }, breed: { eq: "mixed", }, _updated_at: { gt: "2020-04-18T00:00:00", }, }, }, order_by: "_updated_at_ASC", version: "current", });
console.log("-- FILTERED BY FIELD VALUES --"); records.forEach((item) => { console.log(inspectItem(item)); });}
run();
-- FILTERED BY FIELD VALUES --└ Item "bxiqfMHRTxaB1sv4bedQTQ" (item_type: "GURToKAcQIyC-rTypPeHTw") ├ name: "Buddy" ├ breed: "mixed" ├ age: 5 ├ weight: 25.5 └ is_trained: true
└ Item "d9f4ZoN_T9WqJRtC-jVu_A" (item_type: "GURToKAcQIyC-rTypPeHTw") ├ name: "Rex" ├ breed: "mixed" ├ age: 3 ├ weight: 30.2 └ is_trained: false
You can retrieve a list of records filtered by a textual query match. It will search in block records content too. Set the nested
parameter to true
to retrieve embedded block content as well.
Please note that you need to wait at least 30 seconds after creating or updating content before expecting to see results in textual queries.
You can narrow your search to some models by specifying the filter[type]
parameter. You can use either the model's api_key
or its unique ID. Multiple comma-separated values are accepted.
You should specify the locale
attribute, or the environment's default locale will be used.
Returned records are ordered by rank.
import { buildClient, inspectItem, type ItemTypeDefinition,} from "@datocms/cma-client-node";
type EnvironmentSettings = { locales: "en" };
/* * Dog * ├─ name: string * ├─ description: text * └─ breed: string * * Cat * ├─ name: string * ├─ description: text * └─ breed: string */
// 👇 Definitions can be generated automatically using CLI: https://www.datocms.com/cma-ts-schema
type Dog = ItemTypeDefinition< EnvironmentSettings, "GURToKAcQIyC-rTypPeHTw", { name: { type: "string" }; description: { type: "text" }; breed: { type: "string" }; }>;
type Cat = ItemTypeDefinition< EnvironmentSettings, "Y5l8wbEDQLKj7qm22CTucQ", { name: { type: "string" }; description: { type: "text" }; breed: { type: "string" }; }>;
async function run() { // Make sure the API token has access to the CMA, and is stored securely const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const records = await client.items.list<Dog | Cat>({ filter: { // optional, if defined, search in the specified models only type: "dog,cat", query: "chicken", }, locale: "en", order_by: "_rank_DESC", // possible values: `_rank_DESC` (default) | `_rank_ASC` version: "current", });
console.log("-- SEARCH RESULTS FOR 'chicken' --"); records.forEach((item) => { console.log(inspectItem(item)); });}
run();
-- SEARCH RESULTS FOR 'chicken' --└ Item "c2c5cXrITwOhj972XxEIsQ" (item_type: "GURToKAcQIyC-rTypPeHTw") ├ name: "Luna" ├ description: "A playful Labrador puppy who enjoys swimming and chicken-flavored treats." └ breed: "Labrador"
└ Item "LlduEUcCSd-M2F5fZARUAw" (item_type: "Y5l8wbEDQLKj7qm22CTucQ") ├ name: "Mittens" ├ description: "A curious Siamese cat who loves chicken and exploring high places." └ breed: "Siamese"
└ Item "L45_GuAKQCGfcNtLE4gjKA" (item_type: "Y5l8wbEDQLKj7qm22CTucQ") ├ name: "Shadow" ├ description: "A mysterious black cat who prefers fish over chicken and sleeps during the day." └ breed: "Domestic Shorthair"
└ Item "E0Y-kR8iSC-EooTe7dHx6w" (item_type: "GURToKAcQIyC-rTypPeHTw") ├ name: "Buddy" ├ description: "A friendly golden retriever who loves to play fetch and enjoys chicken treats..." └ breed: "Golden Retriever"