Skip to main content

NQL Filter Reference

Ghost uses NQL (Notion Query Language) for filtering resources. The filter parameter on browse tools accepts NQL expressions.

Syntax

Basic Filters

field:value

Operators

OperatorSyntaxExample
Equalsfield:valuestatus:published
Not equalsfield:-valuestatus:-draft
Greater thanfield:>'value'published_at:>'2024-01-01'
Less thanfield:<'value'published_at:<'2024-06-01'
Greater or equalfield:>='value'created_at:>='2024-01-01'
Less or equalfield:<='value'created_at:<='2024-12-31'

Combining Filters

CombinatorSyntaxDescription
AND+Both conditions must match
OR,Either condition must match
tag:news+featured:true       # Posts tagged "news" AND featured
status:draft,status:scheduled # Posts that are draft OR scheduled

Grouping

Use parentheses to group complex expressions:

(tag:news+featured:true),(tag:tutorials+featured:true)

Post Filters

FilterDescription
status:draftDraft posts only
status:publishedPublished posts only
status:scheduledScheduled posts only
featured:trueFeatured posts
tag:newsPosts with "news" tag (by slug)
author:johnPosts by author "john" (by slug)
published_at:>'2024-01-01'Posts published after date
tag:news+featured:trueCombine filters (AND)
status:draft,status:scheduledMultiple values (OR)
visibility:publicPublicly visible posts
visibility:paidMembers-only posts

Member Filters

FilterDescription
status:freeFree members
status:paidPaid members
status:compedComplimentary members
subscribed:trueSubscribed to newsletters
label:vipMembers with "vip" label
created_at:>'2024-01-01'Members joined after date

Tag Filters

FilterDescription
visibility:publicPublic tags
visibility:internalInternal tags (# prefix)

Examples

Complex post query

Get featured tutorials published in 2024:

tag:tutorials+featured:true+published_at:>'2024-01-01'+published_at:<'2025-01-01'

Member segmentation

Get paid members who joined recently and are subscribed:

status:paid+created_at:>'2024-06-01'+subscribed:true

Draft content audit

Get all draft and scheduled posts by a specific author:

(status:draft,status:scheduled)+author:john