For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
BlogLog InRequest Demo
HomeProductDevelopersSelf-HostingChangelog
HomeProductDevelopersSelf-HostingChangelog
  • Getting Started
    • Overview
  • Workflows SDK
    • Introduction
    • Installation
    • Core Concepts
    • Defining Control Flow
    • Configuration
    • Custom Docker Images
  • Client SDK
    • Introduction
    • Authentication
    • API Versioning
      • POSTSearch
      • POSTAdd Document
      • POSTCreate Document Index
      • GETRetrieve Document Index
      • GETList Document Indexes
      • PATCHUpdate Document Index
      • PUTReplace Document Index
      • DELDestroy
      • DELRemove Document
LogoLogo
BlogLog InRequest Demo
Client SDKDocument Indexes

Search

GA
POST
https://predict.vellum.ai/v1/search
POST
/v1/search
1import requests
2
3url = "https://predict.vellum.ai/v1/search"
4
5payload = { "query": "string" }
6headers = {
7 "X-API-KEY": "<apiKey>",
8 "Content-Type": "application/json"
9}
10
11response = requests.post(url, json=payload, headers=headers)
12
13print(response.json())
1{
2 "results": [
3 {
4 "text": "string",
5 "score": 1.1,
6 "keywords": [
7 "string"
8 ],
9 "document": {
10 "label": "string",
11 "id": "string",
12 "external_id": "string",
13 "metadata": {}
14 },
15 "meta": {
16 "source": {
17 "document_type": "PDF",
18 "start_page_num": 1,
19 "end_page_num": 1
20 }
21 }
22 }
23 ]
24}
Perform a search against a document index.
Was this page helpful?
Previous

Add Document

Next
Built with

Authentication

X-API-KEYstring
API Key authentication via header

Headers

X-API-VersionstringOptional

Request

This endpoint expects an object.
querystringRequired>=1 character
The query to search for.
index_idstring or nullOptionalformat: "uuid"

The ID of the index to search against. Must provide either this, index_name or document_index.

index_namestring or nullOptional>=1 character

The name of the index to search against. Must provide either this, index_id or document_index.

optionsobject or nullOptional
Configuration options for the search.
document_indexstring or nullOptional>=1 character

Either the index name or index ID to search against. Must provide either this, index_id or index_name.

Response

resultslist of objects
The results of the search. Each result represents a chunk that matches the search query.

Errors

400
Bad Request Error
404
Not Found Error
500
Internal Server Error