Skip to main content
POST
/
v1
/
mcp
/
batch-query
Batch Query
curl --request POST \
  --url https://api.fltr.com/v1/mcp/batch-query \
  --header 'Content-Type: application/json' \
  --data '
{
  "queries": [
    {}
  ],
  "dataset_id": "<string>",
  "limit": 123,
  "rerank": true
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.tryfltr.com/llms.txt

Use this file to discover all available pages before exploring further.

Request

Executes multiple search queries in parallel for better performance.

Body

queries
array
required
Array of search queries (max 10)
dataset_id
string
required
Dataset to search
limit
integer
default:5
Results per query
rerank
boolean
default:false
Enable reranking for all queries

Examples

cURL
curl -X POST https://api.fltr.com/v1/mcp/batch-query \
  -H "Authorization: Bearer fltr_sk_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "queries": [
      "How do I authenticate?",
      "What are rate limits?",
      "How to upload documents?"
    ],
    "dataset_id": "ds_abc123",
    "limit": 3
  }'
Python
response = requests.post(
    "https://api.fltr.com/v1/mcp/batch-query",
    headers={"Authorization": "Bearer fltr_sk_abc123..."},
    json={
        "queries": [
            "How do I authenticate?",
            "What are rate limits?",
            "How to upload documents?"
        ],
        "dataset_id": "ds_abc123",
        "limit": 3
    }
)

data = response.json()
for i, query_results in enumerate(data['results']):
    print(f"Query {i+1}: {len(query_results['results'])} results")

Response

{
  "results": [
    {
      "query": "How do I authenticate?",
      "results": [
        {
          "chunk_id": "ch_xyz789",
          "content": "...",
          "score": 0.89
        }
      ]
    },
    {
      "query": "What are rate limits?",
      "results": [...]
    },
    {
      "query": "How to upload documents?",
      "results": [...]
    }
  ],
  "query_time_ms": 120
}

Benefits

  • Faster: Single request vs multiple
  • Efficient: Parallel execution
  • Cost-effective: Batch counting

Limits

  • Max 10 queries per batch
  • Same limits as single query