Search code examples
google-cloud-platformgoogle-vision

Is there a way to set the MaxResults for a Google Cloud Vision query to unlimited?


I've set it to 9999 for now but I could've sworn I saw somewhere that you can set it to unlimited somehow!

If not, what is the highest number you can set it to?

My request is looking like this:

        "requests":[{
            "image": {
                "content": base64String
            },
            "features": [
                {"type":"TEXT_DETECTION","maxResults":9999}, 
                {"type":"LABEL_DETECTION","maxResults":10},
                ],
            "imageContext": {
                "languageHints": [
                    "de",
                    "en"
                ]
            }
        }]

Solution

  • Until now there is no option like using a CONSTANT instead int32 for fetching all outputs. You can use the maximum value of TYPE_INT32 i.e 2147483647 for this property(maxResults).