JobsPikr gives access to REST-based API to download job data. To access data via API, you need client id and authorization key. 

API Usage

All Jobspikr API requests are composed of light-weight JSON delivered as an HTTP GET request to the endpoint URL. All responses are wrapped in a top-level response element. The status attribute will let you know if the request succeeded or failed.

  • All JSON should be UTF-8 encoded.
  • Date and time values are of the form YYYY-MM-DD HH:MM:SS GMT


Jobspikr Sample API:

https://api.jobspikr.com/v1/data?client_id=promp_jp_70227ea6cb&client_auth_key=OSn9-zprh0Xnb8dGsJdcxz91kQBAyhrLekrFM&search_query_string={search_query_string}


Following is a sample response.



  {
    "status": "success",
    "message": "Data present.",
    "next_query": "http://api.jobspikr.com/v1/data?client_id={client_id_placeholder}&client_auth_key={client_auth_key_placeholder}&search_query_string={search_query_string}&cursor=1550559619641049",
    "total_count": 1276,
    "size": 100,
    "job_data": [
      {
        "job_type": "Undefined",
        "cursor": 1549087218087473,
        "inferred_country": "India",
        "country": "India",
        "crawl_timestamp": "2019-02-02 05:31:23 +0000",
        "city": "Nashik|Navi Mumbai|Thane",
        "contact_phone_number": "7290851831",
        "inferred_city": "Mumbai",
        "salary_offered": "Rs 2.0 - 3.0 Lakh/Yr",
        "url": "https://www.shine.com/jobs/executivesr-executive-asst-manager-client-acquisition/indiamart-intermesh-ltd/9617276/",
        "contact_email": "medha.rawat@indiamart.com",
        "geo": "india",
        "inferred_state": "Maharashtra",
        "job_description": "Job Title/Designation : Executive/Sr. Executive/Assistant Manager (Client Acquisition) Location: Mumbai Department: New Sales Division Company Profile:  IndiaMART is India ..",
        "post_date": "2019-01-31",
        "company_name": "IndiaMart InterMesh Ltd.",
        "state": null,
        "category": "administration jobs",
        "job_title": "Executive/Sr. Executive/ Asst. Manager (Client Acquisition)"
      },
      ....
    ]
  }
                


The property job_data array contains the crawled job data. The number of job data in a response is mentioned in the property size. next_query property define the next url that needs to be requested to get the next set of data. More information on this is available in the below section.

The property status defines if the request is processed properly or not. It can following values success, no_data, error.

success - The request is handled successfully and the data is present in the response. The above sample response is an example for this.

error - The request is handled successfully but either data is not present or the parameter you've entered is invalid.

Following is an example for error request, where the organization is not active



  {
    "status": "error",
    "message": "This organization is not active."
  }
                    


Following is an example for no_data request, where the data is not present.



  {
    "status": "no_data",
    "message": "No more data present for this query.",
    "next_query": "http://api.jobspikr.com/v1/data_queries/17e9d9?client_id=cbtes_jp_3c42553f78&client_auth_key=dYZUjM8jZ4Na8qJ7dnmeQJIZfOyxTGLoeVXmLNdpw-g&search_query_string={search_query_string}&cursor=",
    "total_count": 0,
    "size": 0,
    "job_data": []
  }
                    


Following is an example for error request, where the data is not present.



  {
    "status": "error",
    "message": "Invalid id or client_auth_key."
  }
                    


How to get all data in incremental steps?


1. To get all the data, first make a query like the following. You can choose your preferred date but it should be with in the plans date range. 



  https://api.jobspikr.com/v1/data?client_id=promp_jp_70227ea6cb&client_auth_key=OSn9-zprh0XncCcub8dGsJdcxz91kQBAyhrofLekrFM&search_query_string={search_query_string}&date=20190220
                


2. The response of the above will contain a url in the next_query property. Use that url to make the next request. 



  https://api.jobspikr.com/v1/data?client_id=promp_jp_70227ea6cb&client_auth_key=OSn9-zprh0XncCcub8dGsJdcxz91kQBAyhrofLekrFM&search_query_string={search_query_string}&cursor=1550559619641049
                  


If you had noticed a new parameter called cursor is added to the url in next_query property. This is the cursor to fetch the next set of data.


3. For every successful requests, there will be next_query property with a cursor represeting the start the of next set of data. Make repeated requests with the url in next_query to fetch all the data.


4. When there are no more data, the api will respond with json containing status property with no_data as value. At this time store the current url and try again after sometime.


Query Parameters


You can see that this api contains some parameters like ( date, cursor etc). We provide a very flexible and customized api where you can define your own parameters according to your usages. Details of the parameters are listed below.


ParameterDescription
client_idThis is your basic unique authentication key promp_jp_70227ea6cb which makes up your API endpoint above.
client_auth_keyThis is your basic unique authentication key OSn9-zprh0XncCcub8dGsJdcxz91kQBAyhrofLekrFM which makes up your API endpoint above.
{search_query_string}This parameter allows the user to pass their own search query for which the data is returned. This search query string takes a string input in json format. More on how to create this query string is explained below

  https://api.jobspikr.com/v1/data?client_id=cbtes_jp_5a948ee7dd&search_query_string={"bool":{"must":{"query_string":{"default_field":"job_title","query":"Sales"}}}}
                    
sizeThis parameter allows user to fix the number of records returned from the api. It can be between 10 and 100. This is an optional parameter with a default value of 100. Size should not be a part of search query string and should be always sent separately as mentioned here.

  https://api.jobspikr.com/v1/data?client_id=promp_jp_70227ea6cb&client_auth_key=OSn9-zprh0XncCcub8dGsJdcxz91kQBAyhrofLekrFM&search_query_string={search_query_size}&size=50
                    
cursorThis parameter is mainly used for pagination. API response can contain a maximum of 100 records but if there are 2000 records present and to get everything you can use the cursor parameter. Cursor should not be a part of search query string and should always be send separately as mentioned here.

  https://api.jobspikr.com/v1/data?client_id=promp_jp_70227ea6cb&client_auth_key=OSn9-zprh0XncCcub8dGsJdcxz91kQBAyhrofLekrFM&search_query_string={search_query_string}&cursor=1550559619641049
                        


Every succesful response from the api will have a next_query property.



  "next_query": "https://api.jobspikr.com/v1/data?client_id=promp_jp_70227ea6cb&client_auth_key=OSn9-zprh0XncCcub8dGsJdcxz91kQBAyhrofLekrFM&search_query_string={search_query_string}&cursor=1550559619641049"
            

You can use this to get the next set of records.


Search Query String

Here is an example of the search query string json with all the parameters based on various search criteria for different data fields.



  {
     "bool": {
         "must": [
             {
                 "query_string": {
                     "default_field": "job_title",
                     "query": "\"Manager\" OR \"Admin\" OR \"Sales\""
                 }
             },
             {
                 "query_string": {
                     "default_field": "job_type",
                     "query": "*"
                 }
             },
             {
                 "query_string": {
                     "default_field": "company_name",
                     "query": "*"
                 }
             },
             {
                 "bool": {
                     "should": [
                         {
                             "bool": {
                                 "must": [
                                     {
                                         "query_string": {
                                             "fields": [
                                                 "country",
                                                 "inferred_country"
                                             ],
                                             "query": "\"England\""
                                         }
                                     },
                                     {
                                         "query_string": {
                                             "fields": [
                                                 "state",
                                                 "inferred_state"
                                             ],
                                             "query": "\"London\""
                                         }
                                     },
                                     {
                                         "query_string": {
                                             "fields": [
                                                 "city",
                                                 "inferred_city"
                                             ],
                                             "query": "\"london\""
                                         }
                                     }
                                 ]
                             }
                         },
                         {
                             "bool": {
                                 "must": [
                                     {
                                         "query_string": {
                                             "fields": [
                                                 "country",
                                                 "inferred_country"
                                             ],
                                             "query": "\"USA\""
                                         }
                                     },
                                     {
                                         "query_string": {
                                             "fields": [
                                                 "state",
                                                 "inferred_state"
                                             ],
                                             "query": "\"California\""
                                         }
                                     }
                                 ]
                             }
                         }
                     ]
                 }
             },
             {
                 "exists": {
                     "field": "salary_offered"
                 }
             },
             {
                 "query_string": {
                     "fields": [
                         "job_title",
                         "job_description"
                     ],
                     "query": "good OR positive"
                 }
             },
             {
                 "range": {
                     "post_date": {
                         "gte": "2019-04-09",
                         "lte": "2019-04-11"
                     }
                 }
             }
         ],
         "must_not": [
             {
                 "query_string": {
                     "default_field": "company_name",
                     "query": "Unspecified"
                 }
             },
             {
                 "query_string": {
                     "fields": [
                         "job_title",
                         "job_description"
                     ],
                     "query": "contract"
                 }
             }
         ]
     }
  }
    


Check out the following to understand the query components used to build the search query string for data delivery.


Query String

Query string is used to parse the content present in a data field.

queryThe actual query to be parsed.
default_fieldThis is the data field in which the query will be searched.


Here is an example:


  {
   "query_string": {
     "default_field": "job_title",
       "query": "\"Manager\" OR \"Admin\" OR \"Sales\""
     }
  }
      



Exists Query

Returns records that have non-null value in the concerned field.


Here is an example:



  {
    "exists": {
      "field": "salary_offered"
    }
  }
      


For instance, following fields would match the above query:



  { "salary_offered": "$40,000-$60,000" } 
  { "salary_offered": "Unspecified" } 
  { "salary_offered": ["$75,000"] } 
      



Range Query


Matches records with fields that have terms within a certain range. This query type is suitable for date fields.
The following example returns all records where date is between 9th April, 2019 and 11th April, 2019.



  {
    "range": {
      "post_date": {
        "gte": "2019-04-09",
        "lte": "2019-04-11"
      }
    }
  }
      


You can specify the following parameters in the range query:


gteGreater-than or equal to
gtGreater-than
lteLess-than or equal to
ltLess-than


The date format in range query will always be yyyy-mm-dd.


Bool Query


This query is used to match records with boolean combinations of other queries. The boolean clauses have typed conditions. Following are the conditions:

mustThe clause (query) must appear in the fields of the matching records.
shouldThe clause (query) should appear in the fields of the matching records. In a boolean query with no must, one or more should clauses must match a document.
must_notThe clause (query) must not appear in the fields of the matching records.


The following query searches for records where the “country” and ”infered_country” fields are England, “state” and “infered_state” fields are London, “city” and “infered_city” are also London. Note: Infered_country, Infered_state, and Infered_city are the fields that we programmatically derive from the actual fields available on the job listings page.



  {
    "bool": {
      "should": [
      {
        "bool": {
          "must": [
          {
            "query_string": {
              "fields": [
                "country",
                "inferred_country"
              ],
              "query": "\"England\""
            }
          },
          {
            "query_string": {
              "fields": [
                "state",
              "inferred_state"
              ],
              "query": "\"London\""
            }
          },
          {
            "query_string": {
              "fields": [
                "city",
              "inferred_city"
              ],
              "query": "\"london\""
            }
          }
          ]
        }
      },
      {
        "bool": {
          "must": [
          {
            "query_string": {
              "fields": [
                "country",
              "inferred_country"
              ],
              "query": "\"USA\""
            }
          },
          {
            "query_string": {
              "fields": [
                "state",
              "inferred_state"
              ],
              "query": "\"California\""
            }
          }
          ]
        }
      }
      ]
    }
  }