Background
Currently, querying records in a Bitable table requires +record-list with client-side filtering. For large tables (2400+ records), this requires 13+ serial API calls and takes 60+ seconds.
The Feishu Open Platform provides a more efficient /records/search API:
- Endpoint:
POST /open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/search
- Server-side filtering: supports
contains, is, isNot, etc. on any field
- Larger page size: up to 500 records per request (vs 200 for list)
- Result: 1–2 requests instead of 13+, roughly 10–100x faster
Problem with current lark-cli api
Calling this endpoint via lark-cli api silently exits with code 1, no stdout, no stderr:
MSYS_NO_PATHCONV=1 lark-cli api POST "/open-apis/bitable/v1/apps/xxx/tables/yyy/records/search" --as user --data '{"page_size":5}'
# Exit: 1, no output at all
GET requests to other bitable endpoints work fine via lark-cli api. The issue appears specific to POST /records/search.
Requested Command
lark-cli base +record-search --base-token <token> --table-id <table_id> --filter '{"conjunction":"and","conditions":[{"field_name":"会议名称","operator":"contains","value":["keyword"]}]}' --sort '[{"field_name":"会议开始时间","desc":true}]' --field-names '["会议名称","会议开始时间","面试录音"]' --page-size 500 --page-all
Performance Impact
Searching interview records in a 2400-row Bitable table:
| Method |
Requests |
Time |
Current +record-list (full scan) |
13 serial calls |
60+ sec |
Optimized +record-list (range scan) |
5 calls |
~6 sec |
+record-search (server-side filter) |
1–2 calls |
~1 sec |
Reference
Background
Currently, querying records in a Bitable table requires
+record-listwith client-side filtering. For large tables (2400+ records), this requires 13+ serial API calls and takes 60+ seconds.The Feishu Open Platform provides a more efficient
/records/searchAPI:POST /open-apis/bitable/v1/apps/:app_token/tables/:table_id/records/searchcontains,is,isNot, etc. on any fieldProblem with current
lark-cli apiCalling this endpoint via
lark-cli apisilently exits with code 1, no stdout, no stderr:GET requests to other bitable endpoints work fine via
lark-cli api. The issue appears specific to POST/records/search.Requested Command
Performance Impact
Searching interview records in a 2400-row Bitable table:
+record-list(full scan)+record-list(range scan)+record-search(server-side filter)Reference