
AI Development
AdsCrawl for Jev
Use AdsCrawl to collect a page and TypeSafe’s Jev model to make a structured decision about it. AdsCrawl returns rendered Markdown; Jev receives that content as state and returns typed answers such as a yes/no probability.
What you can do
Live page evidence
Read a known page before evaluating its content, keeping the URL in the request state.
Structured decisions
Use noul for yes/no probabilities; TypeSafe also documents choice and score question types.
Application routing
Use the returned score in your own rules, with thresholds chosen from representative examples.
Before you start
- An AdsCrawl account with an API key and available credits.
- Node.js 22.22 or newer, running on your server or local development machine.
- A separate TypeSafe account and TYPESAFE_API_KEY for Jev inference.
SETUP METHOD 01
Read, then evaluate with Jev
Combine the AdsCrawl and TypeSafe SDKs. This example sends the retrieved page text to TypeSafe for inference.
Install dependencies
Run this in your application directory.
npm install adscrawl @typesafe-ai/sdkConfigure your API key
Set the variables in your server environment or local shell. Replace the placeholders with your own keys; keep them out of browser bundles and source control.
export ADSCRAWL_API_KEY="your_adscrawl_api_key" export TYPESAFE_API_KEY="your_typesafe_api_key"Save jev-web.mjs
Ask whether the page describes a domain intended for documentation examples. The noul field is a probability from 0 to 1, not a Boolean.
import AdsCrawl from "adscrawl"; import { noul, TypeSafeClient } from "@typesafe-ai/sdk"; const browser = new AdsCrawl({ apiKey: process.env.ADSCRAWL_API_KEY }); const typesafe = new TypeSafeClient({ apiKey: process.env.TYPESAFE_API_KEY }); const url = "https://example.com"; const markdown = await browser.markdown({ url, waitUntil: "domcontentloaded", }); if (!markdown.trim()) throw new Error("The page returned no text"); const { answers } = await typesafe.systemOne({ model: "jev-latest", state: { source: url, page: markdown }, questions: { exampleDomain: noul("Does this page describe a domain intended for use in documentation examples?"), }, }); console.log({ source: url, probability: answers.exampleDomain.noul });Run and connect the next step
Expect an object containing source and a numeric probability. The value comes from the model and is not fixed. Replace the question with your business criterion, evaluate it against labeled pages, then choose an accept/review/reject policy.
node jev-web.mjs
Usage & limits
- Jev is a decision model, not a page crawler or a general chat framework. AdsCrawl retrieval and TypeSafe inference use separate accounts and billing. A probability is not a guarantee that the page’s claims are true.
- Each page request uses AdsCrawl credits. These examples fetch one public URL; JavaScript-rendered pages may need a different waitUntil setting or additional browser interactions.
- Keep the source URL with the content. For longer pages, choose a chunking or context-budget strategy before passing text to a model.