Analytics

This document explains how to perform common analytics queries using the FORT Pages API. All of the examples below assume you have already created a Notebook and have imported the Search Client module.

Important note: These endpoints provide aggregate metrics on Pages. They are designed to help researchers observe and analyze engagement patterns of Pages and use that analysis to decide which Pages to focus on for their research, thereby saving their overall time on analysis. While these aggregations are directionally accurate, it is possible that these numbers are "up to the minute" accurate. So care should be taken to use these endpoints only for use cases as intended.

Limitations

While we won’t apply any formal limit on query size, we recommend the following for best performance:

  • Request no more than 250 page IDs in a single API call
  • Avoid request that return more than 10,000 records in a single API call

Page follower counts over time

To get the total number of lifetime followers per country of a Page or set of Pages over time, use the get_follower_counts() method and pass it an array of Page IDs using the page_ids argument.

get_follower_counts(page_ids=PAGE_IDS)

Lifetime is a rolling count; if the time at which a user followed a Page falls within the requests defined time frame, the follow will be included in the count even if the user later unfollowed the Page.

Refer to the get_follower_counts() method reference for supported arguments.

Sample Request

follower_counts = search_client.get_follower_counts(
    page_ids=[196802957523030,101505831531203]
)

result = next(follower_counts)
display(result.head())

Sample Response

Admin post counts over time

To get the number of admin posts on a Facebook page over time, use the get_post_counts() method and pass it an array of Page IDs using the page_ids argument.

get_post_counts(page_ids=PAGE_IDS)

Refer to the get_post_counts() method reference for supported arguments.

Sample Request

post_counts = search_client.get_post_counts(
    [196802957523030,101505831531203]
)
  
result = next(post_counts)
display(result.head())

Sample Response

Page engagement counts over time

To get the number of user engagements on Page posts over time, use the get_engagement_counts() method and pass it an array of Page IDs using the page_ids argument.

get_engagement_counts(page_ids=PAGE_IDS)

Refer to the get_engagement_counts() method reference for supported arguments.

Sample Request

engagement_counts = search_client.get_engagement_counts(
    [196802957523030,101505831531203]
)

result = next(engagement_counts)
display(result.head())

Sample Response