Skip to the page

Postman

Try the SpecStream API in Postman before you write code. Every endpoint is a ready request, sorted into folders, so you can ask for live web data in plain words, see the price, approve it, and read the results with the page behind each value.

SpecStream for PostmanAPI & cloud platforms

What you need

  • A Postman account that can fork a collection.
  • A SpecStream account. New accounts start with $10 of work and need no card.
  • A SpecStream API key from your workspace.
  1. 1. Fork the collection

    Open the SpecStream workspace on Postman (opens in a new tab) and fork the SpecStream collection into a workspace of your own.

    The OpenAPI spec for the same API sits beside the collection. The collection's baseUrl variable already points at https://api.specstream.ai.

  2. 2. Create an API key

    In the SpecStream workspace, open Agents & API, choose the API keys tab, and click Create API key. Label the key Postman.

    Tick every permission except Read projects and Manage projects and members. Ticking Authorize paid work adds a Total spending limit field. Click Set a total limit and enter the most this key may spend in total.

    Set Expires after, days to cover the time you plan to use the key, from 1 to 365. Click Create API key and copy the key. SpecStream shows it once.

  3. 3. Put the key in api_key

    In Postman, open the forked collection's Variables tab and paste the key into the current value of api_key. The collection sends that value as a Bearer token with every request. You don't set up authorization on each one.

    Postman keeps a current value on your machine and doesn't sync it to the workspace.

  4. 4. Send a request that costs nothing

    In the Plans & billing folder, send Read available work balance. A response with your balance means the key works.

    Read account permissions and spending limits shows what the key may do and how much of its spending limit remains.

  5. 5. Read a request

    In the Requests folder, open Read a natural-language request and write what you want in the body's q field. Reading a request starts no paid work.

    The response has read_back, which is your request in plain words, and ast_hash. Copy ast_hash into the collection variable of the same name.

    Body of Read a natural-language request
    {
    "q": "Independent bookstores in Portland, Oregon, with their website and phone number",
    "locale": "en-US"
    }
  6. 6. Get the price

    In Plans & billing, send Get a price before work starts. Its body uses {{ast_hash}} and asks for 25 results. minimum_units is the fewest results worth delivering, and below it nothing is charged. Change either number to fit.

    The response has quote_id, quote_hash, maximum_cents, and expires_at. Copy quote_id and quote_hash into the variables of the same names. A price stays open for 30 minutes.

    Body of Get a price before work starts
    {
    "ast_hash": "{{ast_hash}}",
    "operation": "find",
    "requested_units": 25,
    "minimum_units": 5
    }
  7. 7. Approve the price

    Open Approve a price and start work. In the body, change confirm_max_cents from 0 to the maximum_cents from the price. Replace the placeholder idempotency_key with a value of your own, 8 to 128 characters long.

    Send it. The response names the find in find_id. SpecStream holds the approved maximum from your balance while the work runs and charges only for the results that match.

    Body of Approve a price and start work, with your own maximum_cents
    {
    "quote_id": "{{quote_id}}",
    "quote_hash": "{{quote_hash}}",
    "confirm_max_cents": 250,
    "idempotency_key": "postman-bookstores-001"
    }
  8. 8. Read the results

    In the Results folder, set the path variable id to your find_id on the request's Params tab. Read find status shows progress. Read results and possible matches returns the results, each value with the page it was read from.

    Possible matches come back apart from rows and are never billed. Read finished results and sources returns the finished results with the pages behind them, and Export results returns a one-use download link.

Folders

The collection groups its requests by job.

FolderWhat it holds
RequestsRead a request in plain words, edit it, save it, keep its revisions, and share it with a link.
Plans & billingPrices and approvals, your balance, plans, monitors that refresh a request on a schedule, and reports of a wrong result.
ResultsFind status, results, exports, share links, and finished results with their sources.
ConnectionsConnect a tool, read its destinations and columns, send results, and send new and changed records automatically.
ImportsImport a CSV or XLSX file or a connected table, with daily updates you can start or stop.
ProjectsCreate projects with a spending limit and set each member's role and limit.
Account & authAPI keys, webhooks, your permissions and spending limits, and an export of your account data.
WorkspaceCollections, views, notes, notifications, the audit log, and security settings.

Retry an approval safely

If the answer to an approval never arrives, send Recover work by request key in Plans & billing with the same idempotency_key. It returns the find already started, so a retry doesn't start a second one.

Cost

The collection is free. Reading, exporting, and sharing cost nothing either.

Work is paid from your SpecStream balance, at 10¢, 30¢, or $1 for each result that matches, depending on how much each result asks for. The price response shows the most the work can cost before it starts. New accounts start with $10 of work to use in 30 days. Approvals are explained in balance, quotes and billing. The pricing page lists the rates.

The key's total spending limit caps what Postman can spend. A key without Authorize paid work can read but can't start work.

Go further

When the requests work, move to code with the REST API guide or the SDKs and command line. The Connections folder sends results to a tool you already use, and Connect your tools covers each one.

Remove the key

Delete your fork in Postman. In SpecStream, open Agents & API, choose API keys, and choose Revoke on the key. The next request made with it fails. If something doesn't work, write to [email protected].

More

SpecStream for Postman covers what it does in Postman 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 only the matches come out of your balance. Billing has the details. For help, email [email protected].