Skip to content

Feature Request: Real-time API Search for Integration Fields #1770

@dimaportenko

Description

@dimaportenko

Feature Request: Real-time API Search for Integration Fields

Problem

Currently, Prismic Integration Fields work by pulling the entire catalog from a Custom API endpoint every 30 minutes. This approach has significant limitations:

  • Not scalable for large catalogs — Shopify stores with thousands of products must expose their entire product catalog to Prismic, which is slow, wasteful, and impractical.
  • Stale data — The 30-minute sync interval means newly added products aren't immediately available to content editors.
  • No search delegation — Prismic handles search/filtering internally over the cached dataset, ignoring the fact that external systems (Shopify, Algolia, etc.) already have optimized search capabilities.

Proposed Solution

Add support for real-time API search in Integration Fields. Instead of pulling all data upfront, Prismic would call the Custom API endpoint with a search query parameter as the editor types:

GET https://example.com/api/prismic/integration/products?q=marble&page=1

How it would work

  1. Editor opens the Integration Field and starts typing a product name
  2. Prismic sends a GET request to the configured API URL with ?q=<search_term>&page=<number>
  3. The API returns matching results in the existing { results_size, results } format
  4. Editor selects a result, and the blob is stored in the document as usual

Benefits

  • Works with any catalog size — No need to import thousands of products into Prismic
  • Always fresh data — Results come directly from the source system in real-time
  • Leverages existing search — External systems like Shopify, Algolia, Elasticsearch already have optimized search; let them handle it
  • Simpler API implementation — Developers only need to implement a search endpoint, not a paginated full-catalog export
  • Backwards compatible — The existing pull-based approach continues to work for smaller catalogs

Suggested API contract

GET <catalog_url>?q=<search_term>&page=<page_number>

Response (same as current format):
{
  "results_size": 5,
  "results": [
    {
      "id": "unique-id",
      "title": "Product Title",
      "description": "Description",
      "image_url": "https://...",
      "last_update": 1234567890,
      "blob": { ... }
    }
  ]
}

Configuration

A new option in the catalog settings to choose the mode:

  • Pull mode (current behavior) — Prismic syncs all data every 30 minutes
  • Search mode (new) — Prismic queries the API in real-time with the editor's search term

Use Case

We use Prismic with a Shopify store that has thousands of products. Content editors need to select specific products for promotional banners slice. The current options are:

  1. Integration Field with Pull API — Requires importing the full Shopify catalog into Prismic. Too slow and wasteful for selecting 2-3 products.
  2. Plain Text field — Editors manually type Shopify product handles/IDs. Error-prone, no validation, no preview.

A search-based Integration Field would give editors a product picker UI without requiring a full catalog import.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions