工具 API

list_records_for_table

Lists records queried from an Airtable table. Do not assume baseId and tableId. Obtain these from search_bases → list_tables_for_base. Do not attempt to pass filterByFormula. Look carefully at the filters parameter. Pre-requisite: If filtering on singleSelect/multipleSelects fields, and the choice name is not provided, you must call get_table_schema first to get the choice IDs. Aim to provide at least 6 relevant fields via the 'fieldIds' parameter. Note: singleSelect and multipleSelects field values are returned as objects (e.g., {"id": "sel...", "name": "Option", "color": "blue"}) or arrays of such objects. When writing these values back via create_records_for_table or update_records_for_table, use the plain string name (e.g., "Option") instead of the object. If the base is not found or returns a permission error, the user may have interface-only access. Try list_records_for_page instead.

productivityOAuth1 积分

调用信息

工具标识
airtable.list_records_for_table
服务提供方
Airtable
平均响应
0 ms
近 7 天调用
0

输入参数

baseId必填

The ID of the base containing the table. Must start with "app" and is 17 characters long. Example: "appZfrNIUEip5MazD". Do not substitute user-facing names for baseId. To get baseId, use the search_bases or list_bases tool.

tableId必填

The table to list records from. Accepts either a table ID (e.g., "tblGlReoTNWfYnXIG") or a table name (e.g., "Orders"). Names are resolved case-insensitively within the base. To discover tables, use the list_tables_for_base tool.

fieldIds

Only data for fields whose IDs or names are in this list will be included in the result. Pass in only the fields most useful for the user to see. If not provided, all fields will be included in the result. Accepts either a field ID (e.g., "fldGlRtkBNWfYnPOV") or a field name (e.g., "Status"). Names are resolved case-sensitively within the table. To discover fields, use the list_tables_for_base tool.

pageSize

The maximum number of records to return in the response. The server may respond with fewer records than this value when the total set has fewer records than this value.

cursor

The cursor to start from. To begin from the first record, do not include a cursor. For a subsequent paginated request, include the nextCursor from the previous response.

sort

A list of sort objects that specifies how the records will be ordered. Each sort object must have a fieldId key specifying the field to sort on (ID or name), and an optional direction key that is either "asc" or "desc". The default direction is "asc". Records are sorted by the first sort object first, then by the second sort object for records that have the same value for the first sort, and so on. Example sort by a single field in descending order: [{"fieldId": "Status", "direction": "desc"}] Example sort by two fields, first ascending then descending: [{"fieldId": "Priority", "direction": "asc"}, {"fieldId": "Created", "direction": "desc"}]

recordIds

An array of record IDs to filter by. Only records with these IDs will be returned. Must start with "rec" and is 17 characters long. Example: "recZOTa3BDHxlJNzf". Do not substitute user-facing names for IDs To get recordId, use the list_records_for_table tool or display_records_for_table tools.

filters

Describes the filters to apply to the records using a structured format. Example filter where the value of the field with ID "fld8WsrpLHHevsnW8" is "orange" or the value of the field with ID "fldulcCPDVz87Bmnw" is greater than 5: {"operator": "or", "operands": [{"operator": "=", "operands": ["fld8WsrpLHHevsnW8", "orange"]}, {"operator": ">", "operands": ["fldulcCPDVz87Bmnw", 5]}]} Example filter where the value of the collaborator field with ID "fldCRi9oz2vRLcIWr" can be any user in a group with ID "ugpDUVUnftA7H9bG8" and the value of the field with ID "fldgD18XtsueoiguT" equals select option with ID "selha8nGNAT5ATR7P": {"operator": "and", "operands": [{"operator": "hasAnyOf", "operands": ["fldCRi9oz2vRLcIWr", "ugpDUVUnftA7H9bG8"], "operatorOptions": {"matchGroupsByMembership": true}}, {"operator": "=", "operands": ["fldgD18XtsueoiguT", "selha8nGNAT5ATR7P"]}]} Example filter for records where a date field is within the past week: {"operands": [{"operator": "isWithin", "operands": ["fldABC12345678x", {"mode": "pastWeek", "timeZone": "America/New_York"}]}]} Example filter for records where a field is not empty: {"operands": [{"operator": "isNotEmpty", "operands": ["fldABC12345678x"]}]}