MCP Endpoints
Batch Query
Search multiple queries in a single request
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
}
'import requests
url = "https://api.fltr.com/v1/mcp/batch-query"
payload = {
"queries": [{}],
"dataset_id": "<string>",
"limit": 123,
"rerank": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({queries: [{}], dataset_id: '<string>', limit: 123, rerank: true})
};
fetch('https://api.fltr.com/v1/mcp/batch-query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fltr.com/v1/mcp/batch-query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'queries' => [
[
]
],
'dataset_id' => '<string>',
'limit' => 123,
'rerank' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fltr.com/v1/mcp/batch-query"
payload := strings.NewReader("{\n \"queries\": [\n {}\n ],\n \"dataset_id\": \"<string>\",\n \"limit\": 123,\n \"rerank\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fltr.com/v1/mcp/batch-query")
.header("Content-Type", "application/json")
.body("{\n \"queries\": [\n {}\n ],\n \"dataset_id\": \"<string>\",\n \"limit\": 123,\n \"rerank\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fltr.com/v1/mcp/batch-query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"queries\": [\n {}\n ],\n \"dataset_id\": \"<string>\",\n \"limit\": 123,\n \"rerank\": true\n}"
response = http.request(request)
puts response.read_bodyRequest
Executes multiple search queries in parallel for better performance.Body
array
required
Array of search queries (max 10)
string
required
Dataset to search
integer
default:5
Results per query
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
⌘I
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
}
'import requests
url = "https://api.fltr.com/v1/mcp/batch-query"
payload = {
"queries": [{}],
"dataset_id": "<string>",
"limit": 123,
"rerank": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({queries: [{}], dataset_id: '<string>', limit: 123, rerank: true})
};
fetch('https://api.fltr.com/v1/mcp/batch-query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fltr.com/v1/mcp/batch-query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'queries' => [
[
]
],
'dataset_id' => '<string>',
'limit' => 123,
'rerank' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fltr.com/v1/mcp/batch-query"
payload := strings.NewReader("{\n \"queries\": [\n {}\n ],\n \"dataset_id\": \"<string>\",\n \"limit\": 123,\n \"rerank\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fltr.com/v1/mcp/batch-query")
.header("Content-Type", "application/json")
.body("{\n \"queries\": [\n {}\n ],\n \"dataset_id\": \"<string>\",\n \"limit\": 123,\n \"rerank\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fltr.com/v1/mcp/batch-query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"queries\": [\n {}\n ],\n \"dataset_id\": \"<string>\",\n \"limit\": 123,\n \"rerank\": true\n}"
response = http.request(request)
puts response.read_body