This documentation will allow creating job search api page which you can use query argument to return job json data.
#Step 1:
Create a new page with the slug job-search-api
, after creating the page simply visit the page you will see the default json data based on default query.
see the screenshot how it looks like.
# Step 2: Pass the parameters
http://yourjobsite.com/job-search-api/?keywords=designer
here is the list default parameter you can use as url parameter
Name | Data type | Default | Comment | Example |
keywords | String | empty | Use string for search by keyword | /job-search-api/?keywords=designer |
per_page | Number | 10 | Display max limit of job | /job-search-api/?per_page=5 |
paged | Number | 1 | Display paged | /job-search-api/?paged=2 |
job_status | String | empty | Query job based on job status meta field | /job-search-api/?job_status=open |
locations | String | empty | Query job based on company location meta field | /job-search-api/?locations=dhaka |
job_type | String or comma-separated value | empty | Query job based on job types meta field | /job-search-api/?job_type=full-time |
company_name | String | empty | Query job based on company name meta field | /job-search-api/?company_name=pickplugins |
# Step 3:
Control the field should return
Under the settings page, you will see the option “Search api fields” you can select the field you want to return on job search api page query.