I am using the download.py program to recreate the planet labs example to download all data in an AOI for specific dates. I am curious to understand where exactly do I insert my API Key for now I added an additional line os.environ['PLANET_API_KEY']="Actual API Key" and I am able to replicate all the steps except when I use python download.py --download /tmp redding.json REOrthoTile visual

It gives me

**File "download.py", line 175 in module args.asset,args.overwrite) File "download.py", line 124, in process download download url=result.json()[asset_type]['location'] KeyError: location"**

so I am unable to download any of the activated scenes.

Also is there a way to know if I am downloading analytic versus the RGB data.

1 Answer 1


I tried download.py with my api key and https://www.planet.com/docs/api_cookbook/examples/redding.json and it worked fine. I got 30 visual Rapideye orthotiles.

If the asset name is "visual", then it is an 8bit RGB product. If you want five band 16 bit scaled radiance for Rapideye data, use the asset name "analytic".

Before I found the redding.json you were referring to I had lots of problems, and found it helpful to add a "print result.json()" statement after the .get calls. That might help you too - I'm curious what your result json looks like.

  • Hi Frank, I tried it out too, the problem was with the json file I was using it was at a location for which the API did not have request access. It seems to be working fine for now.
    – Sam
    Commented Oct 9, 2016 at 1:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.