Skip to main content

Hello,


I am trying to find the date of download the img from Planet using API but i didn’t find the way. How can I getting calling the API. I wish you could help me.

I use python in it.

Hi,

Could you please clarify what information you are trying to get from the API? If you take a look at your dashboard, it shows all collection details including the creation time of the collection. All the information can be obtained with Bring Your Own COG API, and you can follow the BYOC python example here.


I want time and date of image it take it from planet because i have subscription with Planet so Planet download image so i want to know date and time that planet download this image using API.


Hi,

I think you’re trying to get the timestamp of your PlanetScope products. In this case I would suggest using our Catalog API to search available data of your AOI within a time interval.

Below is an example you could use to get the available tile ids and the corresponding timestamps using Python.

from sentinelhub import CRS, BBox, DataCollection, SHConfig, SentinelHubCatalog

config = SHConfig()
config.sh_client_id = <your_sh_client_id>
config.sh_client_secret = <your_sh_client_secret>

data_collection = DataCollection.define_byoc(<your_planet_collection_id>)
catalog = SentinelHubCatalog(config=config)
bbox = BBox(bbox=<your_bbox_in_wgs84>, crs=CRS.WGS84)
time_interval = "yyyy-mm-dd", "yyyy-mm-dd"

search_iterator = catalog.search(
data_collection,
geometry=bbox,
time=time_interval,
fields={"include": :"id", "properties.datetime"], "exclude": :]},
)

results = list(search_iterator)
results

For more details, please refer to the Catalog API example .


Reply