Adding Indeed Jobs to your website
Indeed.com is the #1 jobsite in the world. Providing your users easy access to jobs listed on Indeed can not only add value to your website, but also become a source of income for you. Indeed pays "publishers" anywhere from a few cents to several dollars depending on if a user clicks on a link or applies for a job. We'll show you how to add Indeed jobs to one of your pages to start earning some of that affiliate money.
The first thing you'll want to do is sign up for a publisher account. Once your account has been created, you will have a few options for displaying jobs on your site. The easiest option is to use this WordPress Plugin: Indeed API. If all you want is to give users an Indeed search box that will populate jobs on a page or post, this is the way to go. If you need to manipulate the data or want to populate jobs without the user having to search, you'll need to use one of the next two options.
Both options will work on WordPress or on a custom website. The easiest of these is to "Create a Jobroll". If you click on this tab in your Indeed publisher account, you'll see a page similar to this:
Option 1: Jobroll
Simply fill out the jobroll form and click "Get Jobroll Code" at the bottom of the page. This will give you the code you need to paste in your WordPress page to display the job widget. Make sure you're in text mode on the WordPress Text Editor when you paste this code. If done correctly, the output should look similar to this:
You can edit the code to change the display and variables to fit your needs. In the example above, we used the 300 x 250 sized widget. We decided to change the length of the widget to make room for more jobs than the default '4'. To do this, edit this line in the code you pasted earlier:
#indeed_widget_wrapper{ width: 300px; height: 250px; background: #FFFFFF;}
Change the height in the line above from 250px to 100%. Otherwise the results will cut off. You can increase the number of results by editing the ind_n variable found shortly after the line above in the code you pasted from Indeed. You can also edit other variables in the code to fine-tune the results or even use PHP to insert dynamic values. Indeed provides a variable page with a list and description of variables you can change.
The jobroll method is the easiest method to use and requires very little knowledge and skill to implement. Fill out the form, get the code, paste it in the post or page on your site using the WordPress text editor, not visual editor. Done. The next method is a bit more complicated but gives you more control of how the results are displayed. This is the XML Feed method.
Option 2: XML Feed
Click on the "XML Feed" tab from within your Indeed publisher account. You'll see a short blurb about Attribution followed by the code. We'll come back to this later but Indeed requires you add this near your results to give them credit.
Next you'll see more code for Click Tracking. This is very useful if you have different job pages or widgets throughout your site and you want to find out which ones your users are clicking on. We'll come back to this and the next section, Channels, later.
Now to the good stuff. The section Sample Request shows you an example of the URL you need to create followed by an example of the variables you can edit. If you were to go to this URL, you would see a list of jobs based on the variables included in the URL and displayed in XML format. We'll show you how to change the variables to meet your needs and how to display the results in a useful format. First the variables.
The first variable is publisher. This is followed by a string of numbers which represent your publisher ID. Everything after that is editable. The q variable represents the search term query and the l represents the location. All of the variables are listed and described on the XML Feed page so I won't go into all of them. I will give you a tip that if you go to Indeed's website and search for a job, you can look at the URL in the top of your browser to see the variables for the search you just entered.
Copy the example URL from the XML Feed page into a text editor and replace or add any variables to meed your needs. Now let's display the results. The following code needs to be placed inside of a WordPress template since WordPress does not allow you to use PHP in the built-in WYSIWYG editor. We'll show you how to get around this by using a plugin after explaining the code.
<ol><?php
$xml = simplexml_load_file('http://api.indeed.com/ads/apisearch?publisher=123456&q=java&l=austin%2C+tx&sort=&radius=&st=&jt=&start=&limit=&fromage=&filter=&latlong=1&co=us&chnl=&userip=1.2.3.4&useragent=Mozilla/%2F4.0%28Firefox%29&v=2');foreach($xml->results->result as $result) { ?>
<li><a href="
<?php echo $result->url;?>"
><?php echo $result->jobtitle;?></a><br />
<?php echo $result->company;?>(<?php echo $result->formattedRelativeTime;?>)<?php echo $result->city;?>, <?php echo $result->state;?><br /></li>
<?php } ?>
<ol>
Everything is first wrapped in a <ol> ordered list tag. Now we need to display the results of our Indeed job search into the list. The second line stores the XML results of our URL into the variable $xml. Now we can retrieve the results in smaller sections using a foreach loop. In the example above, the loop displays the job title ($result->jobtitle) on the first line linked to the job URL ($result->url) . The next line displays the company name ($result->company), relative time ($result->formattedRelativeTime), and city ($result->city) and state ($result->state). This is what it looks like:
If you want to be able to add content before or after the jobs list using the WordPress WYSIWYG editor, place the code before or after this line of code in your template:
<?php the_content(); ?>
If you go back to the XML Feed page on the Indeed website, you'll see a sample XML Feed below the variables section. This is where you'll find all of the display options. Anything between the <result> and </result> tags can be displayed. If you know PHP you could easily edit the code above to meet your needs. Even if you don't, you should still be able to pick up on the pattern. All PHP variables need to begin with <?php echo before and ;?> after. Use the Indeed XML Feed example if you want any variables we don't have in the code.
Don't forget to add the Attribution code at the end of your <ol> tag. This adds the text "Jobs by Indeed" at the bottom of your jobs list with links to Indeed's website. This is required by Indeed and here's the code:
<span id=indeed_at><a href="http://www.indeed.com/">jobs</a> by <a
href="http://www.indeed.com/" title="Job Search"><img
src="http://www.indeed.com/p/jobsearch.gif" style="border: 0;
vertical-align: middle;" alt="Indeed job search"></a></span>
Let's also quickly go back over the Click Tracking and Channels section before explaining how to use a plugin to add the XML Feed. If you are only going to have one ad on one page or if you have multiple ads but don't care which ones your users are clicking on, skip to the "Insert PHP Plugin" section below. If you do want to track this, you'll need to add the following code to the header of the page your jobs are displayed.
<script type="text/javascript"
src="http://gdc.indeed.com/ads/apiresults.js"></script>
If you're using Elegant Themes, this is as simple as adding the code using the Integration tab of the epanel. Paste it in the white box directly below: "Add code to the <head> of your blog". If you don't use Elegant Themes, your theme might provide a similar option. If not you'll have to edit your header.php template file and add the code there.
Next you'll want to add a channel to your account and append this channel to your URL. You can add a channel from the XML Feed page on Indeed. Give it a name that will explain which page or section it is referencing like "home" or "small widget". To add the channel to the URL, place it anywhere in the variable section of the URL:
&chnl=home
Change "home" to the name of your channel. Make sure you add a & after the channel name if another variable is following it.
Insert PHP Plugin
If you would like to avoid editing your theme's template files directly, you can use a plugin that will let you insert PHP to any WordPress page or post. Oddly enough it's called Insert PHP. Once you install and activate the plugin, we need to change our code. For reasons beyond the scope of this tutorial, we need to use a PHP concatenation technique for this plugin to work properly. So the code from earlier will look like this:
<ol>
[insert_php]
$xml = simplexml_load_file('http://api.indeed.com/ads/apisearch?publisher=123456&q=java&l=austin%2C+tx&sort=&radius=&st=&jt=&start=&limit=&fromage=&filter=&latlong=1&co=us&chnl=&userip=1.2.3.4&useragent=Mozilla/%2F4.0%28Firefox%29&v=2');
foreach($xml->results->result as $result) {
echo '<li><a href="' . $result->url . '">' . $result->jobtitle . '</a><br />'
. $result->company . '(' . $result->formattedRelativeTime . ')' . $result->city . ',' . $result->state .
'<br /></li>';
} [/insert_php]
<ol>
This will be inserted into any page or post using the Text view of the WordPress text editor. We still have one problem left. For whatever reason, WordPress has a tendency to really jack things up when going back and forth between text and visual editors with PHP code. It usually works upon first saving but if you go back to edit the page, things go wrong very quickly. To avoid this issue, we recommend another plugin: HTML Mode Locker. Once installed and activated, this plugin gives you an option on every page and post to lock the Text (HTML) view. Just go to the page you want to add the PHP code to and check "Lock HTML View" just above the "Publish" box. Now you can add the code to the text editor without any worries.
That wraps up this tutorial. As you can see, the Jobroll option is much easier to implement over the XML Feed option. It's really a matter of having control of the content displayed. Even with the Jobroll widget, you could probably use CSS to properly align the widget and control how it is displayed. But if you need more control, the XML Feed option will give you just that. Both options can become very useful if you use PHP to pull in dynamic variables like city and state.
48 Comments
Hello,
I am trying to implement an Indeed.com publisher job feed on my site that has an integrated zip/city submit form. Have you developed or seen anything like this? Thanks!
February 26, 2015
If you log into your Indeed Publisher account, there is an option to embed a search form under the “Create Jobroll” tab. But it will redirect to the results page on Indeed.com. Is that what you’re looking for? If you want to create your own form, you could do something like this: http://www.w3schools.com/php/php_forms.asp
Then just pass those variables from the URL into the code in my tutorial to populate the results on your own website.
February 28, 2015
Hi Brad or to ever it may Concern my name is jerry and i have a new website called Employclassifieds.com and i want to import jobs to my site and will pay for someone to set me up for autofill features for the jobs??
February 25, 2022
Isnt it better using XMLReader rather SimpleXML since XMLReader is faster when working with big data?!
March 6, 2015
You are correct in that XMLReader is faster. But the XML feed is very small so I wouldn’t think it would make much of a difference if any. The entire feed is less than 50KB in a text file and that’s if we max it out at 25 results (the most Indeed will allow).
March 6, 2015
I see, for example Brad, im creating a a website search engine that gets job ads from indeed, and will be listed max 25 ads per page, in this case it doesnt make much difference in using SimpleXml or XMLReader right?
March 7, 2015
I wouldn’t think so. I am no PHP expert by any means but I don’t think it would make much difference. Maybe if you were getting thousands or tens of thousands of visitors a day, but even then it might not matter because at that point you would need a VPS anyway.
March 10, 2015
Hello, i am trying to create a website that is just like this. Meaning how the home (search page is), to when the lead capture form pops up and then displays the jobs after they submit the information. I am in the backoffce in the publishers account and looking around. I wanted to know how they got the search/home page to display the search bar without showing indeeds tag. I know the home page and jobs display page is displayed by the API but wanted to get feedback from you.
June 3, 2015
Hi Jason, Not sure what you mean by “indeeds tag”. If you’re referring to the Indeed logo, you could remove that with CSS but it is required to earn affiliate commission so might not be a good idea
June 5, 2015
I am creating multiple Jobrolls (Option 1) on my webpage. Everything looks fine in the edit mode. However, when i publish the website, results become available only on the first jobroll.
June 14, 2015
I’m afraid not. Looks like it’s using the ID of a hidden form in Javascript to display the results. You can’t change the id of the form, but you might be able to play around with using a class name in the javascript instead. My guess is that you will have to use the XML Option 2 above to do what you want. Sorry. If you find a solution, please share for others. Thanks!
June 15, 2015
Hi,
I’m trying to integrate the Indeed widget Option 1. It is a multi-site network. I would also like to avoid plugins when ever possible.
However, it displays the form but no job listings.
Any ideas or suggestions?
Thanks
Thomas
http://jobshubnct.org.au/test/
August 20, 2015
Hi Thomas. I inspected the page you linked to and I’m getting an error: “ind_d is not defined”. I wouldn’t think this would be enough to break the entire widget but maybe it’s a sign that all of the code didn’t get copied over correctly. I would copy and paste again and if it’s not working, email me the code and I’ll try it on my end and see if jobs show up. It might also be that your Indeed account is not active yet? Let me know.
August 21, 2015
Hi Brad,
I’m trying to integrate this codes but it seems that it doesn’t work, it shows nothing back. well i tried php plugin to be embeded in the posts and pages, but nothing work.
i added the javascript into the head tag but nothing works for me, what do you think the the issue could be ?
September 2, 2015
Hi Yazen. Were you able to resolve this? The javascript is only important if you are tracking the clicks. Maybe try implementing directly into the template instead of using the plugin. Also the plugin appears to not have been updated in almost 2 years. Might be better off trying a different PHP WordPress plugin
September 21, 2015
I want to use jobrolls, after editing state to NY,TX,ID, and publishing code, I see NJ always. What must I do?
November 11, 2015
For the job roll it might not be possible to use multiple states. Try to replace the comma with a + plus sign. If that doesn’t work, I would contact Indeed and ask about multiple states.
November 13, 2015
I am a complete amateur to this sort of stuff I have created a page http://www.schoolmonkey.com/indeedtest.html and something is not working any ideas.
November 11, 2015
You need to replace the .html extension with .php. You cannot run PHP code in a HTML file but you CAN run HTML in a PHP file. Should do the trick.
November 13, 2015
Hi Brad,
Thanks for the tutorial, any idea why the snippet content for the jobs does not come through on the xml pull? I can get the title, age, and company, etc, but no description…??
December 6, 2015
Hi Jef. I never pull the description because the results are never very consistent. But you would need to add $result->snippet to the code above and probably wrap it in paragraph tags
December 9, 2015
Hi,
I want just to know if there is a way to redirect indeed jobs url directly to the employer and not indeed page.
best regards
February 8, 2016
Doesn’t look possible. Indeed would need to pass the link in the returning XML for you to be able to parse it. The only URL they provide is to the Indeed page
May 19, 2016
Brad great tutorial. Got another question for you. Is there a way to extract and read the entire job description? I’m doing some linguistic analysis on resumes and job descriptions and looking to automate the job description capture from indeed. Any ideas?
June 1, 2016
Thanks David. If you are referring to extracting more than just the “snippet”, I don’t think that is possible. The API does not appear to have an option to show the full job description.
June 2, 2016
DoinoikaDmda jak ja bym chciała cię poznać marze o tym mam twój plakat w pokoju nad łóżkiem twoje płyty i zdjęcia aby brak autografu:)
April 5, 2017
Hi Brad, Just need to know if it essential to have a visitor manually enter keywords or a certain “keyword array” from a visitors profile (on my website database) be automatically used to generate a search from indeed API
July 23, 2016
Hi Brad, I followed your tutorial to the letter, but got confounded as to which file exactly Indeed wants us to insert QUOTE Copy the code below and paste it near the results on your web page: UNQUOTE.
What page? The result doesn’t display except on the live page, so where are we meant to insert jobs ……..?
Also, the following is supposed to go into the section of our page, but my WordPress site doesn’t appear to have any HTML doc.
I have searched and searched the relevant files without luck. Thanks, mate.
September 8, 2016
I am using Jobify theme. Can you tell me where exactly to enter the job roll.
September 17, 2016
Hello. I am trying to use the indeed api on my site to get jobs and store them in a database for later use. There is a problem with the api though, whenever I supply the location value, no results are returned, no matter what any other parameters are set to. Any suggestions?
October 4, 2016
it is very informative & good article
December 9, 2016
Hello!
Do you have any idea how to add individual jobs from indeed using the jobkey?
December 21, 2016
A plainesgly rational answer. Good to hear from you.
April 5, 2017
Hello, can you help explain how to implement their search box?
January 25, 2017
Just wanna admit that this is handy, Thanks for taking your time to write this.
March 28, 2017
Hi Brad, thanks for the great tutorial, however I have a question on pagination.
Because the insert php plugin you mentioned had not been updated for a few years, I decided to use a more often updated one called “PHP Code For Posts” which makes it easy to embed the php code into your website pages via a nice shortcode.
However I am wondering if that is preventing me from somehow showing more than 25 job results in total, even when I know there will likely be hundreds, if not thousands of job results returned for a given job query.
Could you do an update to your info above showing how to do pagination the correct way to show 25 results per page, with next page last, page links?
All those of us now forced into using Indeed’s Job Search API after the change in their terms to prevent us earning from normal job search boxes would really appreciate it mate!
April 2, 2017
Excellent post. I am dealing with some of these issues as well..
May 11, 2017
Hi Brad! thanks for the great article. I have a query can I create a banner of my own(more like an image) and link it to Indeed’s job page by setting the URL with the desired parameters.
June 14, 2017
Is it possible to use the Indeed jobroll and still be able to accept paid job postings from employers on your site?
September 9, 2017
i am using custom script on my website can you help me how to add indeed jobs to my website
October 3, 2017
At this time it looks ike Expression Engine is the preferred
blogging platform aavailable right now. (from
what I’ve read) Is that what you are using on yoir blog?
November 25, 2018
I was curious iff you ever considered changing the page layout of your website?
Its vedry well written; I love what youve got to say. But maybe
you could a little more iin the way of content so people could connect with it better.
Youve got aan awful lot of text for only having 1 or two images.
Maybe you could space it out better?
December 1, 2018
This article will assist the internet people for building up new
weblog oor evern a weblog from start to end.
December 2, 2018
Nice post on integrating Indeed with the website. Thanks for this info.
February 1, 2019
Was looking for a guide to this, working great. However, how can I restrict this to results from one company only so the feed only lists all jobs posted by x company? There doesn’t seem to be a company parameter?
February 6, 2019
I’m trying to insert and indeed job post to my Contao cms do you know where I would add this to the site structure or widgets, or where the hell I put it LOL
Thank
May 6, 2021
Apart from Indeed, which other job posting platform can I integrate on my wordpress site
January 10, 2022
Nice post on integrating Indeed with the website. Thanks for this info.
October 29, 2022