So lets be real, the API is a lot... and like it'll return you a PageId which you'll then have to manually resolve (bleh).
https://www.progress.com/documentation/sitefinity-cms/for-developers-get-all-locations-of-an-item
However as of somewhere around Sitefinity 13 they added UI elements under content in the backend where you can SEE the content links in the UI, the counts and the locations. This is pretty great, but what's even better is getting at that data is just a simple GET request to their endpoints!
You can open the dev tools and inspect the query and result, but it's SO FAST and SO EASY if you need to show where pages or docs are located in one of your widgets.
So here's an example from documents
Getting the Counts of a Document
{baseUrl}/sf/system/documents({documentId})/displaypagescount
{
"@odata.context": "https://www.medportal.ca/sf/system/$metadata#Edm.Int32",
"value": 4
}
Or
Getting the actual location results of that document
{baseUrl}/sf/system/documents({documentId})/DisplayPages
{baseUrl}/sf/system/documents({documentId})/LinkItems
{
"value": [
{
"Title": "Course Registration",
"LiveUrl": "/academics/registration/course-enrollment",
"Url": "/academics/registration/course-enrollment"
},
{
"Title": "Academic Guidelines",
"LiveUrl": "/academics/information/academic-guidelines",
"Url": "/academics/information/academic-guidelines"
},
{
"Title": "Resources",
"LiveUrl": "/files/academic-docs/default-source/guidelines/Study-Guide-Template-(Mar-2024)---Section-1",
"Url": "/files/academic-docs/default-source/guidelines/Study-Guide-Template-(Mar-2024)---Section-1"
},
{
"Title": "Academic Support Resources",
"LiveUrl": "/support/academic-support-resources",
"Url": "/support/academic-support-resources"
}
]
}
Just a small note, that the INITIAL query to that endpoint takes a few moments to return, but the subsequent results will be cached.