Neynar Documentation

Searching Casts

You can search for casts using keywords and operators in the search query.

Node.js SDK

🔗 SDK Method: searchCasts Use this API endpoint with the Neynar Node.js SDK for typed responses and better developer experience.

Authorizations

x-api-key
string
header
default: NEYNAR_API_DOCS
required
API key to authorize requests

Headers

x-neynar-experimental
boolean
default: false
Enables experimental features including filtering based on the Neynar score. See docs for more details.

Query Parameters

q
string
required
Query string to search for casts. Supported operators:

Operator Description
+ Acts as the AND operator. This is the default operator between terms and can usually be omitted.
` `
* When used at the end of a term, signifies a prefix query.
" Wraps several terms into a phrase (for example, "star wars").
(, ) Wrap a clause for precedence (for example, `star + (wars
~n When used after a term (for example, satr~3), sets fuzziness. When used after a phrase, sets slop.
- Negates the term.
before: Search for casts before a specific date. (e.g. before:2025-04-20 or before:2025-04-20T23:59:59)
after: Search for casts after a specific date. (e.g. after:2025-04-20 or after:2025-04-20T00:00:00)

Example:

"star (wars | trek) \"space battle\" after:2024-05-04

mode
enum
Choices are:

Available options:

literal, semantic, hybrid

Example:

"literal

sort_type
enum
Choices are:

Available options:

desc_chron, chron, algorithmic

Example:

"desc_chron

author_fid
integer
Fid of the user whose casts you want to search
Required range: x >= 1

viewer_fid
integer
Providing this will return search results that respects this user's mutes and blocks and includes viewer_context.
Required range: x >= 1

parent_url
string
Parent URL of the casts you want to search

channel_id
string
Channel ID of the casts you want to search

limit
integer
default: 25
Number of results to fetch
Required range: 1 <= x <= 100

Example:

25

cursor
string
Pagination cursor.