Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Adobe Stock Api Filters

New Here ,
Dec 26, 2024 Dec 26, 2024

Hi,

 

Currently working on the implementation to import the adobe stock images to aem dam. For that we would like to include the condition to filter the specific content_type and date range for the licensed assets.

I am looking for the help, is there any way to directly filter the content_type and date range from the curl command or using the query? When hitting this command https://stock.adobe.io/Rest/Libraries/1/Member/LicenseHistory?locale=en_US&search_parameters[limit]=... i am getting the following result. 

{
"nb_results":,
"files": [
{
"license": "Extended",
"license_date": "12/24/24, 5:39 AM",
"download_url": "",
"id":,
"title": "",
"creator_name": "",
"creator_id":,
"content_url": "",
"media_type_id": 2,
"vector_type": null,
"content_type": "image/jpeg",
"height": 3072,
"width": 5120,
"details_url": ""
}
] from the result i want to check the content_type is image/jpeg and would like to check the date range also. I checked the documentation and got the below curl "https://stock.adobe.io/Rest/Media/1/Search/Files?locale=en_US
&search_parameters%5Bwords%5D=dogs&search_parameters%5Blimit%5D=1&search_parameters%5Bfilters%5D%5Bcontent_type%3Aphoto%5D=1&search_parameters%5Border%5D=nb_downloads&result_columns%5B%5D=title&result_columns%5B%5D=details_url&result_columns%5B%5D=thumbnail_1000_url" \
-H "x-api-key: YourApiKeyHere" \
-H "x-product: MySampleApp/1.0" . But here content_type is specified as photo., means i am getting all the types of photos. 
 
If anyone knows the way how to sort this using a query, please let me know here. Thanks in advance!
 
 
 
Regards,
Bhavani Bharanidharan.
TOPICS
Stock API
345
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Jan 02, 2025 Jan 02, 2025

Hi Bhavani,

 

It is not possible to filter the response from the License History API. You would need to fetch each page of the history (a JSON array) and apply some application logic to find only assets with the fields you need. Both content type and license date should be in the response. After you have created this filtered list, then you can download the files with the URLs also provided in the response. 

 

Net, the flow would be 1) fetch license history > 2) filter the JSON response > 3) dow

...
Translate
Community Expert ,
Dec 31, 2024 Dec 31, 2024

Did you check here: https://developer.adobe.com/stock/docs/getting-started/?

 

Maybe I should tag @Christopher at Adobe

ABAMBO | Hard- and Software Engineer | Photographer
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 02, 2025 Jan 02, 2025

Hi Bhavani,

 

It is not possible to filter the response from the License History API. You would need to fetch each page of the history (a JSON array) and apply some application logic to find only assets with the fields you need. Both content type and license date should be in the response. After you have created this filtered list, then you can download the files with the URLs also provided in the response. 

 

Net, the flow would be 1) fetch license history > 2) filter the JSON response > 3) download assets. The API returns the newest assets first, so after this one-time effort to pull down all of the history, you can then run this process only on new assets. But there is no way using the API to fetch only one asset from a particular date. For that finer-grained control, you would need to use the License History on the Stock website.

 

If you have additional questions, please email stockapis@adobe.com.

 

Thanks,

Christopher

Thanks for the mention, @Abambo. Happy New Year! 🥳

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 02, 2025 Jan 02, 2025
quoteThanks for the mention, @Abambo. Happy New Year! 🥳

By @CFS the Stock API Guy

You're welcome and a Happy New Year. 

ABAMBO | Hard- and Software Engineer | Photographer
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 02, 2025 Jan 02, 2025
LATEST

Thanks Christopher for your response.  If there is not direct way to query the stock assets using the license expiry and content type, then we need go with the approach to fiter the license history assets in aem backend then download the needed one. 

 

Thanks again for the timely help!

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines