Actian Corporation Filters API
Filter construction and usage
Filter construction and usage
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/actian:actian-filters-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Actian VectorAI DB Filters API
description: Filters API for narrowing search, scroll, count, and other point operations.
version: 1.0.0
contact:
name: Actian Corporation
url: https://www.actian.com
servers:
- url: http://localhost:6573
description: Local development server (REST API)
- url: https://api.vectorai.actian.com
description: Production server
security:
- bearerAuth: []
tags:
- name: Filters
description: Filter construction and usage
paths:
/filters/examples:
get:
tags:
- Filters
summary: Filter examples
description: 'Filters narrow the results of search, scroll, count, and other point operations by applying conditions to payload fields. You pass a filter object in the `filter` parameter of these operations. A filter object contains one or more boolean clauses that combine field conditions. ## Boolean clauses
- `must` — all conditions must match (AND logic). Points are included only when every condition in the array evaluates to true. - `should` — at least one condition must match (OR logic). Points are included when any condition in the array evaluates to true. - `must_not` — no condition may match (exclusion logic). Points are excluded when any condition in the array evaluates to true. You can combine all three clauses in a single filter. For example, require a category (must), accept multiple price ranges (should), and exclude a specific brand (must_not). ## Field conditions
Each condition targets a payload field by `key` and applies an operator. - `match` — exact value match. Supports strings, numbers, and booleans. - `range` — numeric range with `gt`, `gte`, `lt`, `lte` operators. Combine multiple range operators for between queries. - `has_id` — matches points by their ID. Pass an array of point IDs. ## Equality filter
Match points where a field has an exact value. ```bash
curl -X POST "http://localhost:6573/collections/my_collection/points/search" \
-H "Content-Type: application/json" \
-H ''Authorization: Bearer '' \
-d ''{
"vector": [0.1, 0.2, 0.3, 0.4],
"limit": 5,
"filter": {
"must": [
{
"key": "category",
"match": { "value": "A" }
}
]
}
}''
```
```json
{
"usage": { "hardware": null },
"time": 0.001326298,
"status": "ok",
"result": [
{ "id": 1, "version": 0, "score": 1, "payload": null, "vector": null }
]
}
```
## Range filter
Match points where a numeric field falls within a range. ```bash
curl -X POST "http://localhost:6573/collections/my_collection/points/search" \
-H "Content-Type: application/json" \
-H ''Authorization: Bearer '' \
-d ''{
"vector": [0.1, 0.2, 0.3, 0.4],
"limit": 5,
"filter": {
"must": [
{
"key": "value",
"range": { "gte": 5, "lte": 50 }
}
]
}
}''
```
```json
{
"usage": { "hardware": null },
"time": 0.001511138,
"status": "ok",
"result": [
{ "id": 1, "version": 0, "score": 1, "payload": null, "vector": null },
{ "id": 3, "version": 0, "score": 0.9843740463256836, "payload": null, "vector": null },
{ "id": 2, "version": 0, "score": 0.9688639640808105, "payload": null, "vector": null }
]
}
```
## Combined AND filter
Require multiple conditions to all be true. ```bash
curl -X POST "http://localhost:6573/collections/my_collection/points/search" \
-H "Content-Type: application/json" \
-H ''Authorization: Bearer '' \
-d ''{
"vector": [0.1, 0.2, 0.3, 0.4],
"limit": 5,
"filter": {
"must": [
{"key": "category", "match": {"value": "A"}},
{"key": "value", "range": {"gte": 5}}
]
}
}''
```
```json
{
"usage": { "hardware": null },
"time": 0.001966431,
"status": "ok",
"result": [
{ "id": 1, "version": 0, "score": 1, "payload": null, "vector": null }
]
}
```
## Exclusion filter
Include points matching one condition while excluding those matching another. ```bash
curl -X POST "http://localhost:6573/collections/my_collection/points/search" \
-H "Content-Type: application/json" \
-H ''Authorization: Bearer '' \
-d ''{
"vector": [0.1, 0.2, 0.3, 0.4],
"limit": 5,
"filter": {
"must": [
{"key": "category", "match": {"value": "A"}}
],
"must_not": [
{"key": "value", "range": {"gt": 50}}
]
}
}''
```
```json
{
"usage": { "hardware": null },
"time": 0.001301257,
"status": "ok",
"result": [
{ "id": 1, "version": 0, "score": 1, "payload": null, "vector": null }
]
}
```
## OR filter
Match points where at least one condition is true.'
operationId: filter_examples
responses:
'200':
description: Documentation-only page. No request is sent.
x-codeSamples:
- lang: Python
label: Equality filter
source: "from actian_vectorai_client import VectorAIClient, Field, FilterBuilder\nimport random\n\nwith VectorAIClient(\"localhost:6574\") as client:\n query_vec = [random.gauss(0, 1) for _ in range(4)]\n\n search_filter = FilterBuilder() \\\n .must(Field(\"category\").eq(\"A\")) \\\n .build()\n\n results = client.points.search(\n \"my_collection\",\n vector=query_vec,\n filter=search_filter,\n limit=5\n )\n\n for r in results:\n print(f\"ID: {r.id}, Score: {r.score:.4f}\")\n"
- lang: Python
label: Range filter
source: "from actian_vectorai_client import VectorAIClient, Field, FilterBuilder\nimport random\n\nwith VectorAIClient(\"localhost:6574\") as client:\n query_vec = [random.gauss(0, 1) for _ in range(4)]\n\n price_filter = FilterBuilder() \\\n .must(Field(\"value\").gte(5)) \\\n .must(Field(\"value\").lte(50)) \\\n .build()\n\n results = client.points.search(\n \"my_collection\",\n vector=query_vec,\n filter=price_filter,\n limit=5\n )\n\n for r in results:\n print(f\"ID: {r.id}, Score: {r.score:.4f}\")\n"
- lang: Python
label: AND + NOT filter
source: "from actian_vectorai_client import VectorAIClient, Field, FilterBuilder\nimport random\n\nwith VectorAIClient(\"localhost:6574\") as client:\n query_vec = [random.gauss(0, 1) for _ in range(4)]\n\n search_filter = FilterBuilder() \\\n .must(Field(\"category\").eq(\"A\")) \\\n .must_not(Field(\"value\").range(gt=50)) \\\n .build()\n\n results = client.points.search(\n \"my_collection\",\n vector=query_vec,\n filter=search_filter,\n limit=5\n )\n\n for r in results:\n print(f\"ID: {r.id}, Score: {r.score:.4f}\")\n"
- lang: Python
label: OR filter
source: "from actian_vectorai_client import VectorAIClient, Field, FilterBuilder\nimport random\n\nwith VectorAIClient(\"localhost:6574\") as client:\n query_vec = [random.gauss(0, 1) for _ in range(4)]\n\n category_filter = FilterBuilder() \\\n .should(Field(\"category\").eq(\"A\")) \\\n .should(Field(\"category\").eq(\"B\")) \\\n .build()\n\n results = client.points.search(\n \"my_collection\",\n vector=query_vec,\n filter=category_filter,\n limit=5\n )\n\n for r in results:\n print(f\"ID: {r.id}, Score: {r.score:.4f}\")\n"
- lang: Python
label: ID filter
source: "from actian_vectorai_client import VectorAIClient, FilterBuilder, has_id\nimport random\n\nwith VectorAIClient(\"localhost:6574\") as client:\n query_vec = [random.gauss(0, 1) for _ in range(4)]\n\n id_filter = FilterBuilder() \\\n .must(has_id([1, 2])) \\\n .build()\n\n results = client.points.search(\n \"my_collection\",\n vector=query_vec,\n filter=id_filter,\n limit=10\n )\n\n print(f\"Found IDs: {[r.id for r in results]}\")\n"
- lang: Python
label: Count with filter
source: "from actian_vectorai_client import VectorAIClient, Field, FilterBuilder\n\nwith VectorAIClient(\"localhost:6574\") as client:\n total = client.points.count(\"my_collection\")\n\n elec_filter = FilterBuilder() \\\n .must(Field(\"category\").eq(\"A\")) \\\n .build()\n category_a = client.points.count(\"my_collection\", filter=elec_filter)\n\n print(f\"Total: {total}\")\n print(f\"Category A: {category_a}\")\n"
- lang: Python
label: Combined boolean filter
source: "from actian_vectorai_client import VectorAIClient, Field, FilterBuilder\nimport random\n\nwith VectorAIClient(\"localhost:6574\") as client:\n query_vec = [random.gauss(0, 1) for _ in range(4)]\n\n combined_filter = FilterBuilder() \\\n .should(Field(\"category\").eq(\"A\")) \\\n .should(Field(\"category\").eq(\"B\")) \\\n .must(Field(\"value\").lt(100)) \\\n .must_not(Field(\"value\").lt(5)) \\\n .build()\n\n results = client.points.search(\n \"my_collection\",\n vector=query_vec,\n filter=combined_filter,\n limit=5\n )\n\n for r in results:\n print(f\"ID: {r.id}, Score: {r.score:.4f}\")\n"
- lang: cURL
label: Equality filter
source: "curl -X POST \"http://localhost:6573/collections/my_collection/points/search\" \\\n -H \"Content-Type: application/json\" \\\n -H 'Authorization: Bearer <admin-jwt-or-access-token>' \\\n -d '{\n \"vector\": [0.1, 0.2, 0.3, 0.4],\n \"limit\": 5,\n \"filter\": {\n \"must\": [\n {\n \"key\": \"category\",\n \"match\": { \"value\": \"A\" }\n }\n ]\n }\n }'\n\n# Response:\n# {\n# \"usage\": { \"hardware\": null },\n# \"time\": 0.001326298,\n# \"status\": \"ok\",\n# \"result\": [\n# { \"id\": 1, \"version\": 0, \"score\": 1, \"payload\": null, \"vector\": null }\n# ]\n# }\n"
- lang: cURL
label: Range filter
source: "curl -X POST \"http://localhost:6573/collections/my_collection/points/search\" \\\n -H \"Content-Type: application/json\" \\\n -H 'Authorization: Bearer <admin-jwt-or-access-token>' \\\n -d '{\n \"vector\": [0.1, 0.2, 0.3, 0.4],\n \"limit\": 5,\n \"filter\": {\n \"must\": [\n {\n \"key\": \"value\",\n \"range\": { \"gte\": 5, \"lte\": 50 }\n }\n ]\n }\n }'\n\n# Response:\n# {\n# \"usage\": { \"hardware\": null },\n# \"time\": 0.001511138,\n# \"status\": \"ok\",\n# \"result\": [\n# { \"id\": 1, \"version\": 0, \"score\": 1, \"payload\": null, \"vector\": null },\n# { \"id\": 3, \"version\": 0, \"score\": 0.9843740463256836, \"payload\": null, \"vector\": null },\n# { \"id\": 2, \"version\": 0, \"score\": 0.9688639640808105, \"payload\": null, \"vector\": null }\n# ]\n# }\n"
- lang: cURL
label: Boolean filter
source: "curl -X POST \"http://localhost:6573/collections/my_collection/points/search\" \\\n -H \"Content-Type: application/json\" \\\n -H 'Authorization: Bearer <admin-jwt-or-access-token>' \\\n -d '{\n \"vector\": [0.1, 0.2, 0.3, 0.4],\n \"limit\": 5,\n \"filter\": {\n \"must\": [\n {\"key\": \"category\", \"match\": {\"value\": \"A\"}}\n ],\n \"must_not\": [\n {\"key\": \"value\", \"range\": {\"gt\": 50}}\n ]\n }\n }'\n\n# Response:\n# {\n# \"usage\": { \"hardware\": null },\n# \"time\": 0.001301257,\n# \"status\": \"ok\",\n# \"result\": [\n# { \"id\": 1, \"version\": 0, \"score\": 1, \"payload\": null, \"vector\": null }\n# ]\n# }\n"
- lang: cURL
label: OR filter
source: "curl -X POST \"http://localhost:6573/collections/my_collection/points/search\" \\\n -H \"Content-Type: application/json\" \\\n -H 'Authorization: Bearer <admin-jwt-or-access-token>' \\\n -d '{\n \"vector\": [0.1, 0.2, 0.3, 0.4],\n \"limit\": 5,\n \"filter\": {\n \"should\": [\n {\"key\": \"category\", \"match\": {\"value\": \"A\"}},\n {\"key\": \"category\", \"match\": {\"value\": \"B\"}}\n ]\n }\n }'\n\n# Response:\n# {\n# \"usage\": { \"hardware\": null },\n# \"time\": 0.001109878,\n# \"status\": \"ok\",\n# \"result\": [\n# { \"id\": 1, \"version\": 0, \"score\": 1, \"payload\": null, \"vector\": null },\n# { \"id\": 2, \"version\": 0, \"score\": 0.9688639640808105, \"payload\": null, \"vector\": null }\n# ]\n# }\n"
- lang: cURL
label: ID filter
source: "curl -X POST \"http://localhost:6573/collections/my_collection/points/search\" \\\n -H \"Content-Type: application/json\" \\\n -H 'Authorization: Bearer <admin-jwt-or-access-token>' \\\n -d '{\n \"vector\": [0.1, 0.2, 0.3, 0.4],\n \"limit\": 5,\n \"filter\": {\n \"must\": [\n { \"has_id\": [1, 2] }\n ]\n }\n }'\n\n# Response:\n# {\n# \"usage\": { \"hardware\": null },\n# \"time\": 0.001272852,\n# \"status\": \"ok\",\n# \"result\": [\n# { \"id\": 1, \"version\": 0, \"score\": 1, \"payload\": null, \"vector\": null },\n# { \"id\": 2, \"version\": 0, \"score\": 0.9688639640808105, \"payload\": null, \"vector\": null }\n# ]\n# }\n"
- lang: cURL
label: Combined boolean filter
source: "curl -X POST \"http://localhost:6573/collections/my_collection/points/search\" \\\n -H \"Content-Type: application/json\" \\\n -H 'Authorization: Bearer <admin-jwt-or-access-token>' \\\n -d '{\n \"vector\": [0.1, 0.2, 0.3, 0.4],\n \"limit\": 5,\n \"filter\": {\n \"should\": [\n {\"key\": \"category\", \"match\": {\"value\": \"A\"}},\n {\"key\": \"category\", \"match\": {\"value\": \"B\"}}\n ],\n \"must\": [\n {\"key\": \"value\", \"range\": {\"lt\": 100}}\n ],\n \"must_not\": [\n {\"key\": \"value\", \"range\": {\"lt\": 5}}\n ]\n }\n }'\n\n# Response:\n# {\n# \"usage\": { \"hardware\": null },\n# \"time\": 0.004577864,\n# \"status\": \"ok\",\n# \"result\": [\n# { \"id\": 1, \"version\": 0, \"score\": 1, \"payload\": null, \"vector\": null },\n# { \"id\": 2, \"version\": 0, \"score\": 0.9688639640808105, \"payload\": null, \"vector\": null }\n# ]\n# }\n"
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: Admin JWT or access token for authenticating requests to VectorAI DB.