Skip to content

scrape_website json extraction schema + answers guidance - #20

Merged
Olostep-devs merged 2 commits into
mainfrom
scrape-json-schema
Jul 2, 2026
Merged

scrape_website json extraction schema + answers guidance#20
Olostep-devs merged 2 commits into
mainfrom
scrape-json-schema

Conversation

@Olostep-devs

Copy link
Copy Markdown
Collaborator

What

scrape_website

  • Add an llm_extract param ({ schema, prompt }) so output_format: "json" returns structured data. It maps to the scrapes API llm_extract field.
  • Guard: if json is requested without a parser or llm_extract, return a clear message instead of the backend "requires a parser or extraction schema" error.
  • Clarify the output_format docs so bare json is not picked by default.

answers

  • Scope the description to bounded factual questions with a flat object answer.
  • Steer list-style extraction (for example "the latest N posts with titles and dates") to create_map / get_webpage_content.
  • Note in the json param that flat shapes are more reliable than nested lists.

Why

output_format: "json" on scrape_website failed with "JSON requires a parser or extraction schema" because the tool never exposed a way to pass one. answers returned NOT_FOUND on list-style requests because it is built for factual answers, not enumerating a live list.

Notes

  • get_webpage_content is markdown only, no change needed.
  • Builds clean (tsc). No behavior change for existing markdown/html/text usage.

scrape_website: add llm_extract param (schema/prompt) so json output
works, guard when json is asked for without a parser or schema, and
clarify the format docs.

answers: scope the description to bounded factual questions and steer
list-style extraction to create_map / get_webpage_content.
Replace em-dashes with plain punctuation in the answers description,
refresh the description goldens for the new answers text, and bump the
package to 1.0.17.
@Olostep-devs
Olostep-devs merged commit 82dabd3 into main Jul 2, 2026
2 checks passed
@Olostep-devs
Olostep-devs deleted the scrape-json-schema branch July 2, 2026 18:24
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