Busabase
OpenAPI 参考

Search

Search across workspace content.

GET
/api/v1/search

Query Parameters

query?string

Full-text query. An empty string matches nothing.

Default""
mode?string

Search depth. quick skips live file-body scans for typeahead; full preserves complete search behavior.

Default"full"

Value in

  • "quick"
  • "full"
surface?string

Optional first-party UI surface for aggregate quality metrics. API/CLI callers should omit it.

Value in

  • "quick"
  • "advanced"
limit?integer

Results per page. Capped at 100; note the default is 20, not 50.

Range1 <= value <= 100
Default20
offset?integer

0-indexed skip count. This endpoint pages by offset, not by cursor.

Range0 <= value <= 9007199254740991
Default0
sources?array<>|

Restrict which content is searched. Omitting it searches ALL sources. Repeat the parameter to pass several (?sources=records&sources=files); a single occurrence is accepted as a bare value.

sort?string

Result order. relevance (default) keeps each source's own ranking — for records that is the full-text rank, for everything else most-recently-updated first. The four explicit orders sort every source by the same column so a mixed result set is comparable.

Default"relevance"

Value in

  • "relevance"
  • "updated_desc"
  • "updated_asc"
  • "created_desc"
  • "created_asc"
updatedAfter?string

Inclusive lower bound, ISO 8601. A UTC Z or an explicit offset; not a bare local time.

Formatdate-time
updatedBefore?string

Inclusive upper bound, ISO 8601. A UTC Z or an explicit offset; not a bare local time.

Formatdate-time
createdBy?string

Restrict to one creator. Matches the actor id, which may be an agent or API key.

inNodeId?string

Limit to this node and its descendants.

Response Body

application/json

curl -X GET "https://example.com/api/v1/search"
{  "query": "string",  "limit": 0,  "offset": 0,  "hasMore": true,  "results": [    {      "id": "string",      "kind": "record",      "title": "string",      "body": "string",      "eyebrow": "string",      "href": "string",      "updatedAt": "string",      "createdBy": null    }  ],  "contentTruncated": false}
POST
/api/v1/grep

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/grep" \  -H "Content-Type: application/json" \  -d '{    "pattern": "string"  }'
{  "matches": [    {      "source": "files",      "assetId": "string",      "fileName": "string",      "drivePath": "string",      "line": -9007199254740991,      "column": -9007199254740991,      "text": "string",      "before": [        "string"      ],      "after": [        "string"      ]    }  ],  "coverage": {    "files": {      "scanned": 0,      "missing": [        "string"      ],      "stale": [        "string"      ],      "unsearchable": 0,      "errored": [        "string"      ],      "notReached": 0    },    "nodes": {      "scanned": 0,      "errored": [        "string"      ],      "notReached": 0    },    "records": {      "scanned": 0,      "errored": [        "string"      ],      "notReached": 0    }  },  "truncated": true}
GET
/api/v1/nodes/search

Query Parameters

query*string

Matched against node NAMES only. Use /api/v1/search to search content.

Length1 <= length
limit?integer

Results to return. Capped at 50 here, unlike most listings' 100.

Range1 <= value <= 50
Default20

Response Body

application/json

curl -X GET "https://example.com/api/v1/nodes/search?query=string"
[  {    "id": "string",    "type": "folder",    "name": "string",    "slug": "string",    "path": "string",    "updatedAt": "string",    "icon": {      "type": "emoji",      "value": "string"    }  }]