Clay
Call SpecStream from a Clay table with your own SpecStream API key, through Clay's HTTP API enrichment. Ask the Search API one question per row, or ask Deep Search for a list and get its rows in a Clay webhook table.
SpecStream for ClayOutreach & salesWhat you need
- A Clay plan that includes the HTTP API enrichment.
- A SpecStream account. New accounts get $10 of credit on sign-up, no card. Create one.
- A SpecStream API key, made in step 1.
- 1
1. Create an API key
In SpecStream, open Agents & API, choose API keys, then Create API key, and name the key Clay.
The Search API needs Authorize paid work. Deep Search also needs Read saved requests, Create and edit requests, Prepare work and follow-ups, and Read results and their sources. Under Authorize paid work, give the key a Total spending limit. Before the key can start a run, set your account's own spending limit in Settings, under Usage and billing.
The key is shown once, so copy it before you close the dialog.
- 2
2. Save the key in Clay
In a table, click Add enrichment, search for HTTP API, and open Configure. Click Select header account, then + Add account.
Under API Request Headers, add
Authorizationwith the valueBearer YOUR_SPECSTREAM_KEY, andContent-Typewith the valueapplication/json. Name the account SpecStream and click Save. Every HTTP API column in the workspace can then use it. - 3
3. Ask one question per row
Add a text column named Company. Add an HTTP API enrichment, choose the SpecStream header account, and fill it in as below. Type
/to insert a column.Click Test on one row, then run the column.
data.answer.valueis the answer,data.answer.pageis the page it was read from, anddata.answer.seen_atis when it was read. When no result prints an answer,data.answeris empty anddata.sourceslists the results read.Each search is $5 per 1,000 searches of up to 10 results, with no quote and no approval.
HTTP API column - 4
4. Make a webhook table for the rows
Deep Search finds every match for a request and sends the rows to Clay when the run ends. In a workbook, click + Add at the bottom, search for Webhooks, and click Monitor webhook. Copy its URL.
Leave the webhook without an authentication token, because SpecStream sends none.
- 5
5. Start a request with a maximum price
Make a table with four columns: Request (text), Count (number, 1 to 500), Max cents (number, the most the request may cost) and Key (text, 8 to 128 characters, new for each request).
Add an HTTP API enrichment named Start with the method
POST, the SpecStream header account, the endpointhttps://api.specstream.ai/v1/capacity/requests, and the body below. Put quotes around text columns and none around number columns, and paste your webhook URL incallback_url. Set Field paths to return todata.stateanddata.message, and leave Rate limiting empty.Try it with the Request
Cybersecurity software companies in Germany with 50 to 200 employees, with their website and headquarters city, a Count of 25, and Max cents of 500.Body of the Start column - 6
6. See the price and approve it
Start answers at once with the state
reading. SpecStream then reads the request and prices it, and starts the run only when the price is at or below Max cents. Above it, nothing runs.To follow a request, add an HTTP API column named Status with the method
GETand the endpoint below, with the Key column inserted afterrequests/. Under Conditional runs, run it only when Start is not empty. Set Field paths to return todata.state,data.read_back,data.maximum_cents,data.message, anddata.done. Reading it costs nothing.To see the price before anything runs, set Max cents to 1. The state is then
above_maximum,maximum_centsis the price, andread_backis how SpecStream read the request. To approve that price, set Max cents to it, give the row a new Key, and run Start again. The webhook table also gets a row each time a request ends without a run.Endpoint of the Status column - 7
7. Make one Clay row per result
When the run ends, SpecStream posts the rows to the webhook table, so no row in Clay waits on a running list. A large result arrives in parts of at most 90 KB, each as its own webhook row.
In the webhook table, click Exports, then Send table data. Pick the destination table, choose Send row for each item in a list, select
flat_rows, and click Save. In the destination table, click a cell, hover over a field, and click Add to column.For a request about people, add
"one_row_per": "people"to the Start body, and each person arrives as a row of their own.
What arrives
Each item of flat_rows is one result as flat fields.
Source URL and read time on every value.
id,position, andlist_link, which opens the list in your SpecStream workspace.- One field per column, named the way the list names it.
<field>_sourcebeside each field: the page that value was read from.source_urlandchecked_at: the page of the fact that put the result in the list, and when it was read.rowsholds each result in full, with every value's page and read time.
What the state says
Status reads data.state. A request that ends without a run sends the same state to the webhook table.
| `state` | What it means | What to do |
|---|---|---|
reading | SpecStream is reading the request and pricing it. | Read it again in a few seconds. |
started | The run started. status shows where it is. | Wait for the rows in the webhook table. |
needs_edit | SpecStream needs a clearer request. read_back shows how it read it. | Add the place or what every result must meet, then start it again with a new key. |
above_maximum | The price is above your maximum, and nothing ran. maximum_cents is the price. | Raise the maximum or ask for fewer results, then start it again with a new key. |
failed | The run did not start. message says why, such as the key's spending limit. | Fix what message names and start it again with the same key. |
Cost
Searches and rows are paid to SpecStream from your SpecStream balance. Reading a request, pricing it, and reading Status cost nothing. A search is $5 per 1,000 searches of up to 10 results. Each matching row costs 5¢, 15¢ or $1, depending on how much the row needs, plus 5¢ for a person's email and 15¢ for a phone. A run never costs more than the maximum you set, and a run that finds nothing costs nothing. Clay bills for its own plan. Balance, quotes, and billing has the details.
Disconnect
Delete the HTTP API columns, then delete the SpecStream header account under Settings, then Connections. To end access, revoke the key under API keys in Agents & API. Rows already in Clay stay there. Questions go to [email protected].
More
SpecStream for Clay covers what it does in Clay on one page. Every other tool has its guide in Connect your tools. You see the most a request can cost before it starts, and the matches are paid from your balance. Billing has the details. For help, email [email protected].