"Request contains an invalid argument." Google Search API

This link: https://customsearch.googleapis.com/customsearch/v1?cx=Search_engine_ID%0A&q=Napoleon+history+black+and+white&searchType=image&num=9&start=1&safe=high&key=API_KEY%0A&alt=json

is giving me:

{
  "error": {
    "code": 400,
    "message": "Request contains an invalid argument.",
    "errors": [
      {
        "message": "Request contains an invalid argument.",
        "domain": "global",
        "reason": "badRequest"
      }
    ],
    "status": "INVALID_ARGUMENT"
  }
}

But I have no idea why. Does anyone know what I'm doing wrong? It seems to be following the syntax and I've changed the query in a few ways and keep getting the same problem.

Also, I'm doing this in python via the GoogleImagesSearch pip library.

Upvotes: 0

Views: 150

Answers (0)

Related Questions