实时订阅 Find More
curl --request GET \
--url https://revor.ai/api/v2/prospect-lists/{webset_id}/expand/streamimport requests
url = "https://revor.ai/api/v2/prospect-lists/{webset_id}/expand/stream"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://revor.ai/api/v2/prospect-lists/{webset_id}/expand/stream', 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://revor.ai/api/v2/prospect-lists/{webset_id}/expand/stream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://revor.ai/api/v2/prospect-lists/{webset_id}/expand/stream"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://revor.ai/api/v2/prospect-lists/{webset_id}/expand/stream")
.asString();require 'uri'
require 'net/http'
url = URI("https://revor.ai/api/v2/prospect-lists/{webset_id}/expand/stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body潜客名单
实时订阅 Find More
原入口 GET /api/v2/websets//find-more/stream 继续支持,参数、返回字段和权限均保持一致。两个 URL 执行同一操作。
GET
/
api
/
v2
/
prospect-lists
/
{webset_id}
/
expand
/
stream
实时订阅 Find More
curl --request GET \
--url https://revor.ai/api/v2/prospect-lists/{webset_id}/expand/streamimport requests
url = "https://revor.ai/api/v2/prospect-lists/{webset_id}/expand/stream"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://revor.ai/api/v2/prospect-lists/{webset_id}/expand/stream', 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://revor.ai/api/v2/prospect-lists/{webset_id}/expand/stream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://revor.ai/api/v2/prospect-lists/{webset_id}/expand/stream"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://revor.ai/api/v2/prospect-lists/{webset_id}/expand/stream")
.asString();require 'uri'
require 'net/http'
url = URI("https://revor.ai/api/v2/prospect-lists/{webset_id}/expand/stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body订阅一次指定 Find More job 的状态、策略和 Items 增量。需要
当 job 在启动新轮次之前失败或取消时发送,随后关闭连接。若新轮次已经启动,最终结果以
websets:read 权限。
原入口
GET /api/v2/websets/{webset_id}/find-more/stream 继续支持,参数、返回字段和权限均保持一致。两个 URL 执行同一操作。概览
| 方法 | GET |
| 路径 | https://revor.ai/api/v2/prospect-lists/\{webset_id\}/expand/stream |
| 权限 | websets:read |
Query 参数
必须绑定本次job_id。服务端会等待该 job 对应的新挖掘轮次真正出现,不会把上一轮残留的 completed 误判为本轮完成。
请求示例
cURL
curl -N "https://revor.ai/api/v2/prospect-lists/WEBSET_ID/expand/stream?job_id=JOB_ID&cursor=289&items_revision=18&match=qualified" \
-H "Authorization: Bearer sk-revor-REPLACE_ME" \
-H "Accept: text/event-stream"
事件
该接口包含 Items SSE 的ready、webset.state、webset.strategy、items.changed、reset、complete、reconnect 和 error,并增加以下事件。
ready、webset.state 和 complete 同样包含 progress、failure。详细字段、截断与断点恢复规则见 Items SSE。
find_more.state
find_more.state
{
"webset_id": "webset-uuid",
"job_id": "job-uuid",
"job_status": "running",
"run_observed": true
}
run_observed=true 表示本次 Find More 的新轮次已经被观察到。
find_more.failed
当 job 在启动新轮次之前失败或取消时发送,随后关闭连接。若新轮次已经启动,最终结果以 items.changed 和 complete 为准。
find_more.failed
{
"webset_id": "webset-uuid",
"job_id": "job-uuid",
"job_status": "failed",
"error_code": "webset_find_more_failed"
}
ready、complete 和 reconnect 会额外包含 find_more_job_id。收到 complete 后即可结束;收到 reset 时重新读取完整 Items 快照。
