synoppy 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +20 -2
  3. data/lib/synoppy.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7519c818414f7a03095c989f2ad280cdbe92807c3bf1abaa9fdc3647cbf3970a
4
- data.tar.gz: 7db8a573fd92b05120572edee8975e9752d63427f5d7f1c3a4d72230d9fa0440
3
+ metadata.gz: 1d9a80fac3891cb8133f9cffbc7097d6160999fa7e36b39343ede041e2aa8956
4
+ data.tar.gz: e91fbe09040f73b89c4533452cd6ddfa551e15bd01d66d1ab084dc571ef3cfbd
5
5
  SHA512:
6
- metadata.gz: 6a650c618bb9a44027d52f4a9cda0635b8faf8f71d3e3a779c6cb2d6baef11bd15057ea8fba16088118b1855fc6e5535852056b14612a93976c40a2827a6ae5f
7
- data.tar.gz: d9df436ee8a53b639d9524a1b1b971e32a3faf956222d78880294584489e18037cdaef1434e49443e95c7bbbf026b4ec82987b4b5c871864512d6c5d284cd508
6
+ metadata.gz: a74f7f2ec4e4c75e90c843aa8775f8ab85f7eb89da746d00ea7e837ba114a0fa02870b2a9f99f7bc4ae555d86393adf02cef9807314f3ee11f06d0a9dfed09da
7
+ data.tar.gz: f5545ca85edaa51aa2035582528f3d03ff6388e04c7c89c61469cf09252256a026c25f7134617c97326d6c0fe1cf2a6f30b1ba9416757ca9c21b72246e7eb131
data/README.md CHANGED
@@ -98,9 +98,20 @@ m["source"] # "sitemap" | "links"
98
98
  m["domain"]
99
99
  ```
100
100
 
101
- ### `extract(url, prompt:)`
101
+ ### `search(query, ...)`
102
102
 
103
- `POST /api/extract`. AI-structured JSON extraction (requires a key). `instruction:` is accepted as an alias for `prompt:`.
103
+ `POST /api/search`. Search the live web ranked results with clean source URLs (requires a key).
104
+
105
+ ```ruby
106
+ found = client.search("best open-weight LLMs 2026", max_results: 5, markdown: true)
107
+ found["results"] # [{ "title", "url", "snippet", "markdown"? }]
108
+ found["count"]
109
+ # Also: include_domains:, exclude_domains:, fanout:
110
+ ```
111
+
112
+ ### `extract(url, prompt:, schema:)`
113
+
114
+ `POST /api/extract`. AI-structured JSON extraction (requires a key). `instruction:` is accepted as an alias for `prompt:`; pass `schema:` (a JSON Schema as a Hash) to constrain the output to that exact shape (typed output).
104
115
 
105
116
  ```ruby
106
117
  result = client.extract("https://news.ycombinator.com", prompt: "Return { title, summary, topics }")
@@ -109,6 +120,13 @@ result["model"]
109
120
  result["metadata"]
110
121
  result["truncated"]
111
122
  result["usage"] # { "inputTokens", "outputTokens" }
123
+
124
+ # Typed output — data matches the schema exactly
125
+ typed = client.extract("https://stripe.com/pricing", schema: {
126
+ type: "object",
127
+ properties: { plans: { type: "array", items: { type: "object",
128
+ properties: { name: { type: "string" }, price: { type: "string" } } } } }
129
+ })
112
130
  ```
113
131
 
114
132
  ### `classify(url, labels:)`
data/lib/synoppy.rb CHANGED
@@ -6,7 +6,7 @@ require "uri"
6
6
 
7
7
  # Official Ruby SDK for the Synoppy web-data API.
8
8
  module Synoppy
9
- VERSION = "1.1.0"
9
+ VERSION = "1.1.1"
10
10
  DEFAULT_BASE_URL = "https://synoppy.com"
11
11
 
12
12
  # Raised when the API returns an error response.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synoppy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saanora
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-23 00:00:00.000000000 Z
11
+ date: 2026-07-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Scrape, screenshot, crawl, map, extract, classify, enrich, and images
14
14
  — one key for the whole web.