Scan your whole stack
From OX Research Newsroom
Are you using @unquery/notion?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.1.1
@unquery/notion was last scanned on 30 Nov 2026 at version 0.1.1. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.1.1 LATEST | 30 Nov 2026 | No rules fired |
| 0.1.0 | 30 Nov 2026 | No rules fired |
| 0.0.0-stage | 30 Nov 2026 | Not shown |
Findings for v0.1.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.1.1; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
UnQuery translator for Notion: it takes the filter model from @unquery/core and returns the filter object for a Notion data source query. Analogy: @unquery/core hands over the meeting minutes; this package rewrites them into Notion's search form, which only has ready-made fields (equals, contains, before, is empty) and accepts at most two levels of "and" and "or". What does not fit the form is refused instead of approximated. The package never calls the Notion API; your own code sends the query.
npm install @unquery/core @unquery/notion
# or: bun add @unquery/core @unquery/notion
ESM only, requires Node 24 or later (it also runs on Bun). No Notion library is a dependency of this package.
The API version is 2026-03-11 (exported as NOTION_VERSION) and the query is POST /v1/data_sources/{id}/query. The translator needs to know the type of each property, and the data source itself knows this: the provider reads the map from GET /v1/data_sources/{id} (field properties, from name to type) and passes it along in options.properties.
import { parseJsonFilter } from "@unquery/core";
import { NOTION_VERSION, toNotionFilter } from "@unquery/notion";
// Name -> type map, from the response of GET /v1/data_sources/{id}.
const source = await fetch(`https://api.notion.com/v1/data_sources/${id}`, { headers }).then((r) => r.json());
const properties = Object.fromEntries(Object.entries(source.properties).map(([name, p]: [string, any]) => [name, p.type]));
const filter = parseJsonFilter({ Name: { "@ne": "Ana" }, Price: { "@gte": 100 } });
const notion = toNotionFilter(filter, { properties });
// {
// and: [
// { or: [{ property: "Name", title: { does_not_equal: "Ana" } }, { property: "Name", title: { is_empty: true } }] },
// { property: "Price", number: { greater_than_or_equal_to: 100 } },
// ],
// }
await fetch(`https://api.notion.com/v1/data_sources/${id}/query`, {
method: "POST",
headers: { ...headers, "Notion-Version": NOTION_VERSION, "Content-Type": "application/json" },
body: JSON.stringify(notion === undefined ? {} : { filter: notion }),
});
When the filter matches all pages, the result is undefined and the query must be sent without the filter key.
title, rich_text, number, checkbox, select, multi_select, status, date, url, email, phone_number, created_time and last_edited_time. Any other type (relation, formula, people, files etc.) fails with OPS_UNSUPPORTED_FAIL when the filter uses it; properties of unsupported types in the map do not affect filters that do not mention them. A property missing from the map also fails with OPS_UNSUPPORTED_FAIL, even in a condition that would become a constant.
UnQuery talks about documents; Notion has pages. The translator assumes this correspondence (D27):
title, rich_text, url, email, phone_number, select, status, number and date are null.multi_select is an array with the option names ([] when empty, never null). So eq null on it never matches and ne null matches everything.checkbox is a boolean and is never empty.created_time and last_edited_time are Date and are never empty.exists true matches everything and exists false matches nothing.Operands: text is a string; number is a number; checkbox is a boolean; an element of multi_select is a string; date accepts only {"$plaindate": "YYYY-MM-DD"}; created_time and last_edited_time accept only {"$date": "..."}.
| Types | eq value |
eq null |
gt gte lt lte |
in |
all |
|---|---|---|---|---|---|
title, rich_text, url, email, phone_number, select, status |
equals |
is_empty |
fails (OPS_UNSUPPORTED_FAIL) with a string; constant with another type |
or of equals |
constant (never matches) |
number |
equals |
is_empty |
greater_than, greater_than_or_equal_to, less_than, less_than_or_equal_to |
or of equals |
constant (never matches) |
checkbox |
equals |
never matches | never matches | or of equals |
constant (never matches) |
multi_select |
contains |
never matches | fails with a string; constant with another type | or of contains |
and of contains |
date |
equals |
is_empty |
after, on_or_after, before, on_or_before |
or of equals |
constant (never matches) |
created_time, last_edited_time |
equals |
never matches | after, on_or_after, before, on_or_before |
or of equals |
constant (never matches) |
For the other operators:
exists is a constant (see the convention above).ne and nin are the exact complement of eq and in.and, or, not and nor are translated to Notion's and and or; not and nor are pushed down to the leaves by De Morgan (Notion has no group negation).like fails with OPS_UNSUPPORTED_FAIL (category unsupported): the case sensitivity semantics of Notion's contains and starts_with is not documented (S16).regex, the geospatial operators, size and elemMatch also fail with OPS_UNSUPPORTED_FAIL (Notion has no regex, REGEX_UNSUPPORTED_FAIL, and does not count or select options). An index in a path fails with PATH_INDEX.PATH_DOT_NOTATION; a property name with a dot goes in quotes ("Total.value"), as in any UnQuery path.is_emptySince Notion is not explicit about does_not_equal and does_not_contain on empty properties (S16), the translator never negates an already translated condition: it writes the exact complement by the document convention, adding is_empty when the property can be empty.
select, status and number: ne v becomes or(does_not_equal v, is_empty).multi_select: ne v becomes or(does_not_contain v, is_empty).date: Notion has no does_not_equal on dates; ne v becomes or(before v, after v, is_empty).created_time and last_edited_time: or(before v, after v), without is_empty.checkbox: equals of the opposite value.not gt 10 on a number becomes or(less_than_or_equal_to 10, is_empty); on timestamps, only the opposite range.eq null becomes is_not_empty (and ne null matches everything on checkbox and multi_select).The result holds under both possible readings of does_not_* on an empty property (matching or not), and the package's model test checks this.
undefined resultSome conditions do not depend on the page: exists true, exists false, in [], an operand of a type different from the property's (NO_COERCION: a number on title, a string on date), eq null on checkbox, all outside multi_select. The translator treats them as TRUE or FALSE, simplifies and and or with them and then:
TRUE: toNotionFilter returns undefined (matches everything; send the query without filter).FALSE: Notion has no constant, so a contradiction goes on the first property of the filter: is_empty and is_not_empty together (on checkbox, equals true and equals false; on timestamps, before and after of 1970-01-01T00:00:00.000Z). With no condition in the filter, the first supported property of the map is used.In the conformance vectors, undefined is written as expect: null.
Notion accepts and and or nested up to two levels (a compound at the top, compounds inside, property filters inside). After pushing down negations, simplifying constants and flattening and inside and and or inside or, a deeper tree fails with SEC_LIMITS_FAIL (category translation): a source limit is never truncated. Note: complements add levels. ne becomes an or, so a ne inside an and inside an or already exceeds the limit.
Notion's documentation does not confirm some behaviors. The translator adopts the most conservative reading and fails when there is no way to be exact:
equals and contains are case sensitive is not documented. The translator treats equals as exact (the UnQuery evaluator is case sensitive, S05) and for that reason like is not supported. Confirm with the real API before relying on this.on an empty property.** It is not known whetherdoes_not_equalanddoes_not_containinclude empty pages. For this reason every complement explicitly addsis_empty` (section above).date. A date property is treated as date-only: the operand is $plaindate, sent as YYYY-MM-DD. The comparison of a date without a time against a property that has a time is not specified by Notion. A $date operand on a date property fails with NO_COERCION (ambiguous, never approximated), and so does the inverse ($plaindate on created_time)."" on text, select, status and multi_select fails with NO_COERCION; for "empty", use null.status. Without the beta header, equals on status also matches the name of a status group. For exact matching, send Notion-Beta: status-group-filters-2026-10-06 on the query. The package does not send headers; that is the provider's responsibility.and/or (summary not confirmed). The translator does not check it.NaN, Infinity, array, object, Set, bytes and an invalid Date fail with NO_COERCION. -0 goes as 0.toNotionFilter(filter, options): NotionFilter | undefined: translates the filter; fails with UnQueryError.NOTION_VERSION: "2026-03-11".supportedOperators: the core (eq, ne, in, nin, gt, gte, lt, lte, exists) plus all; like, regex, size and the geospatial ones are left out.conformance: declaration { spec: "unquery", version: "0.1.0", translator: "notion", level: null, sets: [], missing: ["like", "size", "elemMatch"], operators } (D23): without like the translator does not meet the Core level (OPS_CORE), and the Array set is incomplete without size and elemMatch; missing lists what is lacking.NotionFilter, NotionOptions ({ properties: Readonly<Record<string, NotionPropertyType>> }) and NotionPropertyType.test/translate.test.ts: exact forms per case and a model test that compares the result with the core evaluator (the oracle, D13) under both readings of does_not_* on an empty property.conformance/vectors/notion/translate.json (operation translateNotion, format in conformance/README.md).Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.