Skip to content

Feature Request: Support HTTPS_PROXY / HTTP_PROXY / NO_PROXY environment variables for proxying #27

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

Open
sondt2709 opened this issue Mar 26, 2025 · 2 comments · May be fixed by #29
Open
Assignees

Comments

@sondt2709
Copy link

Hi SerpApi team 👋,

I’m using serpapi-javascript in a Dockerized Node.js environment where external network traffic must go through a corporate proxy.

Currently, it appears that the library does not respect standard environment variables like HTTPS_PROXY, HTTP_PROXY, and NO_PROXY. From reviewing the source, it looks like the underlying https module is used directly, which doesn’t automatically inherit proxy settings from the environment.

Expected Behavior

The library should support proxy configuration via environment variables, similar to how tools like axios, got, or node-fetch behave.

Feature Request

Would you consider adding proxy support either via:
• Native support for HTTPS_PROXY/HTTP_PROXY/NO_PROXY in the client
• Or, allowing users to pass a custom HTTP(S) agent when initializing the SerpApi client?

Thanks for considering this!

@alexbarron
Copy link

Thank you @sondt2709 for this request. Makes sense.

@zyc9012 @Freaky Is this something we would consider adding? Tagging you two since you're the ones who most recently touched this code

@zyc9012
Copy link
Collaborator

zyc9012 commented Apr 2, 2025

@sondt2709 Thank you for the request. We will work on this soon.

@zyc9012 zyc9012 self-assigned this Apr 2, 2025
@zyc9012 zyc9012 linked a pull request Apr 3, 2025 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants