You can use the vSphere Automation API to retrieve content libraries of a specific type. For example, you can list only the local libraries in your virtual environment.
If you want to retrieve only a list of the local libraries, you must retrieve the LocalLibrary service and use the list function on the LocalLibrary service. To list only subscribed libraries, you must retrieve the SubscribedLibrary service and call the list function on the SubscribedLibrary service.