PHP Job Searching using Zip-Recruiter API
Introduction
The ZipRecruiter Search API enables our search Publisher partners to write software that works with ZipRecruiter’s elevated search product and display the best job search matches to job seekers on their site.
The ZipRecruiter Search API is a REST-ful API with all requests and responses sent over HTTPS and authenticated by the ‘api_key’ URL parameter. All API responses are returned with HTTP response codes used to denote success (2xx), client-caused failure (4xx), and server-caused failure (5xx). Responses are formatted as JSON.
This PHP library wraps the ZipRecruiter Search API and allows you to do some advanced job searches.
How to Use?
First, require the unit class.ziprecruiter.php
and you can create the ZipRecruiter object by passing the APP_KEY.
$key = "APP_KEY";
$zip = new ZipRecruiter($key);
Then you can search the jobs by giving the paramter job name
, location
and job age
to the Search
method:
$zip->Search("Software Engineer", "London, UK", 25);
You then need to check if results are valid by method CheckResult
. After that, you can filter the jobs by salary range FilterJobsBySalaryRange
or industry FilterJobsByIndustry
Technology Stack
PHP 7.0 and composer unit test framework.
Demo
<?php
$key = "APP_KEY";
$zip = new ZipRecruiter($key);
$zip->Search("Software Engineer", "London, UK", 25);
if ($zip->CheckResult()) {
echo "Total Jobs: " . $zip->GetTotalJobs(). "\n";
$jobs = $zip->FilterJobsBySalaryRange(55000, 75000);
foreach ($jobs as $job) {
echo "Job ID: " . $job->id . "\n";
echo "Company: " . $job->hiring_company->name . "\n";
echo "Salary Min Annual: " . $job->salary_min_annual . "\n";
echo "Salary Max Annual: " . $job->salary_max_annual . "\n";
echo "Job URL: " . $job->url . "\n";
echo "Published: " . $job->job_age . " days ago.\n";
}
echo count($jobs);
$jobs = $zip->FilterJobsByIndustry("Technology", $jobs);
echo "Total Technology jobs: " . count($jobs);
}
Unit Tests
Unit tests are coming on the way... built on composer
Live Example
The above sample has been integrated live: https://helloacm.com/software-engineering-jobs/ and this post has been reposted to my blog: https://helloacm.com/php-job-searching-using-zip-recruiter-api/
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
Github: https://github.com/DoctorLai/ZipRecruiter
Posted on Utopian.io - Rewarding Open Source Contributors
Great work dude
this is a guide for me because I am a job sicker.
Wow, that's great news! 👏🏼👏🏼👏🏼
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
@originalworks
wowwww.. great work dear....
Hey @justyy I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x