Skip to main content
Add the same facts to every item in a list, such as a license and a first release year for each database, with one query instead of one script per item. SELECT runs one search per item, extracts the fields you name from each page with an LLM, and groups the pages back into one row per item.

Recipe prompt

Paste this into your coding agent. It works in any agent that has the Keenable SELECT MCP server connected:
Recipe prompt
To connect the server, see SELECT → Connect.

What you build

The query has two layers. The inner SELECT makes one row per page. The outer one groups those rows into one row per item: This is the query the sample sends:
A query must read FROM a WEB_SEARCH(...) call, a WEB_FETCH(...) call or a result set ID, so the list goes into the searches themselves. If the list came from an earlier query, read its result set ID and run WEB_SEARCH(item || ' license and first release year') for each row instead. See Recipes in the function reference.

When it runs

On demand, once per list. The query takes seconds to minutes, because it runs real searches, fetches pages and calls an LLM for each page. Every call stores its table as a result set for 30 days, so follow-up questions about the same rows run without new searches.

Code

Your agent runs the query for you over MCP. To run it from your own code, the TypeScript tab calls the select tool on https://select.keenable.ai/mcp with your API key, through the official MCP TypeScript SDK. The curl tab sends the same query to the pay-per-request path, which needs no account:
The TypeScript sample builds the WEB_SEARCH list from the items array and prints the tool’s text output. The curl call returns the 402 offer: pay it as in SELECT over x402, and the paid retry returns the table.

Example output

The result is a table with one row per item and four columns: item, license, first_release and sources. A run returns rows like these. This table is illustrative: values and sources counts change with what the searches find on the day.

Production notes

Over x402, a query costs $0.10 when it succeeds. See Pay per request.

Next steps