Browser Use 如何用 Python 自动化求职申请
How to Automate Job Applications with Python
Browser Use 发布教程,演示用 Python 构建求职申请机器人:通过 Browser Use 的托管 V4 API 控制云端浏览器搜索职位,用 OpenAI API 按简历筛选匹配岗位,再自动填表、上传 resume.pdf 并提交申请,最后记录结果。脚本要求 Python 3.12 或更新版本,需 Browser Use 与 OpenAI 两个 API key,注册可获 $1 免费额度,单次运行成本上限设为 $3。
正文
当前显示原文,中文全文译文尚未就绪。
Guides
Build a Python job application bot with Browser Use. Find jobs, match your resume, approve applications, fill forms, upload your resume, and track results.
Submitting job applications often means filling out the same information across different websites. You can either do this manually or use an AI-powered browser automation tool such as Browser Use.
In this article, we'll look at how to automate job applications with Python. We'll write a script to discover positions, evaluate them against a resume, fill out and submit applications, upload the resume when required, and record the results.
Requirements:
Python v3.12 or newer; A Browser Use account; An OpenAI account
We'll build a multi-step Python workflow where each step is a separate function. We'll use Pydantic for data validation, Browser Use Agents for browser automation, and the OpenAI API for resume matching. The Python script runs locally and uses Browser Use's hosted V4 API to control a cloud browser.
The workflow will have four stages:
Search for jobs and extract their details; Evaluate each job against a resume to find suitable positions; Use browser automation to fill out and submit applications, uploading a resume when required; Record the application results
Set Up the Python Project
You'll need a Browser Use API key (eligible signups receive $1 in free credits) and an OpenAI API key.
Install the Dependencies
Start by creating a new directory and a virtual environment:
Next, install the requirements:
Environment Variables
Create .env and paste in both of your API keys:
Prepare Your Resume
Create a resume.json file in the project root:
Replace the example details with your own information, then add your resume to the project directory as resume.pdf. The PDF file will be used when a resume attachment is required.
Finally, create main.py with the following boilerplate code:
The code block above:
Imports the required libraries and loads the API keys from .env; Adds two utility functions for reading and writing JSON files; Sets up main() to trigger different functions based on the system argument
Stage 1: Find Job Listings
In the first stage, we'll use Browser Use to browse the internet and find job listings that broadly match the resume. For a standardized response, we'll use a Pydantic model.
First, define the Job model:
Next, create a run_json() helper to simplify working with Browser Use:
In this function, we add the expected JSON structure to the prompt, start a Browser Use run, and wait for it to finish. Since Browser Use returns the result as a string, we use Pydantic to validate it before returning the data.
We also set a $3 run cost cap and wait up to 10 minutes locally.
With the helper ready, let's use it to search for jobs. Add a search() function:
Here, we load resume.json and ask Browser Use to find five appropriate jobs. The agent will do all the work for us: open the listings, extract the details, and return them in the format defined by Job. Finally, the results will be saved in the jobs.json file.
To make the search available from the command line, update main() like so:
Now, run the search:
You can use the printed preview link to see what's happening under the hood. Once the run finishes, check jobs.json.
The walkthrough outputs use fictional jobs and application results. Here's an abbreviated jobs.json example; the remaining four records are omitted:
All five positions are in San Francisco, but their requirements differ. Three involve web apps and APIs, one focuses on engineering management, and one requires embedded systems experience.
In the next step, we'll filter them down.
First, create a JobMatch model to store each selected job and the reason it was selected:
To build the shortlist, add a filter_jobs() function:
We send the resume and job listings to OpenAI and use JSON mode to request matching URLs and a short reason for each selection.
For each returned URL, we look up the original job, validate the match with Pydantic, and save it to filtered_jobs.json. This keeps the job details intact while adding an explanation you can review.
As with the search, add the new function to the actions dictionary:
Then run it:
The example filtering response contains three matches. Two are shown here; the third is omitted:
The five example jobs are now down to three. Each selected role uses the skills listed in the provided resume. Your results may differ; review filtered_jobs.json before applying. JSON mode guarantees neither the expected fields nor unique, known URLs, so malformed selections can still raise an error.
With three positions shortlisted, let's use Browser Use to apply. Start by adding a JobApplication model to describe the result:
We'll ask the agent to return submitted when it finds a submission confirmation, or needs_review when it needs your help. The details field will contain the confirmation or explain what prevented completion.
Now add an apply_jobs() function to work through the shortlist:
We first upload the resume files to a Browser Use workspace. Passing workspace_id to each run makes them available as uploads/resume.json and uploads/resume.pdf, so the agent can read your information and attach the PDF when required.
The function then displays each job and asks whether you want to apply. Typing APPLY starts a Browser Use run to fill out and submit that application; any other response skips it. You can follow along through the live preview link, but there isn't a second approval step before submission.
For a practice run, use a form you control and replace the application prompt with instructions to fill the form, stop before submission, and return needs_review. Missing answers, consent questions, and login requirements can prevent a real application from completing. For sites that require an account, see our guide to authenticating AI web agents.
After each run, we pass the result and browser link to track(). We'll implement that function in the next section.
Add apply_jobs to the actions dictionary. We'll run it once the tracking function is in place:
Finally, let's automatically keep track of applications in a CSV file.
Add the track() function:
Each call appends a row with the job details, application status, and run links, preserving any earlier results. The header is written only when the file is empty. Since apply_jobs() already calls this function after each result or run error, tracking happens automatically.
The CSV records the agent's reported outcome; it doesn't independently verify the site's receipt or prevent duplicate applications. Inspect the recorded run before retrying a needs_review result, and check previous rows before approving the same job again. If search or filtering fails, don't continue with older output files.
We're now ready to run apply_jobs() and record the results with track():
The script asks you to approve each shortlisted job. Once you type APPLY, Browser Use opens the application, fills out the form, and attaches your resume when required. It then submits the application or reports what needs your attention.
After the run, open applications.csv to see the results. Here are the company, title, and status columns; the other columns are omitted for readability:
That completes the workflow. To run it from the beginning, use these commands in order:
Conclusion
In this article, we used Browser Use to find jobs, fill out application forms, and upload resumes. We also added resume matching with OpenAI and saved application results to a CSV file.
You could also ask Browser Use to handle the whole process with a single prompt. Splitting it into a workflow gives you better visibility and more control: you can inspect the search results, adjust filters, approve each application, and check the outcome in the CSV.
Next steps:
Schedule searches and notify yourself when suitable jobs appear; Add parallel applications with separate sessions and a database for tracking; Tailor resumes using only your experience
Published October 7, 2026