Skip to main content

Data Selections

POST 

/v1/query

Execute a query with the given projection ID and filters.

The below example demonstrates how to call the endpoint using curl. It includes the projection_id of our Atlas dataset, and a selection with filters for "comfortable" and "outdoor" in the title field.

The results will be all the data in the dataset with both the terms "comfortable" and "outdoor" in the title field.

See this guide for a more detailed walkthrough.

curl -X POST 'https://api-atlas.nomic.ai/v1/query' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer $NOMIC_API_KEY' \
-d '{
"projection_id": "f1e499cd-b5c1-4d31-b38a-fff61e1f8b59",
"selection": {
"method": "composition",
"conjunctor": "ALL",
"filters": [
{
"method": "search",
"query": "comfortable",
"field": "title"
},
{
"method": "search",
"query": "outdoor",
"field": "title"
}
]
}
}'

Request

Body

required
    projection_iduuidrequired

    selection

    objectrequired
    methodstringrequired

    Possible values: [composition]

    polarityboolean
    Default value: true
    conjunctorstringrequired

    Possible values: [ANY, ALL]

    cherries

    object
    polarityboolean
    Default value: true
    methodstringrequired

    Possible values: [cherrypick]

    addedarray[]

    Possible values: >= 2, <= 2

    Default value: []
    removedarray[]

    Possible values: >= 2, <= 2

    Default value: []
    fieldstringnullable

    filters

    object[]
  • Array [

  • oneOf

    polarityboolean
    Default value: true
    methodstringrequired

    Possible values: [search]

    querystringrequired
    fieldstringrequired
    ignoreCaseboolean
    Default value: true
    regexboolean
    Default value: false
    wordBoundaryboolean
    Default value: false
  • ]

Responses

Returns the datum IDs for each point in your dataset included in your selection.

Schema
    dataobject[]required