The pg_freespacemap module provides a means for examining the free space map (FSM). It provides a function called pg_freespace, or two overloaded functions, to be precise. The functions show the value recorded in the free space map for a given page, or for all pages in the relation.
By default public access is revoked from the functions, just in case there are security issues lurking.
F.26.1. Functions pg_freespace(rel regclass IN,
blkno bigint IN) returns int2 Returns the amount of