Purpose
/messages/searchSearch accessible guilds with Discord's native message search.
Unscoped requests process four guilds at a time. Pass the opaque cursor returned by one page to resume at the next stable guild batch. The truncated flag and truncated_guilds identify result-limit truncation.
Authentication
Send a tenant API key as Authorization: Bearer <key> or X-API-Key: <key>. Keep keys server-side and use the account slug for the connected Discord account.
Parameters
Request example
Replace the tenant, account, and resource placeholders before running this read-only request.
curl --fail-with-body \
-H "Authorization: Bearer ${DATAZ_API_KEY}" \
"https://dataz.md/gateway/v1/{tenant_slug}/accounts/{account_slug}/messages/search?limit=100"
Response schema
Response example
Representative JSON shape. The live response can include additional documented fields.
{
"results": [
{
"id": "123456789012345678",
"channel_id": "123456789012345670",
"guild_id": "123456789012345600",
"content": "Example matching message",
"author_id": "123456789012345679",
"author_username": "example_user",
"author_display_name": "Example User"
}
],
"authors": [
{
"id": "123456789012345679",
"username": "example_user",
"display_name": "Example User"
}
],
"searched": [
"123456789012345600"
],
"skipped": [],
"cursor": null,
"partial": false
}
Errors
Limits and pagination
- Use
limitto bound each response; it defaults to 50 and accepts 1–100. - Use
beforeto continue toward older records orafterfor incremental reads; store source IDs as cursors. - Provider or demo limits can return HTTP 429. Wait for the
Retry-Afterinterval before retrying.
Related tutorials
Read-only notes
This reference page documents a public GET endpoint. Setup/token, AI, dev, internal, and mutating routes are excluded from static reference generation.