Agent-readable docs index: /docs/llms.txt. Full docs in one file: /docs/llms-full.txt. Download /docs/docs.zip to grep all markdown files locally.

Use a website as an API

A site with no API still has pages and forms. explore reads them once and makes actions you can call, with typed inputs and outputs. This page is the whole path.

1. make the actions

orsel explore https://egeuysal.com/
It prints what it made, as routes:
read_home / list_blog /blog returns titles, links, slugs read_blog_page /blog/{slug} takes slug
Reads run when you call them. Forms (sign in, contact, comments) and the site's own API are made too, as actions that wait for approval. Nothing is submitted while exploring. See concepts for what is and is not made, and why.

2. call them

orsel act egeuysal.com list_blog orsel act egeuysal.com read_blog_page --set slug=decay
act waits for the result. --set key=value is typed from the action (a slug of 2026 stays text, a limit of 5 is a number) and can be repeated; --input '{"slug":"decay"}' or piped JSON works too. Add --no-wait to get the run id back at once.
A list returns slugs: pass one to the read action next to it.

3. use it from code

import { Orsel } from 'orsel'; const orsel = new Orsel(); // ORSEL_KEY and ORSEL_URL const blog = await orsel.site('egeuysal.com', { explore: true }); const { slugs } = await blog.list_blog(); const post = await blog.read_blog_page({ slug: slugs[0] }); console.log(post.title);
from orsel import Orsel blog = Orsel().site("egeuysal.com", explore=True) post = blog.read_blog_page(slug=blog.list_blog()["slugs"][0]) print(post["title"])
One method per action. It waits for the run and returns the output. A run that does not succeed raises ActionError with the run attached and the command that explains it (orsel explain <run id>). A missing input is named before anything is sent. explore: true makes the actions first when the site has none.

4. get types

orsel typegen egeuysal.com --out src/egeuysal.ts
import type { EgeuysalComActions } from './egeuysal'; const blog = await orsel.site<EgeuysalComActions>('egeuysal.com'); blog.read_blog_page({ slug: 'decay' }); // input and output are typed
Regenerate it when the site's actions change. Each method's comment says its risk class.

writes

A form action has a risk class (write, sensitive or irreversible) and waits for approval before anything is sent, as every write does. In code the call waits for a person to decide and throws ApprovalRequiredError if nobody does in time; approve it in the dashboard or with orsel approve <id>. A password is a secret, never an input.

when it does not work

You seeBecauseDo
has no actions yetthe site was not exploredorsel explore https://<site>/, or explore: true
not made: … captchaa person has to solve ituse the site yourself, or its own API
not made: … drawn by JavaScriptthe page is empty until a script runsrecord it with orsel import (a HAR)
ActionError … http_404the page movedexplore again; it replaces what it made
rate_limitedtoo many explorations (10 an hour)wait, or call the actions you already have