The issue you are running into is that MAAS requires authentication before it will return the node listing. MAAS normally authenticates API requests through OAuth, not HTTP Basic Authentication which is what curl -u uses by default for web URLs.
Luckily, MAAS also provides a Python client library called apiclient which is included in the python-maas-client package. Using that library would allow you to trivially issue the query with an apikey, which you can get from http://$MAAS_URL/MAAS/account/prefs/. Assuming you have APIKEY and MAAS_URL, the below snippet demonstrates how you'd fetch the listing:
APIKEY = "foo:bar:baz"
MAAS_URL = "http://my.maas.host/MAAS/api/1.0"
from apiclient import maas_client
auth = maas_client.MAASOAuth(*APIKEY.split(":"))
client = maas_client.MAASClient(auth, maas_client.MAASDispatcher(), MAAS_URL)
print client.get(u"nodes/", "list").read()
Incidentally, AIUI curl -X GET is the query type curl issues by default.
[*] I believe marking the path as unicode should not be necessary, but there's an assertion in the code that may be a bug. Reported https://bugs.launchpad.net/maas/+bug/1418158.