--- title: "system.kafka.seekLatest" description: "Retrieves the last N number of records from a specified topic." --- # system.kafka.seekLatest > Retrieves the last N number of records from a specified topic. This function is used in **Python Scripting**. ## Description ## Client Permission Restrictions This scripting function has no [Client Permission](ignition-modules\vision\vision-project-properties\vision-project-properties.md#vision-permissions-properties) restrictions. ## Syntax `system.kafka.seekLatest(connector, topic, partition, recordCount, [options])` ### Parameters | Type | Parameter | Description | |---|---|---| | String | `connector` | The name of the Kafka connector. | | String | `topic` | The name of the Kafka topic. | | Integer | `partition` | The partition to target. | | Integer | `recordCount` | The number of records to return. | | Dictionary | `options` | Custom options specific to the consumer, with key value string pairs. Optional. | ### Returns **List** - An N number of records from a specified topic, as a list. ### Scope Gateway ## Code Examples ```python title="Example #1" # Returns the latest 5 records from the specified topic. system.kafka.seekLatest("MyKafkaConnector", "MyKafkaTopic", 3, 5) ```