API Reference

Complete documentation for the SentienceAPI endpoints, request parameters, and response formats

1 Endpoint

Simple, unified API for all web extraction needs

3 Modes

Reader, Map, and Visual modes for different use cases

RESTful

Standard HTTP methods, JSON payloads, and clear responses

Core Endpoint

POST/v1/observe

Observe Web Content

Universal endpoint for web content extraction and element coordinate mapping. Supports three modes: Reader (Markdown), Map (Coordinates), and Visual (Screenshot + Coordinates).

Authentication

Authorization: Bearer YOUR_API_KEY

Key Features

Extract clean Markdown from any webpage
Get pixel-perfect element coordinates
Smart filtering and element limiting
95% token savings on complex sites
Performance or Precision rendering engines
Visual mode with screenshot output

Quick Example

1curl -X POST https://api.sentienceapi.com/v1/observe \
2  -H "Authorization: Bearer YOUR_API_KEY" \
3  -H "Content-Type: application/json" \
4  -d '{
5    "url": "https://news.ycombinator.com",
6    "mode": "read"
7  }'

API Modes

Reader Mode

mode: "read"

Extract clean, formatted Markdown content from any webpage. Perfect for LLM context, content analysis, and data extraction.

Map Mode

mode: "map"

Get precise coordinates and metadata for all interactive elements. Ideal for AI agents, automation, and testing.

2-10 creditsLearn more →

Visual Mode

mode: "visual"

Capture screenshots with element coordinates overlay. Perfect for visual AI models and debugging.

10 creditsLearn more →

Advanced Features

Smart Filtering

Reduce token costs by up to 95% with intelligent element filtering. Use limit, allowed_roles, allowed_tags, and min_area to focus on what matters.

Render Quality Control

Choose between Performance (fast, 2 credits) or Precision (pixel-perfect, 10 credits) rendering engines based on your accuracy needs.

Compare engines →

Response Structure

Example Response (Map Mode)

All responses include detailed element metadata

1{
2  "engine": "performance",
3  "status": "success",
4  "interactable_elements": [
5    {
6      "id": 1,
7      "uid": "username",
8      "tag": "input",
9      "role": "textbox",
10      "text": "",
11      "selector": "input#username",
12      "bbox": { "x": 100, "y": 150, "w": 300, "h": 40 },
13      "is_visible": true,
14      "z_index": 0,
15      "attributes": {
16        "type": "text",
17        "placeholder": "Enter username",
18        "aria_label": "Username"
19      }
20    }
21  ]
22}

Error Codes

400

Bad Request

Invalid JSON or missing fields

401

Unauthorized

Invalid or missing API key

402

Payment Required

Credit limit exceeded

403

Forbidden

Account inactive

Ready to Get Started?

Explore the full API documentation with detailed examples, request parameters, and response schemas.