Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"error": "Missing query q parameter." #33

Closed
hshi420 opened this issue Jul 5, 2022 · 7 comments
Closed

"error": "Missing query q parameter." #33

hshi420 opened this issue Jul 5, 2022 · 7 comments

Comments

@hshi420
Copy link

hshi420 commented Jul 5, 2022

The url link gives me this message.

@hshi420
Copy link
Author

hshi420 commented Jul 5, 2022

But the variables do have the correct results.

@hshi420 hshi420 closed this as completed Jul 5, 2022
@dimitryzub
Copy link
Contributor

Hi @hshi420, thank you for reaching out 🙂

  1. Could you please provide a full traceback or a screenshot of the error?
  2. Could you please provide a code snippet of your search params, or a screenshot? By search params I meant this:
params = {
  "api_key": "...",
  "engine": "google",
  "q": "Coffee",
  "gl": "us",
  "hl": "en"
}
  1. What API do you use? Google Search/Google Maps, etc?

I'll reopen this issue as we're not helped you yet 🙂

@dimitryzub dimitryzub reopened this Jul 7, 2022
@hshi420
Copy link
Author

hshi420 commented Jul 7, 2022

Hi @hshi420, thank you for reaching out 🙂

  1. Could you please provide a full traceback or a screenshot of the error?

  2. Could you please provide a code snippet of your search params, or a screenshot? By search params I meant this:

params = {

  "api_key": "...",

  "engine": "google",

  "q": "Coffee",

  "gl": "us",

  "hl": "en"

}
  1. What API do you use? Google Search/Google Maps, etc?

I'll reopen this issue as we're not helped you yet 🙂

Hi, the problem was on my end and the problem was solved, which was the reason why I closed the issue. Thank you!

@dimitryzub
Copy link
Contributor

@hshi420 Got it! That's great that the issue was solved 🙂 Thank you for clarifying, I'll close this issue then. Feel free to open if you need to.

@myrthebuckens
Copy link

I have the same issue! Even when I copy the code from the playground into my script I get this error.

I wrote the following:

params = {
"api_key": personal_key,
"engine": "google_maps",
"type": "search",
"google_domain": "google.com",
"q": "Coffee",
"hl": "en",
"ll": "@52.092876,5.104480,15.1z"
}

search = GoogleSearch(params)
results = search.get_dict()

@myrthebuckens
Copy link

The error is then the following: "error": "Missing query q parameter."
}

@dimitryzub
Copy link
Contributor

dimitryzub commented Sep 27, 2022

Hey, @myrthebuckens 🙂

A few obvious questions for the sake of clarity:

  1. Did you pip install google-search-results?
  2. Did you import it? Didn't see in your code snippet.
  3. If you're in the virtual environment, did you switch to it? E.g $ source <virtual_env_name>/bin/activate
  4. personal_key is a global variable? Have you tried passing your SerpApi API key directly to "api_key" under params? ("api_key": "1111adsad131")

Looking forward to your reply ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants