Answer the question
In order to leave comments, you need to log in
Is it possible to use the Google Custom Search API to search for more than just certain URL patterns?
You need to add image search to the site (from any sites) using the Google Custom Search API, but here's the problem - the url template is required (parameter cx or cref)
GET https://www.googleapis.com/customsearch/v1?q=xbox&key={YOUR_API_KEY}
{
"error": {
"errors": [
{
"domain": "global",
"reason": "conditionNotMet",
"message": "Need to provide a Custom Search Engine ID. Missing cx or cref parameter.",
"locationType": "header",
"location": "If-Match"
}
],
"code": 412,
"message": "Need to provide a Custom Search Engine ID. Missing cx or cref parameter."
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question