We need to display viewslifetime (page view count) in our SharePoint page using search API. But when we are hitting the search API query it is giving data for some of the sharepoint pages. but when it comes to older sharepoint pages (2018). it is not displaying data. We have filter the query on the basis of sharepoint page URL to display viewslifetime(page view count).
API - URL/_api/search/query?querytext=''&sourceid='f3c91631-eff1-4f7b-aa2e-dcb2cbe377de'&selectproperties='ViewsLifeTime,PublishingStatusOWSTEXT,Path,Title'&refinementfilters='Path:("URL")'
Please let us know if this is the correct API.