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_id uuidrequired

    selection

    object

    required

    method stringrequired

    Possible values: [composition]

    polarity boolean

    Default value: true

    conjunctor stringrequired

    Possible values: [ANY, ALL]

    cherries

    object

    polarity boolean

    Default value: true

    method stringrequired

    Possible values: [cherrypick]

    added array[]

    Possible values: >= 2, <= 2

    Default value: ``

    removed array[]

    Possible values: >= 2, <= 2

    Default value: ``

    field stringnullable

    filters

    object[]

  • Array [

  • oneOf

    polarity boolean

    Default value: true

    method stringrequired

    Possible values: [search]

    query stringrequired
    field stringrequired
    ignoreCase boolean

    Default value: true

    regex boolean
    wordBoundary boolean
  • ]

Responses

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

Schema

    data object[]required
Loading...