How to specify multiple values ​​in siteSearch in a custom google search api?

I am using google goi custom search and want to create a search using siteSearch:

https://www.googleapis.com/customsearch/v1?key=k&cx=cx&q=cocos2d&siteSearch=www.cocos2d-iphone.org&siteSearchFilter=i

and it works fine (returns all the result only from the given site).

Then I want to specify TWO sites to search so I tried to change the :
siteSearch=www.cocos2d-iphone.org

to 
siteSearch=www.cocos2d-iphone.org www.XXXXXXXX.org
siteSearch=www.cocos2d-iphone.org|www.XXXXXXXX.org
siteSearch=www.cocos2d-iphone.org||www.XXXXXXXX.org

but none of these works.

hope someone can help here, thanks:)
+5
source share
3 answers

Currently, I do not believe that you can specify more sites through a param siteSearch request.

however, you can set up your custom search engine here: https://www.google.com/cse/manage/all in the "Search Area" area.

This also works for exclusion, as you can read here: https://support.google.com/customsearch/bin/answer.py?hl=en&answer=2631038&topic=2601037&ctx=topic

+3
source

as_sitesearch, . , , as_q, , : "site: google.com OR site: microsoft.com" - .

as_q :

as_q . , . q = & as_q = John + Adams

0

""

PHP,

$url="https://www.googleapis.com/customsearch/v1?key=k&cx=cx&q=cocos2d&siteSearch=".urlencode("www.cocos2d-iphone.org www.XXXXXXXX.org")."&siteSearchFilter=i"

,

-1

All Articles