hydrafetch 0.3.0 → 0.4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d895f580349c33641dc5f853c8d4c0ee46fa54bf55cf7edcb50093e47997bdf5
4
- data.tar.gz: 10d8ea933dbd6c8091a616780711e248881c7ba6a83cff3eda0de11d1b122cfd
3
+ metadata.gz: f5a61cb3f085942a425d49d332d90facc8f698128393e6857fe9f9b50a200f35
4
+ data.tar.gz: 1332a661781e5859b3a2783c64b7fced6154e64222a189073d5f28be7601ccbc
5
5
  SHA512:
6
- metadata.gz: b30cee276a93de1f569d53daa0fb039d6fc68d1804b680e31f7f29a76dc7b16ab206527aa10d68eda922c5eb48e526d825d6f6931986d1195bdadece5e46fc70
7
- data.tar.gz: bac4bf2d4499fc4773bccfe2d59f7441f3f1f38cce49af9bfa971f806638b3d55db97297097a9081b7699f3f3c430f3f839f88a25a88d208ec9bc88f672ae656
6
+ metadata.gz: 24a54e965440320001b8c4cdc9708a8a913b00ed59b3cc0de04a008920ad1a659910601d720788ce0e9bd67019b205c28ecdeb172f9fb7b35b15ec5410a48f77
7
+ data.tar.gz: e18d9fb8acfcffc52f24c16f69be82c1293fb2e704c0342a442560e5955d40e788433beb6efaeb4ca103db357c5958e1ed919388c30444a9a3bc3f5a4ca8a6a3
data/README.md CHANGED
@@ -120,6 +120,24 @@ res["results"].each do |r|
120
120
  end
121
121
  ```
122
122
 
123
+ ## Jobs
124
+
125
+ Search open jobs collected from company career sites and hiring platforms, by the words in the job title:
126
+
127
+ ```ruby
128
+ jobs = hf.search_jobs("data engineer", location: "Berlin", postedWithinDays: 14, limit: 20)
129
+ jobs.each { |job| puts "#{job["title"]} #{job["domain"]} #{job["url"]}" }
130
+ ```
131
+
132
+ See what changed in a company's hiring since a date: what is open now, what opened and what closed, by department, seniority and location, with the jobs themselves:
133
+
134
+ ```ruby
135
+ acme = hf.hiring_changes("acme.com", "2026-10-01").first
136
+ puts acme["totals"] # {"open"=>42, "opened"=>6, "closed"=>3}
137
+ ```
138
+
139
+ A search costs 1 credit per 10 jobs returned, and an empty one is free. Hiring changes cost 1 credit per company we have jobs for; companies we do not track yet come back empty and are free.
140
+
123
141
  ## Brand data
124
142
 
125
143
  ```ruby
@@ -195,6 +213,8 @@ hf = Hydrafetch::Client.new("hf_...",
195
213
  | `markdown(url, **options)` | `String` | 1 |
196
214
  | `map(url, **options)` | links hash | 1 |
197
215
  | `search(query, **options)` | results hash | 1 + 1 per scraped result |
216
+ | `search_jobs(query, **options)` | array of jobs | 1 per 10 jobs |
217
+ | `hiring_changes(domains, since, **options)` | array of companies | 1 per company with jobs |
198
218
  | `extract(urls, **options)` | hash with `"results"` | 5 per URL |
199
219
  | `brand(domain)` | brand hash | 5 |
200
220
  | `logo(domain, **options)` | logo hash | 1 |
@@ -1,5 +1,6 @@
1
1
  require "json"
2
2
  require "net/http"
3
+ require "time"
3
4
  require "uri"
4
5
 
5
6
  require_relative "errors"
@@ -54,6 +55,16 @@ module Hydrafetch
54
55
  post("/v1/web/search", { query: query }.merge(compact(options)))
55
56
  end
56
57
 
58
+ def search_jobs(query, **options)
59
+ post("/v1/web/index/jobs/search", { query: query }.merge(compact(options)))
60
+ end
61
+
62
+ def hiring_changes(domains, since, **options)
63
+ list = domains.is_a?(String) ? [domains] : domains.to_a
64
+ at = since.respond_to?(:iso8601) ? since.iso8601 : since
65
+ post("/v1/web/index/jobs/changes", { domains: list, since: at }.merge(compact(options)))
66
+ end
67
+
57
68
  def extract(urls, **options)
58
69
  list = urls.is_a?(String) ? [urls] : urls.to_a
59
70
  post("/v1/web/extract", { urls: list }.merge(compact(options)))
@@ -1,3 +1,3 @@
1
1
  module Hydrafetch
2
- VERSION = "0.3.0".freeze
2
+ VERSION = "0.4.1".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydrafetch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hydrafetch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-21 00:00:00.000000000 Z
11
+ date: 2026-11-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Turn any URL into clean Markdown and structured data. Scrape, map, search,
14
14
  extract, brand and bulk crawl through one API.