---
schema_version: "1"
id: d81d07c76cb2804449169775714baf436ddbea33517de467d80c934171bf64c3
title: Get Site-Specific Feed Elements from a Feed
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexcode/connectapi_examples_get_feed_elements_community_scoped.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/connectapi_examples_get_feed_elements_community_scoped.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7d3540c6590d99b27ea6d2cd491b9f7825f9975e85c5a329f87aef3a822dd8ad
description: Call a method to display a user profile feed that contains only feed elements that are scoped to a specific Experience Cloud site.
---
# Get Site-Specific Feed Elements from a Feed

Call a method to display a user profile feed that contains only feed elements that are scoped to a specific Experience Cloud site.

Feed elements that have a User or a Group parent record are scoped to sites. Feed elements whose parents are record types other than User or Group are always visible in all sites. Other parent record types could be scoped to sites in the future.

This example calls [getFeedElementsFromFeed(communityId, feedType, subjectId, recentCommentCount, density, pageParam, pageSize, sortParam, filter)](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexref.meta/apexref/apex_ConnectAPI_ChatterFeeds_static_methods.htm#apex_ConnectAPI_ChatterFeeds_getFeedElementsFromFeed_7a) to get only site-specific feed elements.

ConnectApi.FeedElementPage fep = ConnectApi.ChatterFeeds.getFeedElementsFromFeed(Network.getNetworkId(), **ConnectApi.FeedType.UserProfile**, 'me', 3, ConnectApi.FeedDensity.FewerUpdates, null, null, ConnectApi.FeedSortOrder.LastModifiedDateDesc, **ConnectApi.FeedFilter.CommunityScoped**);