How to get children and parent book pages I have nid of a book page. I need the nid of the parent and nid of all direct and indirect childs.

How to retrieve the parent and child IDs?
This is for Drupal 6 but might also apply to Drupal 7.
The hierarchy of a book is created with a menu. When you have the node object in $node you'll get the menu link id of the parent in $node-&gt;book['plid']. You can then load the corresonding node with menu_link_load().

As for the children you have to get the menu that represents the hierarchy of your book with menu_tree_all_data($node-&gt;book['menu_name']) and then go through that menu to fetch the links you need.