Google Search

This task performs a google search and returns the results.

Input

This task performs a google search and returns the results. If multiple queries are used only the first 10 are used. The values for the language parameter can be found here: https://developers.google.com/custom-search/v1/reference/rest/v1/cse/list?hl=de. The location parameter values can be found here: https://developers.google.com/custom-search/docs/json_api_reference?hl=de#countryCodes

[1.0.0]:
First release
VersionAI ModelCreatedLink
1.0.028.03.2023

API

The REST API allows you to call the tool with the same costs as when running the tool. Please generate an Personal access token before using the REST API.

Parameters

  • search_query (Search query): The query to be searched for
  • location (Location): The location of the end user
  • language (Language): The language of the end user
  • max_results (Maximum result size (per query)): How many items are returned (per query)
  • Call the REST API by cURL
    curl -v -H "Authorization: Bearer PERSONAL_ACCESS_TOKEN" https://api.anysolve.ai/rest/v1/intern-web-google-search/1.0.0?search_query=AnySolve.ai&location=us&language=lang_en&max_results=5
  • Install the package with pip
    python3 -m pip install anysolve
  • Run in python3
    import os
    from anysolve import AnySolve
    anysolve_token = os.environ.get('ANYSOLVE_PERSONAL_ACCESS_TOKEN') # Resolve your personal access token here
    client = AnySolve(anysolve_token)
    res = client.run('intern-web-google-search','1.0.0', {'search_query': 'AnySolve.ai', 'location': 'us', 'language': 'lang_en', 'max_results': '5'})
    print(res)
  • Coming soon: Within AnySolve ChatComplete prompts you can use the following command to execute the task:
    /run('intern-web-google-search','1.0.0', search_query='AnySolve.ai', location='us', language='lang_en', max_results='5')