Repository navigation
Add deepcrawl max_pages, path rules and JSON format, release 0.6.0 - #6
Merged
Merged
Conversation
Sync the OpenAPI snapshot with the live contract (adds max_pages, include_paths, exclude_paths and format to POST /deepcrawl and the stats/failed/resultUrl/pages fields to the status response) and accept the new fields as keyword arguments on start_deepcrawl and deepcrawl in the sync and async clients. Unset arguments are not sent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
openapi/search1api.openapi.jsonbyte-for-byte with the current public contract (semantically identical tohttps://api.search1api.com/openapi.jsonas of 2026-11-05). For deepcrawl this addsmax_pages,include_paths,exclude_pathsandformattoPOST /deepcrawlandformat,stats,failed,resultUrl,pagesto the status response. The sync also brings in contract changes made since 0.5.0 that this PR does not model in the SDK types: X (search_service: "x") result metadata fields,failureCategory/upstreamStatuson/crawland/extracterrors, and 404/410 responses on those endpoints.start_deepcrawlanddeepcrawlonSearch1APIandAsyncSearch1APItake new keyword arguments:max_pages: Optional[int],include_paths: Optional[List[str]],exclude_paths: Optional[List[str]],format: Optional[DeepcrawlFormat](Literal["zip", "json"]). Only arguments that are set go into the request body. Existing calls send the same body as before.DeepcrawlStatusResponseaddsformat,stats(DeepcrawlStats:discovered,matched,skipped,crawled,failed),failed(List[DeepcrawlFailedPage]:url,error),resultUrl(Optional[str]) andpages(List[DeepcrawlPage]:url,title: Optional[str],content).max_pages, and aformat="json"example readingresult["pages"]. CHANGELOG 0.6.0 (2026-11-05), version bump inpyproject.tomland__version__.Billing is unchanged: 20 credits per task.
How tested
The CI steps, run locally on Python 3.9.24 and 3.12.3:
New tests use
httpx.MockTransport(no live API calls): syncdeepcrawlwith all new arguments and aformat="json"completion, syncstart_deepcrawlsending only set fields, and asyncdeepcrawlwith the same arguments.After release
v0.6.0GitHub Release is published after merge; the release workflow checks the tag againstpyproject.toml.pip install search1api==0.6.0, then one realclient.deepcrawl(url, max_pages=5, include_paths=["/docs"], format="json")call: confirm the request is accepted,result["pages"]holds at most 5 pages under/docs, andresult["stats"]is present.🤖 Generated with Claude Code