Skip to content

Add /extract/batch path for batch URL extraction#39

Merged
karust merged 5 commits into
karust:mainfrom
AIWintermuteAI:main
Jul 18, 2026
Merged

Add /extract/batch path for batch URL extraction#39
karust merged 5 commits into
karust:mainfrom
AIWintermuteAI:main

Conversation

@AIWintermuteAI

Copy link
Copy Markdown
Contributor

Summary

I was testing for various search engines / content extractors for Open WebUI / Hermes and OpenSERP worked the best! However I found out that for content extraction, OpenWebUI has a different format for request
https://github.com/open-webui/open-webui/blob/main/backend/open_webui/retrieval/loaders/external_web.py

I added /extract/batch endpoint and tested with OpenWebUI, works beautifully. However, it can also be used simply when needed a method for batched data extraction.

NOTE: I used agentic coding to make the changes, as I am myself not proficient in Go (mainly use Python/C++). I made sure to review the changes myself to the possible extend and roast the agent to remove all possible unnecessary changes and conform to original style. PR description above is typed manually.

Testing

  • make testPASS (go test -race -count=1 github. all packages pass via Docker)
  • make lintPASS (go vet github. clean, golangci-lint clean, both via Docker)
  • make test-integrationSKIP (no browser/proxy/captcha/live-engine changes)

Checklist

  • I linked the related issue or explained why there is none.
    No related issue — this adds a new POST /extract/batch endpoint for multi-URL extraction.

  • I updated docs or examples for changed user-facing behavior.
    Updated openapi.yaml with the new /extract/batch endpoint, BatchExtractRequest, and BatchExtractItem schemas.

  • I kept unit tests deterministic and free of browser/network dependencies.
    All batch tests use httptest.NewServer (local in-process HTTP server) — no external network or browser required. Runs in <100ms.

  • I removed secrets, proxy credentials, and private logs from examples.
    No secrets or credentials in any added code, tests, or docs.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e430584324

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread core/server_extract.go
Comment thread core/server_extract.go
@karust

karust commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Thanks fot the PR!
Indeed, batch extraction was an overlooked feature and Open WebUI compatibility is a nice bonus.

I pushed two small fixes to your branch to get CI green: quoted description in openapi.yaml (broke YAML parsing), and exempted /extract/batch from the global request timeout.

A few minor things I'll handle myself after merge (per-URL errors for invalid URLs, parameter parity with /extract).

@karust
karust merged commit 01223e3 into karust:main Jul 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants