I would like to get a facebook group id by using a URL or specific identifier.
For ex: http://www.facebook.com/groups/chennaifoodies/ should give group
I don't think you can get the Group ID from the url you mentioned with the group username.
But, you surely can get the same with the url:
http://graph.facebook.com/search?q=chennaifoodies&type=group&access_token=ACCESS_TOKEN
Yes, you'll be needing an active user access token to query this.
Or, the graph API (the same thing)-
/search?q=chennaifoodies
Demo