Multiple fileType for Google Custom Search API during image searching - google-custom-search

Currently, I'm using Google Custom Search API, to perform image searching using REST
https://developers.google.com/custom-search/json-api/v1/reference/cse/list#request
I was wondering, what is the correct way, to specific multiple file type?
fileType is being mentioned briefly in the API document.
For instance, the following is the GET request, to search only BMP type image.
https://www.googleapis.com/customsearch/v1?key=GOOGLE_API_KEY&cx=GOOGLE_SEARCH_ENGINE_ID&q=picasso&searchType=image&fileType=bmp
However, what if I want to search both PNG and BMP image?
At first, I thought
fileType=png,bmp
might work as mentioned in http://codigogenerativo.com/code/google-custom-search-api/
However, if I test using
https://www.googleapis.com/customsearch/v1?key=GOOGLE_API_KEY&cx=GOOGLE_SEARCH_ENGINE_ID&q=picasso&searchType=image&fileType=png,bmp
JPEG images are being returned.
Seem like my assumption is wrong. Does anyone know how to have multiple fileType for Google Custom Search API during image searching?
p/s Similar question had been raised before few years ago but no concrete answer yet : Multiple file types search using Google Custom Search API

https://www.googleapis.com/customsearch/v1?fileType=jpg,png,AND OTHER TYPES YOU NEED&key=GOOGLE_API_KEY&cx=GOOGLE_SEARCH_ENGINE_ID&q=picasso&searchType=image

Related

Accessing full url of all page images Wikipedia API

I'm experimenting with the Wikipedia API and was trying to get the full urls for all images on a particular page, in this example Google's main page (http://en.wikipedia.org/wiki/Google).
I found the page id through the use of another API and then attempted to use this information in the following API to get the full urls of all images on that page:
http://en.wikipedia.org/w/api.php?action=query&pageids=1092923&generator=images&prop=imageinfo&iiprop=url|dimensions|mime&format=xml
I get some of the page images from this but cannot understand why I am not getting all - specifically the logo which is what I was most interested in. Apologies I am aware that there are similar questions which have been asked but I was not able to find one which would assist me here.
The API does not give you all results at once, it defaults to 10 results. You see in the beginning answer that you have a value for the parameter gimcontinue. If you use it like this you get more images: http://en.wikipedia.org/w/api.php?action=query&pageids=1092923&generator=images&prop=imageinfo&iiprop=url|dimensions|mime&format=xml&gimcontinue=1092923|Google_bike.jpg
Alternatively, you can ask for more images at once using gimlimit like this: http://en.wikipedia.org/w/api.php?action=query&pageids=1092923&generator=images&prop=imageinfo&iiprop=url|dimensions|mime&format=xml&gimlimit=500

Multiple file types search using Google Custom Search API

I need to get Google search results for particular filetypes.
For example, in browser I would directly google search for "hyperloop filetype:pdf" and it will list out PDF files for "Hyperloop".
For this, my Google Custom Search request URI will be https://www.googleapis.com/customsearch/v1?key=MY_KEY&cx=MY_UNIQUE_ID&q=hyperloop&fileType=pdf
However, currently I would like to get search results for "hyperloop" of filetypes .ppt or .doc.
In browser, I would achieve this by googling "hyperloop filetype:ppt OR filetype:doc".
What will be my Search request URI equivalent for this query?
I could not find anything related to querying using multiple values for a single parameter in Google Custom Search Documentation.
Rather than doing
q=hyerloop&filetype=pdf
you can use
q=hyperloop%20filetype:pdf%20OR%20filetype:doc
use this its work
$url='https://www.googleapis.com/customsearch/v1?key=AIzaSyCJUGIb_tevRKD-Kxxi5f4&cx=010407088:onjj7gscy2g&q='. urlencode($keywords).'&filetype=doc&filetype=docx';
for me

Is there a way to hide/show documents in a pdf portfolio created using adobe flash builder and the portfolio api filtered by the document metadata?

I am currently working on a PDF portfolio which essentially lets the user select their language. Depending on their selection, I want a to filter which documents are displayed (by showing on those which have a specified keyword in their metadata).
Currently, I am unsure of 2 things and require assistance on:
Whether a documents metadata (especially a pdf keyword field) can be reached using the portfolio API.
Whether documents inside a PDF portfolio can be hidden from the user.
If anyone has any thoughts around this area please discuss with me. I would greatly appreciate it.
Augier.
The answers to these two questions can be found here in my related posts:
How can I open an Attachment from a PDF Portfolio?
Using the Flex 4 API, how can I access data from a PDF in an adobe PDF portfolio?

Normal Google Custom Search

I'm writing an application that analyses search engine results.
With the Google Search API now being depreciated and limited to 1000 queries/day they are forcing developers to move to the AJAX APIs and to use the Custom Search API to do a Google search.
The thing is I don't need a Custom Search, I need a general search not one that is filtered by site; OK maybe filtered by USA/UK (Google.com/Google.co.uk).
Does anyone know how to just do a regular Google search using the AJAX APIs? Is the Custom Search the right thing to be using?
I don't want to hit the 1000/day limit using the old service but this is exactly what I need.
I did find: How do I create a CSE that searches the entire web?
http://www.google.com/support/customsearch/bin/answer.py?hl=en&answer=1210656
But by the sounds of it this will distort the search results.
Thank you.
OK. Here's how I think it is done.
Create a Custom Search Engine.
Add a site such as *.com When this is created go to the Advanced tab
and download the context xml.
Remove the Background Label associated with the site.
Upload the XML to replace the previous context.
This seems to work just fine and is returning the same values as far as I can see.
Yes, you are right *in theory, and this should let you get 100 results a day on the fly. Just this Saturday though, Google confirmed how here -
(* so far though, we can't get it working...)

Getting text information from the Internet into my app

I learning Objective C, and I am going to develop some apps. I have a general question: How to get text information from the Internet into your app. Say you want the current title of Yahoo News. Do I need to use some PHP, or are there Objective-C specific classes to choose from?
Help is appreciated (code as well!), just anything that can help me take te step to exploring the new possibilities!
If I understand your question, I'd say the best way to do it would be to get the HTML source from the URL of your choosing as a string, then parse it to grab an attribute such as the title. Have a look at NSString and NSXMLDocument; they both let you instantiate them from a URL.
Here's a great way to do it:
Go to Yahoo Pipes, and create your "pipe" (basically a feed of one or many different data inputs on the web).
Publish: Select a format for Yahoo to host, for example as an RSS feed or in JSON.
UIWebView can then point to your pipe's URL. (Here's a tutorial on UIWebView)
Done.
Note that you can choose to get the feed as RSS, JSON, and other formats as well. Here is an example of a pipe I set up for the National Vulnerabilities Database as RSS, and the same feed as JSON.
ASIHttpRequest Will keep you sane.