Fetching planetscope metadata

I am fetching metadata for S2L2A imagery using the catalog api as shown below which works fine. How should I fetch metadata for planetscope data?

Code below works for sentinel-2-l2a

const searchParams = {
bbox,
datetime: `${timeRange.from}/${timeRange.to}`,
collections: ['sentinel-2-l2a'],
limit: 100,
};

  const fetchData = () => {
    fetch('https://services.sentinel-hub.com/api/v1/catalog/1.0.0/search', {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bearer ${token}`,
      },
      body: JSON.stringify(searchParams),
    })
    .then(response => response.json())
    .then(data => {
      console.log(data);
      setCatalogData(data);
     const cloudCovers = data.features.map(feature => feature.properties['eo:cloud_cover']);
      setcloudCover(cloudCovers[0])
      toast('Data fetched successfully');
    })
    .catch(error => {
      console.error(error);
    });
  };

Hi @eddiemuhoro ,

Catalog API allows you to query the PlanetScope data you ordered or subscribed. To search for available PlanetScope data, please use the search data from Third Party Data Import API which returns features as Planet Quick search does.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.