Preview search results without charging
Run the same pipeline as POST /api/v1/search/query -- same entitlement checks, same retraction filtering, same relevance ranking -- but never charge for it. Every result of a new preview comes back locked, with a teaser snippet in text and the cost to unlock it. Works even at a zero balance. Consumes no credits, no trial query and no quota.
Call POST /api/v1/search/unlock with the returned queryId to pay for and receive some or all of the results in full.
Send an Idempotency-Key header to make retries safe: a repeat with the same key and body returns the original queryId instead of buying the same results again under a new one.
/api/v1/search/previewAuthorization
BearerAuth API key authentication. Pass your key in the Authorization header as Bearer sk_live_.... An X-API-Key: sk_live_... header is also accepted as an alternative. Keys are created in the Redpine Connect dashboard under Settings > API Keys.
Keys come in two kinds. A live key (sk_live_...) searches real content and spends credits. A sandbox key (sk_test_...) returns canned results at no cost and never reaches licensed content, so you can build and test an integration before spending anything. Sandbox responses have the same shape as live ones and every result is marked synthetic, so going live is a matter of swapping the key. Check the X-Billing-Mode response header to confirm which you are using.
In: header
Header Parameters
Optional, 1-255 characters, scoped to your organization and kept for 24 hours. A repeat with the same key and the same body runs no new search: it returns the original queryId, rendered through the unlock ledger, so rows already unlocked come back in full with locked: false. Every row keeps its cost and tokens. The same key with a different body is a 422 IDEMPOTENCY_KEY_REUSED. A repeat while the first request is still running is a 409 IDEMPOTENCY_KEY_IN_PROGRESS, so retry it. If the original preview has expired, the request runs a new preview and the key moves to it. The response says which happened in Idempotency-Status.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
The result-selection half of SearchRequest. A preview quotes results rather than delivering them, so it takes no content-delivery options: figures are never fetched (they are not priced into the quote) and metadata is always returned. Provide exactly one of collection (single) or collections (multi).
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/search/preview" \ -H "Content-Type: application/json" \ -d '{ "query": "string" }'{ "costCharged": null, "costToUnlockRemaining": "string", "discovery": { "callout": { "kind": "add_payment_method", "message": "string" }, "intent": "sources", "metricsNote": null, "nextActions": [ { "action": "string", "hint": "string" } ], "queryId": "string", "scopes": [ { "collection": "string", "displayName": "string", "issnValuesSeen": 0, "items": [ { "hIndex": null, "impactFactor": null, "issnL": null, "issns": [ "string" ], "kind": "journal", "publisher": null, "title": "string" } ], "note": null, "offset": 0, "publishers": [ "string" ], "rankedBy": null, "sampledEntries": 0, "shown": 0, "titleOnly": 0, "total": 0, "truncatedInventory": false, "unranked": [ { "hIndex": null, "impactFactor": null, "issnL": null, "issns": [ "string" ], "kind": "journal", "publisher": null, "title": "string" } ], "unresolvedIssns": 0 } ], "text": "string", "topic": null }, "filterWarnings": null, "filtersApplied": null, "journalMetricExpansions": null, "queryId": "string", "results": [ { "collection": null, "cost": null, "figureCount": 0, "id": "string", "locked": true, "metadata": null, "relevance": null, "text": "string", "tokens": null } ]}Search a single collection by name POST
Shorthand for POST /api/v1/search/query with the collection named in the path instead of the body. Same pipeline, same response shape, one collection per call — use /query's `collections` form to search several at once.
Search documents POST
Search one or more collections using natural language or keyword queries. Results are ranked by relevance using hybrid retrieval (dense + sparse). Pass `collections` (up to 5) to search several collections in one call and receive a single merged, relevance-ranked list with per-result origin labels.