<?php
add_filter( 'facetwp_render_output', function( $output, $params ) {
$output['settings']['post_ids'] = FWP()->filtered_post_ids;
return $output;
}, 10, 2 );
// To access the post IDs, type "FWP.settings.post_ids" into the browser console