Google Jobs
This notebook goes over how to use the Google Jobs Tool to fetch current Job postings.
First, you need to sign up for an SerpApi key
key at: https://serpapi.com/users/sign_up and get your api key here: https://serpapi.com/manage-api-key.
Then you must install google-search-results
with the command:
pip install google-search-results
Then you will need to set the environment variable SERPAPI_API_KEY
to your SerpApi key
If you are using conda environment, you can set up using the following commands in kernal: conda activate [your env name] conda env confiv vars SERPAPI_API_KEY='[your serp api key]'
Use the Tool​
%pip install --upgrade --quiet google-search-results langchain-community
Requirement already satisfied: google-search-results in /opt/anaconda3/envs/langchain/lib/python3.10/site-packages (2.4.2)
Requirement already satisfied: requests in /opt/anaconda3/envs/langchain/lib/python3.10/site-packages (from google-search-results) (2.31.0)
Requirement already satisfied: charset-normalizer<4,>=2 in /opt/anaconda3/envs/langchain/lib/python3.10/site-packages (from requests->google-search-results) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /opt/anaconda3/envs/langchain/lib/python3.10/site-packages (from requests->google-search-results) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/anaconda3/envs/langchain/lib/python3.10/site-packages (from requests->google-search-results) (2.1.0)
Requirement already satisfied: certifi>=2017.4.17 in /opt/anaconda3/envs/langchain/lib/python3.10/site-packages (from requests->google-search-results) (2023.11.17)
import os
from langchain_community.tools.google_jobs import GoogleJobsQueryRun
from langchain_community.utilities.google_jobs import GoogleJobsAPIWrapper
os.environ["SERPAPI_API_KEY"] = "[your serpapi key]"
tool = GoogleJobsQueryRun(api_wrapper=GoogleJobsAPIWrapper())
tool.run("Can I get an entry level job posting related to physics")
'\n_______________________________________________\nJob Title: Entry Level Mechanical, Electrical, Physics Engineer for Controls PLC programing\nCompany Name: Quest Global\nLocation: Schenectady, NY\nDescription: Job Requirements\n\nMechanical, Electrical, thermal and computer network engineers in developing control systems. The team works together closely in programing and testing control logic for industrial systems. The team will use simulations to test and represent real world operational conditions of electrical power plants.\n\nJob functions include:\n• Desired Experience in programming controllers, like an Arduino, Allen Bradly, Siemens, GE Vie or any Industrial controllers with HMI interface.\n• Working knowledge of instrumentation circuits, ex thermocouples, pressure transmitters,\n• Reading logic diagrams and programing ladder logic from them\n• Reviewing wiring diagrams for instrumentation installs\n• Interpret P&ID/Electrical Schematics and experience with basic instrumentation.\n• Collaborate with design engineers of various disciplines to develop control system requirements\n• Support Field Engineering Services in technical resolution of field problems\n• Providing input to quality assurance on projects\n• Review and interpret customer specifications on mechanical systems\n• Operational Knowledge of Steam or Gas Turbine Power Plants\n• Ability to interpret functional requirements and translate into control logic.\n• Ability to interpret P&ID/Electrical Schematics and experience with basic instrumentation\n\nRequired Skills and Experience\n• Preferred Hands-on experience programming controllers, GE Mark V, VI, VIe series turbine control and Cimplicity HMI software or other industry related controllers like Audrino, LabView.\n• Demonstrate experience working in the industrial controls or power generation industry\n• Have a fundamental understanding of Steam Turbine and Power Plant construction\n• Technical skills in engineering design and construction practices\n• Proven team player with solid cooperation, flexibility and demonstrated capacity to learn complex information quickly\n• Field experience in related equipment\n• Strong organizational / project execution skills and prior success in working with or leading cross-functional teams\n• Strong interpersonal skills with the ability to influence and lead others\n• Passion for continuous learning and applying best practices to achieve practical solutions\n\nWork Experience\n\nSkills\n• instrumentation\n• ladder logic\n• control systems\n• electrical schematics\n• control system\n• programming controllers\n• control\n• collaborate\n• quality assurance\n• best practices\n• wiring diagrams\n• functional requirements\n• industrial electrical controls\n• project execution\n• engineering design\n• instrumentation circuits\n• technical\n• power plant construction\n• electrical controls\n• cross-functional teams\n• continuous learning\n• strong organizational\n• mechanical systems\n• technical skills\n_______________________________________________\n\n'
Use the tool within a ReAct agent
In order to create an agent that uses the Google Jobs tool install Langgraph
%pip install --upgrade --quiet langgraph langchain-openai
and use the create_react_agent
functionality to initialize a ReAct agent. You will also need to set up your OPEN_API_KEY (visit https://platform.openai.com) in order to access OpenAI's chat models.
import os
from langchain.agents import load_tools
from langchain.chat_models import init_chat_model
from langgraph.prebuilt import create_react_agent
os.environ["OPENAI_API_KEY"] = "[your openai key]"
os.environ["SERP_API_KEY"] = "[your serpapi key]"
llm = init_chat_model("gpt-4o-mini", model_provider="openai")
tools = load_tools(["google-jobs"], llm=llm)
agent = create_react_agent(llm, tools)
events = agent.stream(
{"messages": [("user", "Give me an entry level job posting related to physics?")]},
stream_mode="values",
)
for event in events:
event["messages"][-1].pretty_print()
================================[1m Human Message [0m=================================
Give me an entry level job posting related to physics?
==================================[1m Ai Message [0m==================================
Tool Calls:
google_jobs (call_PoViomaLqoCRXqNmxe7YDKTN)
Call ID: call_PoViomaLqoCRXqNmxe7YDKTN
Args:
query: entry level physics job
=================================[1m Tool Message [0m=================================
Name: google_jobs
_______________________________________________
Job Title: New Grad - Math / Physics Background
Company Name: Bits to Atoms (YC S24)
Location: San Francisco, CA
Description: We are working with Canopy Labs to hire a new grad with a strong background in math or physics to join the team. You can learn more about Canopy Labs here.
Company Overview
Canopy Labs is building digital humans that can:
• Hold real-time, multimodal video interactions that look and sound ultra-realistic
• Intelligently control their body: write, gesticulate, clap, etc.
• Exhibit spatial awareness: walk around and interact with their environment
Their mission is to bring virtual humans to life through cutting-edge generative models, enabling natural, embodied AI interactions at scale.
What We're Looking For
• Strong programming skills in Python
• Excited by ML research and solving really hard problems
• Can ship really, really fast
• Experienced with cloud platforms (AWS, GCP, Azure)
Nice to Haves
• Experience with training and model deployment
• Contributions to open-source ML projects
It’s ok if you don’t have much practical experience yet – we want to find exceptional individuals, even if you have demonstrated your abilities in non-professional settings. For example, if you have built a bunch of side projects and just love making things work, or even competed in math or physics competitions, we want to speak with you.
We're looking forward to hearing from you soon!
_______________________________________________
==================================[1m Ai Message [0m==================================
Here's an entry-level job posting related to physics:
**Job Title:** New Grad - Math / Physics Background
**Company Name:** Bits to Atoms (YC S24)
**Location:** San Francisco, CA
**Description:**
We are working with Canopy Labs to hire a new grad with a strong background in math or physics to join the team. Canopy Labs is building digital humans that can:
- Hold real-time, multimodal video interactions that look and sound ultra-realistic.
- Intelligently control their body: write, gesticulate, clap, etc.
- Exhibit spatial awareness: walk around and interact with their environment.
Their mission is to bring virtual humans to life through cutting-edge generative models, enabling natural, embodied AI interactions at scale.
**What We're Looking For:**
- Strong programming skills in Python.
- Excited by ML research and solving really hard problems.
- Can ship really, really fast.
- Experienced with cloud platforms (AWS, GCP, Azure).
**Nice to Haves:**
- Experience with training and model deployment.
- Contributions to open-source ML projects.
It’s ok if you don’t have much practical experience yet – we want to find exceptional individuals, even if you have demonstrated your abilities in non-professional settings. For example, if you have built a bunch of side projects and just love making things work, or even competed in math or physics competitions, we want to speak with you.
We're looking forward to hearing from you soon!
Related​
- Tool conceptual guide
- Tool how-to guides