I would like to get the list of functions that are part of a certain OpenGL profile and the list of the ones that are deprecated so that I can avoid those.
The true source of this information is in the various OpenGL specifications. They contain a list of what functions there are, what their definitions are, what enumerators those functions take, and so forth. For each OpenGL version.
If you want what was removed (deprecated means "present but not advised to use". When something is removed, it is removed), the 3.1 spec section E.2.2 has a list of the removed functionality.
However, if you simply want to avoid non-core functions, you should use an OpenGL loading library that has headers that exclude removed functions. GL3w can work in this capacity, but it doesn't load extensions. The only one I know of that does this is my own (which is why I wrote it; to get rid of the non-core cruft).
As an alternative to navigating the registry PDFs.
The quickest/easiest way I have found is to do a search in the raw gl.spec file. It's the file from which the other stuff is generated, not designed to be human readable but isn't bad.
Just remove the leading prefixes, gl or GL_ from the name. The entries have a deprecated property as well as adding them to a deprecated category. It also tells you at what version it was introduced so you know when it's been made available.
You could also process them using a simple script to extract the information and put it into a list.
You have all this information in he OpenGL Registry. There you can check the current OpenGL API, OpenGL Shading Language and GLX Specifications and Reference Pages, as well as the old versions'.