Skip to main content
POST
/
v2
/
notes
/
search
Search Notes by Keyword
curl --request POST \
  --url https://api.affinity.co/v2/notes/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>",
  "noteIds": [
    1073741824
  ],
  "limit": 20
}
'
{
  "data": [
    {
      "note": {
        "id": 1073741824
      },
      "preview": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Search all notes in the org, or limit to specific note IDs.

prompt
string
required

The search query. Returns up to limit notes ordered by relevance. Prompts with no strong matches may still return low-relevance results.

Required string length: 3 - 500
Example:

"Series B terms"

noteIds
integer<int32>[]

Limit search to these specific notes. Omit for org-wide search.

Maximum array length: 100
Required range: 1 <= x <= 2147483647
Example:
[1, 2]
limit
integer<int32>
default:20

Maximum number of notes to return.

Required range: 1 <= x <= 100

Response

Created

Results of a keyword search over notes.

data
notes.SearchResult · object[]
required

Matching note results, one per note, ordered by relevance.

Maximum array length: 100