Examples
Copy-ready commands and scripts for the most common collection jobs.
Copy and run any of them; the “Details” box under each one lists its options.
Use it from Python
Open a page with a fresh identity
The identity is created, used and deleted even if your script crashes. Pass profile_id to reuse a profile you already have (it is not deleted).
import kryptix_sdk as kx # A brand-new identity: created, used and deleted for you with kx.playwright_page(os="windows", proxy="") as page: page.goto("https://example.com") kx.wait_challenge(page) # waits out "Just a moment..." pages print(kx.structured_data(page)["jsonld"]) # JSON-LD, __NEXT_DATA__, OpenGraph # Or re-use a profile you already have (it is not deleted) with kx.playwright_page(profile_id="YOUR_PROFILE_ID") as page: page.goto("https://example.com")
Collect many addresses at once
A fresh identity per job; a failed page is retried with a new identity; results are written as they finish; a second run continues where the first stopped.
import kryptix_sdk as kx def work(page, url): # called once per address page.goto(url) kx.require_clear(page) # raises on a CAPTCHA page -> new identity, retry return {"title": page.title()} results = kx.run_many(kx.read_lines("urls.txt"), work, concurrency=3, proxies=kx.read_lines("proxies.txt"), out="results.csv") for r in results: print(r.ok, r.job, r.data or r.error)
Details and options
proxies=kx.read_lines("proxies.txt") rotates proxies, domain_delay=2 waits between hits on one site, validate=… catches pages that load but hold no data, evidence=True keeps screenshots of failures.
Using another tool (Playwright, Puppeteer, Selenium, SeleniumBase, nodriver, PowerShell)? Find the ready code in Connection code.
No code (command line)
A list of addresses to CSV
Title, description, JSON-LD types and more go to results.csv.
python kryptix_sdk.py bulk urls.txt --out results.csv --concurrency 3
Details and options
Download kryptix_sdk.py with the “Save the SDK file” button in the Connection code tab (pip install playwright), put urls.txt (one URL per line) next to it and run this in a Command Prompt opened in that folder. Saves title, description, JSON-LD types and more to results.csv. Options: --proxies proxies.txt --retries 2 --per-session 5 --pause 2 --full --domain-delay 2 --per-domain 2 --evidence --proxy-type http (for proxy lines written without socks5:// or http://; default socks5).
List a site's pages
Reads the sitemap and writes the addresses to urls.txt, ready for bulk.
python kryptix_sdk.py sitemap https://shop.example.com --match /product/ --limit 200 --out urls.txt
Details and options
Download kryptix_sdk.py with the “Save the SDK file” button in the Connection code tab and run this in a Command Prompt opened in that folder (Kryptix does not need to be running). It reads the site's sitemap (found through robots.txt, sitemap index files and .xml.gz files are followed) and writes the page addresses to urls.txt, ready for the bulk command. --match /product/ keeps only addresses containing that text, --skip /blog/ drops some, --limit 200 stops after 200. If the site refuses the download (bot protection), save its sitemap from your normal browser as sitemap.xml and give that file instead of the address.
Pick your own fields
Name each field and where it sits on the page (a CSS selector). @src takes an attribute, [] takes every match.
python kryptix_sdk.py bulk urls.txt --select "title=h1" --select "price=.price" --select "image=img.main@src" --out products.csv
Details and options
Instead of the default columns, name the fields you want and where they are on the page (a CSS selector: right-click the value in Chrome > Inspect). name=.price takes the text; name=img.main@src takes an attribute (links and images come back as full addresses); name=.tag[] takes every match. Pages that load their data late are waited for (--wait 5). A page where none of the fields is found counts as failed and is tried again with a new identity. Try it on 2-3 addresses first. Changed a selector? Add --no-resume.
A list page: one line per item
--rows is one item block; --next follows the “next page” link.
python kryptix_sdk.py bulk pages.txt --rows ".product" --select "name=h2" --select "price=.price" --select "link=a@href" --next "a.next" --max-pages 5 --out items.csv
Details and options
For pages that show many items (a product list, search results, a table). --rows is the CSS selector of ONE item block (right-click an item in Chrome > Inspect, pick the box that wraps a single item); the --select selectors are searched inside each block, and every block becomes a line of the CSV. --next is the 'next page' link: its address is followed, page after page, up to --max-pages (default 10), with a short pause between pages (--page-delay 1). If a later page is blocked, what was collected so far is kept and the summary says where it stopped. Try it on --max-pages 2 first. Changed a selector? Add --no-resume.
A list that loads as you scroll or by a button
--scroll for infinite scroll, --more for a “Load more” button.
python kryptix_sdk.py bulk pages.txt --rows ".item" --select "name=h2" --select "price=.price" --scroll --max-scrolls 10 --out items.csv # or press a button instead of scrolling: python kryptix_sdk.py bulk pages.txt --rows ".item" --select "name=h2" --select "price=.price" --more "button.load-more" --out items.csv
Details and options
For pages with no 'next page' link: the list grows while you scroll down (infinite scroll) or when you press a 'Load more' button. Use --rows and --select as before, then add --scroll, or --more with the CSS selector of the button (right-click the button in Chrome > Inspect). It scrolls or presses again and again, waits up to --scroll-wait seconds (2) for new items after each step, and stops when nothing new comes, after --max-scrolls steps (30) or at --max-rows. If it ran out of steps while more items existed, the summary says so: raise --max-scrolls. Try a small --max-scrolls first. Changed a selector? Add --no-resume.
Keep items in a database and skip repeats
A .db is a SQLite file; --dedupe link treats the same link as the same item. New items are added, changed ones updated.
python kryptix_sdk.py bulk pages.txt --no-resume --rows ".item" --select "name=h2" --select "link=a@href" --select "price=.price" --out items.db --dedupe link # turn it into a CSV for Excel: python kryptix_sdk.py export items.db --out items.csv
Details and options
End --out with .db and the items go into one SQLite file that grows from run to run (open it with the free 'DB Browser for SQLite', or turn it into an Excel file with the second line). --dedupe link means: items with the same link are the same item. A new item is added; one that changed (a new price) is updated and its old price is kept in the 'changes' table; one that did not change is only marked as seen again. Without --dedupe an item is all of its fields: an identical one is not stored twice, a changed one is added as a new line. Add --no-resume when you run it again, otherwise the pages that are already done are skipped. A page that failed is not stored. Delete the .db file to start a new dataset. --dedupe also works with --out items.csv (repeats inside the run are left out).
Send new and changed items to your own address
Try it on this computer first: the first line starts a small receiver (leave its window open), the second sends a test message, the third streams a real collection into it.
python kryptix_sdk.py webhook listen --port 8099 python kryptix_sdk.py webhook test http://127.0.0.1:8099/ python kryptix_sdk.py bulk pages.txt --no-resume --rows ".item" --select "name=h2" --select "link=a@href" --select "price=.price" --out items.db --dedupe link --webhook http://127.0.0.1:8099/ --webhook-on new,changed
Details and options
Every finished page (or, with an .db file, every NEW or CHANGED item) is posted to an address you own: your server, or the 'catch hook' address of Zapier, Make or n8n. Try it first on this computer: the first line starts a small receiver (leave that window open, it prints what arrives), the second line sends a test message, the third runs a real collection into it. Sending happens in the background and never slows the browsers; each message is tried up to 4 times, and what still could not be delivered is saved next to the results (items.webhook-failed.jsonl) and can be sent again with: webhook replay FILE --webhook URL. --webhook-secret KEY signs every message (header X-Kryptix-Signature, HMAC-SHA256 of the body); --webhook-header "Authorization: Bearer ..." adds a key header; --webhook-batch 20 puts 20 items in one message; --webhook-split sends one message per row (with --rows). The address is never printed in full (its path may hold a key). Public data only; the receiver must be yours.
A job that runs by itself
Save a command under a name and schedule it with --every 6h (at least 5 minutes) or --daily 09:00.
python kryptix_sdk.py jobs add prices --every 6h -- bulk pages.txt --no-resume --rows ".item" --select "name=h2" --select "link=a@href" --select "price=.price" --out items.db --dedupe link python kryptix_sdk.py jobs list # last run and next due time python kryptix_sdk.py jobs run prices # run it now python kryptix_sdk.py jobs runner # starts jobs when due; keep this window open
Details and options
Save a bulk command under a name and let it start on a schedule: --every 6h (30m, 6h, 1d; at least 5m) or --daily 09:00. Everything after the two dashes is the normal bulk command; it is stored together with the folder you are in. 'jobs list' shows when each job last ran and when it is due, 'jobs run NAME' runs one now, 'jobs show NAME' and 'jobs remove NAME' do what they say. 'jobs runner' is the small program that starts the jobs when they are due: keep its window open, or run 'jobs task' to get a ready Windows Task Scheduler line (nothing is installed until you paste that line yourself). Kryptix Manager must be running when a job starts. A job that is still running is not started a second time, a run longer than --max-minutes (180) is stopped, and each run writes a log in kryptix_jobs_logs. Webhook keys you give a job are kept in kryptix_jobs.json on this computer and never shown on screen. Use --no-resume in the command, otherwise the pages that are already done are skipped on the next run.
Click instead of writing selectors
The page opens; you click one item, then everything you want to save, and it prints the ready bulk line.
python kryptix_sdk.py pick https://shop.example.com/products
Details and options
Opens the page in a fresh Kryptix browser with a small panel in the corner. Step 1: click ONE whole item of the list (a product card, a table row); the blue frames show what was understood, Bigger / Smaller fixes it. Step 2: click each thing you want to save (title, price, link, image), give it a name and press Add; the panel tells you in how many items it was found. 'Next page' and 'Load more' take one click on the link or button. Press Done: the window closes and the command prints the ready bulk line; the picked fields are also saved in fields.txt (and pages.txt is made if you have none). Public pages only; links on the page are frozen while you pick, so nothing is opened by accident. Kryptix Manager must be running.
What worked, what was blocked, what to change
Turns the results file into a report in plain words. No browser needed.
python kryptix_sdk.py report results.jsonl --html report.html
python kryptix_sdk.py report items.dbDetails and options
After a run, turn the results file into a plain-words report: per site how many pages worked, why the others failed (blocked, proxy, timeout, address), pages that loaded but came back EMPTY (usually a silent block), whether the success rate fell during the run, and what to change next. Works on results.jsonl (--out results.jsonl in the bulk command) and on a .db dataset (items, sites, new items per day, changes per field). --html report.html also writes it as a web page you can open or send. Needs no browser.
Can this site be fetched?
Opens the page with 3 fresh identities and tells you whether it works, is blocked, or the proxy is the problem.
python kryptix_sdk.py probe https://example.com --tries 3Details and options
Download kryptix_sdk.py with the “Save the SDK file” button in the Connection code tab (pip install playwright) and run this in a Command Prompt opened in that folder. It opens the page with 3 fresh identities and tells you in plain words whether it works, is blocked, or the proxy or address is the problem. Add --proxy http://user:pass@host:port to test through a proxy and --evidence to keep screenshots of failures.
Open one page and read it
Opens ONE page with a fresh identity and saves its page source (after the scripts ran) and/or tries your selectors on it. The Smart finder uses this command.
python kryptix_sdk.py peek https://shop.example.com/list --html-out page.html --rows "article.product_pod" --select "title=h3 > a@title" --rows-out rows.json
Details and options
Download kryptix_sdk.py with the “Save the SDK file” button in the Connection code tab (pip install playwright; an older copy does not know peek: replace it) and run this in a Command Prompt opened in that folder. --html-out FILE writes the page source as it stands now (UTF-8, at most 5 MB). --rows CSS and --select NAME=CSS (repeat for every field) read the page the way bulk --rows / --select reads it and print how many rows matched; --rows-out FILE writes what they found as JSON; --limit N is how many rows to read (1–20, default 5). --wait SECONDS gives late scripts time (default 6, 0 = do not wait) and --wait-for CSS waits until that element exists. --proxy, --proxy-type and --os set the identity; --timeout is the time per page operation (default 40). It prints “Opened: HTTP 200 …” on success and “ERROR: reason: text” otherwise (reasons: blocked, proxy, timeout, dns, network, http, invalid, other); the exit code is 0 on success and 1 on any error.
Do my proxies work?
Working ones are saved to proxies.good.txt in full form (it holds the passwords: keep it private); use it with bulk urls.txt --proxies proxies.good.txt.
python kryptix_sdk.py proxytest proxies.txt
Details and options
Download kryptix_sdk.py with the “Save the SDK file” button in the Connection code tab (pip install playwright), put proxies.txt next to it (one proxy per line, written like user:pass@host:port, host:port:user:pass or user:pass:host:port) and run this in a Command Prompt opened in that folder. Each proxy opens a test page (socks5 or http is found automatically); the working ones are saved to proxies.good.txt in full form (it contains the passwords: keep it private). Use that file with: bulk urls.txt --proxies proxies.good.txt. Add --max 10 to test only the first 10.