Intermediate answer: El Palmar, Spain
So the final answer is: El Palmar, Spain
> Finished chain.
'El Palmar, Spain'
Obtaining results with metadata#
If you would also like to obtain the results in a structured way including metadata. For this we will be using the results method of the wrapper.
search = GoogleSerperAPIWrapper()
results = search.results("Apple Inc.")
pprint.pp(results)
{'searchParameters': {'q': 'Apple Inc.',
                      'gl': 'us',
                      'hl': 'en',
                      'num': 10,
                      'type': 'search'},
 'knowledgeGraph': {'title': 'Apple',
                    'type': 'Technology company',
                    'website': 'http://www.apple.com/',
                    'imageUrl': 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQwGQRv5TjjkycpctY66mOg_e2-npacrmjAb6_jAWhzlzkFE3OTjxyzbA&s=0',
                    'description': 'Apple Inc. is an American multinational '
                                   'technology company headquartered in '
                                   'Cupertino, California. Apple is the '
                                   "world's largest technology company by "
                                   'revenue, with US$394.3 billion in 2022 '
                                   'revenue. As of March 2023, Apple is the '
                                   "world's biggest...",
                    'descriptionSource': 'Wikipedia',
                    'descriptionLink': 'https://en.wikipedia.org/wiki/Apple_Inc.',
                    'attributes': {'Customer service': '1 (800) 275-2273',
                                   'CEO': 'Tim Cook (Aug 24, 2011–)',
rtdocs_stable/api.python.langchain.com/en/stable/modules/agents/tools/examples/google_serper.html