# dataSources.search

Search a data source for databases and pages shared with Oatmilk, most recently edited first. Supply source, optional query, kind (database, page, file or any), cursor and limit. For google_drive it searches file and folder names across My Drive and shared drives (kind file leaves folders out; Drive has no databases).

`GET | POST /api/v1/accounting/dataSources.search`

Permissions: `accounting:read` · Roles: admin, finance

MCP tool: `accounting_data_sources_search`

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `source` | enum | Yes | Where the record came from. One of: `notion`, `google_drive`, `onedrive`. |
| `query` | string |  | Text to search for. at most 200 characters. |
| `kind` | enum |  | Which kind of record or job this is. One of: `database`, `page`, `file`, `any`. Default `"any"`. |
| `cursor` | string |  | Where the next page starts: the nextCursor value from the previous response. 1–500 characters. |
| `limit` | integer |  | How many results to return at most. 1 to 50. Default `20`. |

## Example request

```bash
curl -G https://app.getoatmilk.com/api/v1/accounting/dataSources.search \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  --data-urlencode 'source=notion'
```

Reference page: https://app.getoatmilk.com/docs/api/dataSources.search
