Lookup: create a segment from a description
curl --request POST \
--url https://api.example.com/api/v2/lookups/segments/from-descriptionimport requests
url = "https://api.example.com/api/v2/lookups/segments/from-description"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/api/v2/lookups/segments/from-description', 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://api.example.com/api/v2/lookups/segments/from-description",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://api.example.com/api/v2/lookups/segments/from-description"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v2/lookups/segments/from-description")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/lookups/segments/from-description")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyLookups (Chrome extension)
Lookup: create a segment from a description
Natural-language description → applied filter segment
POST
/
api
/
v2
/
lookups
/
segments
/
from-description
Lookup: create a segment from a description
curl --request POST \
--url https://api.example.com/api/v2/lookups/segments/from-descriptionimport requests
url = "https://api.example.com/api/v2/lookups/segments/from-description"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/api/v2/lookups/segments/from-description', 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://api.example.com/api/v2/lookups/segments/from-description",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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://api.example.com/api/v2/lookups/segments/from-description"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v2/lookups/segments/from-description")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/lookups/segments/from-description")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyCreates a segment from a natural-language description. Used by the Chrome extension’s “Create stream from search” flow.
The AI pipeline maps the description to canonical filter labels via the audit-079 auto-approve workflow (LLM-proposed labels are materialized into the controlled vocabulary, then re-mapped, in one call).
Body
| Field | Type | Description |
|---|---|---|
description | string (required) | Natural-language description, max 1000 chars |
trackedAccountId | number | Optional - assign the new segment to this tracked account via the default-stream chokepoint |
Response
{
"segment": {
"id": 12,
"name": null,
"description": "AI founders building developer tools"
},
"assignment": {
"assigned": true,
"alreadyAssigned": false,
"position": 0
},
"assignError": null
}
assignment is null when trackedAccountId was not supplied. assignError is populated on cap-exceeded / not-found / account-inactive.
Errors
| Code | HTTP | When |
|---|---|---|
no_filters_matched | 400 | LLM couldn’t extract any filters from the description |
cap_exceeded (in assignError) | - | Tier cap of segments-per-account exceeded |