Listing projection and bulk retrieval

Retrieve current published listings by stable ID or slug over HTTP, MCP or A2A. Catalog retrieval is public and needs no API key. The same visibility rules apply to single and bulk requests: missing, removed, pending and rejected listings are indistinguishable as not_found. Historical public records remain available through the separate listing history API.

Select response fields

GET /api/products/SLUG_OR_ID?fields=id,name,pricing,interfaces
MCP get_product {"slug":"SLUG_OR_ID","fields":["id","name","pricing"]}
A2A data part {"skill":"get-product","slug":"SLUG_OR_ID","fields":["id","name","pricing"]}

Omit fields for the complete public profile. When supplied, fields must contain 1–29 supported, case-sensitive top-level names. Exactly those product fields are returned; id, slug and schemaVersion are not automatically added. Nested objects and arrays are returned in full when their top-level field is selected. Include id or slug if you need identity within each product. Duplicate field names are collapsed; an empty list, unknown/private names, nested paths or a repeated HTTP fields parameter are validation errors. HTTP uses one comma-separated parameter; MCP and A2A use an array of strings.

schemaVersion, id, slug, name, description, longDescription, accessGuide, url, detailsUrl, historyUrl, websiteUrl, outboundUrl, category, types, creator, verified, claimed, demo, pricing, interfaces, capabilities, structuredCapabilities, fieldProvenance, tags, health, limitations, unknownFields, publishedAt, updatedAt

The field list above applies to single-listing details and bulk retrieval. Search supports its own allowlist below. Compare responses keep their existing shape. The A2A text summary for a projected listing does not repeat unrequested product data.

GET /api/search?fields=id,name,pricing&limit=100
GET /api/search?fields=["id","name"]&limit=20
MCP search_products {"fields":["id","name"],"limit":100}
A2A data part {"fields":["id","name"],"limit":100}

HTTP fields accepts comma-separated names or a JSON array of strings. MCP/A2A use an array of strings. Names are case-sensitive, duplicates are collapsed and nested/private/unknown fields are rejected. The projection applies to every organic and sponsored hit; no unrequested listing content is repeated in A2A text summaries. Sponsored hits always retain sponsored: true as a paid-placement disclosure. Placement-only fields such as score or campaignId are omitted from hits where unavailable.

id, slug, name, description, url, detailsUrl, historyUrl, outboundUrl, category, types, creator, verified, claimed, demo, trust, pricing, interfaces, interfacesPlanned, structuredCapabilities, fieldProvenance, capabilities, trial, publishedAt, updatedAt, score, sponsored, campaignId

Search defaults to 10 results per public API call and accepts limit 1–100. limit=20 returns up to 20; limit=100 returns up to 100, without silently clamping. Over-maximum, noninteger, repeated or otherwise invalid limits return HTTP 400 invalid_input (or a protocol validation error). Responses report limit as the effective requested page size, maxLimit: 100, total before pagination and nextPage/hasMore as before. projection echoes the selected response fields or null for full profiles. The count returned on a last page can be smaller than limit.

Capability conditions have a separate canonical parameter, capabilityFilters. HTTP URL-encodes its JSON array; MCP/A2A pass it directly. Projection, capability conditions, trust/category/pricing/interface filters and query text compose. Applied conditions are echoed in filters.capabilityFilters and its legacy alias filters.fields.

MCP search_products {
 "fields":["id","name"],"limit":100,"verified":true,"demo":false,
 "capabilityFilters":[{"field":"common.creditCardRequired","op":"eq","value":false}]
}

Compatibility: the previous fields array of capability-condition objects remains supported in HTTP, MCP and A2A. An empty fields array retains its legacy meaning of no capability conditions; it is not an empty projection. Do not combine legacy fields conditions with capabilityFilters; mixed strings/condition objects are invalid. New clients should use fields for response names and capabilityFilters for attribute conditions. Browser capability-filter forms and legacy links continue to work; searchUrl is the human search view with conditions, not a projected JSON URL.

The complete search catalog JSON is capped at 1,048,576 UTF-8 bytes (1 MiB), including envelope/metadata and before MCP/A2A wrapping. Oversized results reject the whole request with response_too_large (HTTP 413 or protocol data/tool error). No hits or field values are silently truncated to meet the budget. Recover by choosing fewer fields or a smaller limit. Each call, including limit=100, uses one unit of the shared 60/minute IP rate limit. Initial MCP handshakes are separate calls.

Search and bulk have separate limits: search accepts 100 per page; bulk accepts 20 input IDs/slugs with no pagination. Bulk responses report limit as the number of input slots processed and maxLimit: 20. A 21-item bulk request is rejected, regardless of search page size.

Bulk requests

POST /api/products/bulk
Content-Type: application/json

{"ids":["PUBLIC_ID","example-slug","missing-slug"],"fields":["id","name","pricing"]}

MCP get_products {"ids":["PUBLIC_ID","example-slug"],"fields":["id","name"]}
A2A data part {"skill":"get-products","ids":["PUBLIC_ID","example-slug"],"fields":["id","name"]}

The ids array must contain 1–20 strings, each at most 100 characters. Stable IDs and slugs can be mixed. Whitespace around identifiers is trimmed and letters are normalized to lowercase for lookup; each result echoes the original input. A normalized identifier must contain only lowercase letters, digits or hyphens and have at least one character. Stable public IDs take precedence over public slugs if they collide. This rule is shared by single-item lookup. Duplicate inputs are preserved as separate results.

{
  "schemaVersion": "1",
  "limit": 3,
  "maxLimit": 20,
  "results": [
    {
      "index": 0,
      "input": "PUBLIC_ID",
      "status": "ok",
      "product": {
        "id": "PUBLIC_ID",
        "name": "Example"
      }
    },
    {
      "index": 1,
      "input": "missing-slug",
      "status": "error",
      "error": {
        "code": "not_found",
        "message": "No published listing found."
      }
    },
    {
      "index": 2,
      "input": "invalid/path",
      "status": "error",
      "error": {
        "code": "invalid_id",
        "message": "Use a stable ID or slug containing 1–100 lowercase letters, digits or hyphens."
      }
    }
  ]
}

Results preserve input order and length. Use index and input to correlate every item even when product identity fields were omitted. HTTP returns 200 for a valid batch, including all-failed or mixed batches. Missing/inaccessible identifiers return not_found; malformed identifiers return invalid_id; oversized products return response_too_large. These errors contain no private listing content or moderation status. Fix individual items without repeating successful ones.

Request and response limits

The HTTP bulk JSON body is capped at 16,384 bytes (16 KiB), measured while streaming even without Content-Length. Send application/json and put ids and fields in the body without query parameters. Invalid JSON, a batch outside 1–20 items, non-string/overlong identifiers, unknown body properties, or invalid field selectors reject the whole batch with HTTP 400 invalid_input. Wrong Content-Type returns 415; an oversized body returns 413. MCP and A2A return their existing protocol validation errors and retain their transport body caps of 64,000 and 32,000 bytes respectively.

Each projected product is limited to 131,072 UTF-8 JSON bytes (128 KiB). The bulk catalog response, including its result/error envelope, is limited to 524,288 bytes (512 KiB), before MCP/A2A protocol wrapping. Items are processed in input order; those that do not fit get response_too_large, while later smaller items may still succeed. No field value is truncated and no input position is dropped. Select fewer fields or use a smaller batch to recover. For a single listing, an oversized response returns HTTP 413 response_too_large, an MCP tool error, or an A2A data error. Omitting fields still applies these size limits.

Rate limits and privacy

One bulk HTTP request, MCP get_products call or A2A SendMessage consumes one request from the shared 60-per-minute IP budget, regardless of batch size, duplicates or item failures. It does not consume 20 units. HTTP single retrieval, search, MCP and A2A share that same budget. Invalid requests also consume a unit; OPTIONS preflight does not. MCP initialization is a separate request. When limited, HTTP/protocol transports return 429 with Retry-After.

HTTP supports cross-origin requests, no-store responses and noindex. Per-call analytics record the tool, successful result count and coarse client family; bulk requests do not create separate per-listing analytics events. Only allowlisted public product fields can be projected. Trial/provider credentials, owner contact details, drafts and moderation data never enter product payloads. Database failures return a request-level internal error, rather than disguising unavailable service as missing listings.

A2A uses the existing /api/a2a JSON-RPC SendMessage binding with A2A-Version: 1.0, ROLE_USER and a unique messageId. Put the examples above inside message.parts as a data part. Single results live in result.message.parts[0].data.product; bulk results live in result.message.parts[0].data.results. MCP returns the corresponding JSON in its text content. The agent card advertises the get-products skill.