How can I get the information of an area light in a surface shader?

I am implementing a real-time area light shading algorithm. I am wondering is there any way to get the information of an area light in a surface shader, like light’s position, width and height, color and intensity,etc.

Yes and no. Surface Shaders are designed to help interface with Unity’s built in lighting systems, and for that they’re pretty good. However there’s not a good way of adding new types of lights, or even append data to existing lights. You’d have to pass the appropriate data to the material manually with SetVector() calls and the like, and calculate it all in the surf function, outputting it as part of the emission color.

Most of the time when people implement new light types they stick to using the deferred rendering path. That removes the lighting code from the Surface Shader itself. Unity implemented real time area lights for the original Adam demo this way.
https://github.com/Unity-Technologies/VolumetricLighting