Given a groupoid $G$, its classifying space is defined as the standard geometric realisation of the nerve.

My question is: since the classifying space of a group is the only space up to homotopy that has certain homotopy groups, can something like that be said about the case of a groupoid? For example, do the homotopy groups of $BG$ have some relationship (obviously much less trivial) with the groupoid $G$?

And if not (as I suspect) is there some other "geometrical" invariant of the space $BG$ that yields back $G$ in some form (like the first homotopy group in the case when $G$ is a group)?

Thank you in advance.