Lookups in list in C
This is a binary search tree.
Do not cast the return value of malloc. It serves no purpose, and may mask a serious bug (in case stdlib.h is not included).
Lookup is usually implemented iteratively:

while (root) {
    if (root-&gt;id == id) {
        break;
    }
    root = (root-&gt;id &lt; id)? root-&gt;right: root-&gt;left;
}
return root;

insert_node may use less indentation. Early return makes else unnecessary:

node *insert_node(node *root, int data, int node_id) {
    if (root == NULL)
        return newNode(data, node_id);
    node *cur;
    if (node_id &lt; root-&gt;node_id) {
        cur = insert_node(root-&gt;left, data, node_id);
        root-&gt;left = cur;
    } else if (node_id &gt; root-&gt;node_id) {
        cur = insert_node(root-&gt;right, data, node_id);
        root-&gt;right = cur;
    }
    return root;
}

You may want to inform the caller that the insertion failed due to id already present.