---
schema_version: "1"
id: 491979fca2b975b4442ad25ac1acb9028ade679bbc61988e7ed6b2520a90639d
title: Get Related List Record Count
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/uiapi/ui_api_resources_related_list_count.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_resources_related_list_count.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8035a35c416c3962e2443e291ad5f25337333176a3285b8088936fe861ca9380
description: Returns the record count for a related list.
---
# Get Related List Record Count

Returns the record count for a related list.

Resource

/ui-api/related-list-count/${parentRecordId}/${relatedListId}

- parentRecordId—The ID of the record you want to get related lists for.
- relatedListId—The ID of a supported related list for that object.

Available Version

50.0

HTTP Method

GET

Example

To get the number of records in the Contracts related list for the account 001RM000003UNu6YAG, make this request.

/services/data/v68.0/ui-api/related-list-count/001RM000003UNu6YAG/Contracts

Request Parameters

| Parameter Name | Type | Description | Required or Optional | Available Version |
| --- | --- | --- | --- | --- |
| maxCount | Integer | The maximum number of records to return. The default value is 20. | Optional | 50.0 |

Response Body

[Related List Record Count](https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_responses_related_list_record_count.htm "The number of records in a given related list.")