End the LinkedIn half of a search read in the user's browser
curl --request POST \
--url https://hiresweep.com/api/openapi/discovery/runs/{id}/browser-search/finish \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"clientId": "<string>",
"stopped": true
}
'import requests
url = "https://hiresweep.com/api/openapi/discovery/runs/{id}/browser-search/finish"
payload = {
"clientId": "<string>",
"stopped": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({clientId: '<string>', stopped: true})
};
fetch('https://hiresweep.com/api/openapi/discovery/runs/{id}/browser-search/finish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://hiresweep.com/api/openapi/discovery/runs/{id}/browser-search/finish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clientId' => '<string>',
'stopped' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://hiresweep.com/api/openapi/discovery/runs/{id}/browser-search/finish"
payload := strings.NewReader("{\n \"clientId\": \"<string>\",\n \"stopped\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://hiresweep.com/api/openapi/discovery/runs/{id}/browser-search/finish")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"clientId\": \"<string>\",\n \"stopped\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiresweep.com/api/openapi/discovery/runs/{id}/browser-search/finish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clientId\": \"<string>\",\n \"stopped\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"clientId": "<string>",
"resumeId": "<string>",
"requestedTargetCount": 0,
"targets": [
{
"title": "<string>",
"keywords": [
"<string>"
],
"selected": true
}
],
"targetsGeneratingSince": "2023-11-07T05:31:56Z",
"filters": {
"locations": [
"<string>"
],
"remoteOnly": true,
"postedWithinDays": 1,
"companyStages": [
"early"
],
"excludedBoards": [
"greenhouse"
]
},
"status": "drafting",
"statusChangedAt": "2023-11-07T05:31:56Z",
"failureReason": "<string>",
"boardOutcomes": [
{
"board": "greenhouse",
"outcome": "ok",
"reason": "<string>"
}
],
"events": [
{
"at": "<string>",
"kind": "tool",
"label": "<string>",
"text": "<string>",
"error": true
}
],
"targetsSearched": 0,
"lastProgressAt": "2023-11-07T05:31:56Z",
"serverSearchPending": true,
"browserSearchPending": true,
"scheduleId": "<string>",
"scheduled": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Discovery
End the LinkedIn half of a search read in the user's browser
Tells HireSweep the browser has read every ticked Target’s LinkedIn search it is going to (or stopped, with stopped set). The run ends once its other half, the companies’ job boards, has ended too: done, with its credit spent when it found at least one job and handed back when it found none; or failed when stopped is set and it found no job. Calling it again, or on a run that is not searching or whose browser half is not pending, changes nothing. HireSweep never requests LinkedIn. LinkedIn is read only from Discover in the web app, in your own browser. Requires authentication.
POST
/
discovery
/
runs
/
{id}
/
browser-search
/
finish
End the LinkedIn half of a search read in the user's browser
curl --request POST \
--url https://hiresweep.com/api/openapi/discovery/runs/{id}/browser-search/finish \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"clientId": "<string>",
"stopped": true
}
'import requests
url = "https://hiresweep.com/api/openapi/discovery/runs/{id}/browser-search/finish"
payload = {
"clientId": "<string>",
"stopped": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({clientId: '<string>', stopped: true})
};
fetch('https://hiresweep.com/api/openapi/discovery/runs/{id}/browser-search/finish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://hiresweep.com/api/openapi/discovery/runs/{id}/browser-search/finish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clientId' => '<string>',
'stopped' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://hiresweep.com/api/openapi/discovery/runs/{id}/browser-search/finish"
payload := strings.NewReader("{\n \"clientId\": \"<string>\",\n \"stopped\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://hiresweep.com/api/openapi/discovery/runs/{id}/browser-search/finish")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"clientId\": \"<string>\",\n \"stopped\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiresweep.com/api/openapi/discovery/runs/{id}/browser-search/finish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clientId\": \"<string>\",\n \"stopped\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"clientId": "<string>",
"resumeId": "<string>",
"requestedTargetCount": 0,
"targets": [
{
"title": "<string>",
"keywords": [
"<string>"
],
"selected": true
}
],
"targetsGeneratingSince": "2023-11-07T05:31:56Z",
"filters": {
"locations": [
"<string>"
],
"remoteOnly": true,
"postedWithinDays": 1,
"companyStages": [
"early"
],
"excludedBoards": [
"greenhouse"
]
},
"status": "drafting",
"statusChangedAt": "2023-11-07T05:31:56Z",
"failureReason": "<string>",
"boardOutcomes": [
{
"board": "greenhouse",
"outcome": "ok",
"reason": "<string>"
}
],
"events": [
{
"at": "<string>",
"kind": "tool",
"label": "<string>",
"text": "<string>",
"error": true
}
],
"targetsSearched": 0,
"lastProgressAt": "2023-11-07T05:31:56Z",
"serverSearchPending": true,
"browserSearchPending": true,
"scheduleId": "<string>",
"scheduled": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Body
application/json
Response
200 - application/json
The run, ended or still waiting on its job boards.