One of our users asked to filter images by file type. This is supported in Google by using the filetype:x operator, where the x is the image extension (png, jpg, etc.)
In the past, we've implemented a validator that disallowed using certain filetype: values in https://github.com/serpapi/SerpApi/pull/3278, and suggested using tbs with the ift=x value. This seems to no longer work, and the filetype: is the correct approach.
EDIT. It looks like the tbs=ift:x is supported as opposed to the tbs=ift=x as suggested in the error message. However, I believe we should still allow filetype searches, or at least update the error message to ift:x instead of ift=x.
How to set the filetype search in Advanced Search for Google Images:
One of our users asked to filter images by file type. This is supported in Google by using the
filetype:x
operator, where thex
is the image extension (png
,jpg
, etc.)In the past, we've implemented a validator that disallowed using certain
filetype:
values in https://github.com/serpapi/SerpApi/pull/3278, and suggested usingtbs
with theift=x
value. This seems to no longer work, and thefiletype:
is the correct approach.EDIT. It looks like the
tbs=ift:x
is supported as opposed to thetbs=ift=x
as suggested in the error message. However, I believe we should still allowfiletype
searches, or at least update the error message toift:x
instead ofift=x
.How to set the filetype search in Advanced Search for Google Images:![image](https://github.com/serpapi/public-roadmap/assets/28161162/c2b09716-ba91-4f07-9841-af6827b8ab3e)
The result of the above:
Our Playground:
Playground | Google Search Intercom