crewAI
crewAI copied to clipboard
Unauthorized Error (403) when Using SERPER_API_KEY for Google Search
Description:
Whenever the software attempts to search in Google using the SERPER_API_KEY, I encounter an unauthorized error despite the API key being set correctly.
Steps to Reproduce:
- Run the software with the correctly set SERPER_API_KEY.
- Trigger a Google search action, such as
Action: Search the internet
Action Input: {"search_query": "Predictions for used car market in 2024"}
Expected Result:
The software should perform the Google search and return the relevant results.
Actual Result:
The following error message is returned:
{'message': 'Unauthorized.', 'statusCode': 403}
Additional Context:
Log Output:
> Entering new CrewAgentExecutor chain...
To accomplish this task, the first thing I need to do is to gather data about the current trends in the used car market, factors that influence the prices, and any predictions available for 2024. This will allow me to make an educated guess about whether the prices of used cars will go up or down in 2024.
Action: Search the internet
Action Input: {"search_query": "Predictions for used car market in 2024"}
{'message': 'Unauthorized.', 'statusCode': 403}
Environment:
Software Version:
- crewai 0.28.8
- crewai-tools 0.1.6
- Python 3.12.3
- pip 24.0
Operating System: Windows Additional Details: Jupyter
Please can you try with the latest version. I just tested it and worked ok
crewai 0.30.11 crewai-tools 0.2.6
I got the exact same issue with the latest versions.
pip install crewai==0.30.11 crewai_tools==0.2.6 langchain_community
What website is it trying to access
Are you using the local LLMs? I haven't got any success with any of the local LLMs with search tools...
What website is it trying to access
It is trying to use scaleserp.com to perform a search on google.
Are you using the local LLMs? I haven't got any success with any of the local LLMs with search tools...
No. It is openai api.
I have tested on both windows and Linux, in jupyter and out of it, but the same issue.
Newbie here, but I had a similar issue. It was very, very frustrating... I had gotten an API key from scaleserp.com, but I finally figured out what was actually required was an API key from serper.dev. Now all of those SerperDevTool searches are working for me.
@michaelc2005 I did exactly the same thing and was driving myself nuts. Thank you!
Newbie here, but I had a similar issue. It was very, very frustrating... I had gotten an API key from scaleserp.com, but I finally figured out what was actually required was an API key from serper.dev. Now all of those SerperDevTool searches are working for me.
THANK YOU SO MUCH , i was losing my mind over it
what's the final solution for the issue mentioned by @0x11c11e I am facing the same "'message': 'Unauthorized.', 'statusCode': 403}" from serverdev API.
tried many combinations of langchain, langchain-core, crewAI version, not working.
please state your working versions if running
what's the final solution for the issue mentioned by @0x11c11e I am facing the same "'message': 'Unauthorized.', 'statusCode': 403}" from serverdev API.
tried many combinations of langchain, langchain-core, crewAI version, not working.
please state your working versions if running
What @michaelc2005 wrote is the final solution.
I’ve already taken API from server dev only, it was working till 10 PM, after 10 PM it stopped working even i am left with 2000 credits
On Fri, 30 Aug 2024 at 4:07 AM, Iman Reihanian @.***> wrote:
what's the final solution for the issue mentioned by @0x11c11e https://github.com/0x11c11e I am facing the same "'message': 'Unauthorized.', 'statusCode': 403}" from serverdev API.
tried many combinations of langchain, langchain-core, crewAI version, not working.
please state your working versions if running
What @michaelc2005 https://github.com/michaelc2005 wrote is the final solution.
— Reply to this email directly, view it on GitHub https://github.com/crewAIInc/crewAI/issues/633#issuecomment-2319180836, or unsubscribe https://github.com/notifications/unsubscribe-auth/A43RMY4KHJXXYXJPOSERMJDZT6PCJAVCNFSM6AAAAABH4OTTOKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJZGE4DAOBTGY . You are receiving this because you commented.Message ID: @.***>
serper.dev.
saved me from suicide thanks!