Skip to main content

Overview

The Item Recommendations endpoints provide similar functionality to the Affiliate Recommendations API, but with a key difference: it only returns items that your organization has access to. This protects intellectual property while enabling powerful content discovery features for your users. The search and ranking logic, based on snippet count and cumulative certainty, is identical to the Affiliate Recommendations API. Please note that once a publisher allows their content to be used as a reference, it may take up to 24 hours for search queries to include their items in returned data.

Endpoints

There are two distinct endpoints for item recommendations:
  • /recommendations/base: Returns item and snippet metadata but keeps the snippet text itself hidden.
  • /recommendations/verbose: Returns item and snippet data, including the full snippet text.

How to Use the API

Parameters

Making a Request

Before making a request, you must know which publisher’s content you would like to query.
  1. Find Your Tenant (Publisher Name): First, navigate to the Organizations page in Studio and click “View Publishers”. Your Tenant is the name of the publisher you’re querying.
  2. Identify the Collection: A collection is where we keep the content for our customers. The only collection you’ll need to specify in requests is GlooProd. You must specify this in the collection field.
NOTE: You will only have access to your own publisher’s tenant through this endpoint. For multi-tenant collections such as GlooProd, a tenant must be specified; requests outside your tenant return a 403 “Forbidden” response.
An API key is necessary to call these endpoints. You can get one from the API Keys page in Gloo AI Studio and send it directly as a Bearer token.

Base Recommendations

This endpoint returns snippet metadata without the snippet text. POST /ai/v1/data/items/recommendations/base

Example Request (/base)

Example Response (/base)

As shown below, the uuids array contains snippet metadata, but not the snippet text itself.

Verbose Recommendations

This endpoint returns the full snippet text. POST /ai/v1/data/items/recommendations/verbose

Example Request (/verbose)

The request above keeps only items whose item_extra text contains visibleOnApps:true and returns them newest-first by publication date.

Example Response (/verbose)

Note the addition of the snippet field in the uuids array, and the item’s raw item_extra text (which may be an empty string).

Use Cases

The Item Recommendations API is ideal for a publisher looking to increase exposure and engagement with their own content. For example, a user could enter a query on a publisher’s website. The publisher could then use the /recommendations/base endpoint to recommend their own relevant books, articles, or videos. This enhances content discovery and keeps users engaged on the platform. If the publisher wanted to provide a preview of the content, they could use the /recommendations/verbose endpoint to display a relevant snippet or a sample of one, encouraging the user to explore the full item.