Skip to content

Feat/extract api - #45

Merged
adarshdigievo merged 3 commits into
masterfrom
feat/extract-api
Oct 30, 2026
Merged

adarshdigievo merged 3 commits into
masterfrom
feat/extract-api

Conversation

@adarshdigievo

@adarshdigievo adarshdigievo commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

AI disclosure

  • Model: GPT-6; Astra xhigh
  • Harness: Codex desktop.
  • Used for: implementation, documentation, test review and consolidation, live validation, and this PR draft.

Summary

Add client.extract() (and serpapi.extract()) for scraping pages, discovering URLs, and crawling websites. Both accept parameter dictionaries or keyword arguments and set engine="extract" automatically.

  • Document Markdown, JSON, and HTML output, crawl limits, and API versus HTTP timeouts.
  • Use output="md" directly for page Markdown, without a JSON restrictor.
  • Consolidate Extract unit and live coverage into one test file.
  • Handle Google's successful empty final pagination response in documentation validation while continuing to reject genuine failures.
  • Refresh the README's reverse-image URL and obtain current Immersive Product tokens from Google Shopping.
  • Add Python 3.15 to CI, release testing, and package classifiers.

No breaking changes or new runtime dependencies.

Type

  • Bug fix
  • Feature
  • Refactor / performance
  • Documentation / examples
  • Tests
  • Maintenance / packaging / CI

Related issue

None.

Affected SDK functionality

  • Package version: 1.1.2
  • Full-suite environment: Python 3.13.12, macOS 27.0.1, ARM64
  • Methods: Client.extract() and module-level serpapi.extract()
  • Endpoint: /search, with engine="extract"
  • CI matrix: Python 3.8–3.15

Testing

  • AI-executed testing:
    • Latest full pytest suite with live documentation checks enabled: 196 passed, 0 failed.
    • Includes all nine Extract cases and all live documentation examples, including README and Client Usage pagination.
    • Sphinx HTML and EPUB builds passed; uv build produced the wheel and source distribution.
  • CI: Not run for this commit; the full version matrix remains unverified.

Copilot AI balanced review requested due to automatic review settings October 15, 2026 10:05

This comment was marked as outdated.

Document direct Markdown output and current JSON fields, and consolidate
Extract coverage into one test file. Correct the documentation validator
for successful empty Google pagination responses and refresh examples.

Co-authored-by: Codex <codex@openai.com>

Copilot AI 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.

🟢 Approval recommended

No active review issues block approval of the Extract API additions and related documentation and compatibility updates.

No open issues 🎉

Review effort: Balanced

@strzibny strzibny 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.

LGTM. I haven't found any blockers. One small suggestion could be to use sentence case for titles since we are adopting it across the official SerpApi text and materials.

@adarshdigievo

Copy link
Copy Markdown
Member Author

Thanks @strzibny

Will fix the sentence casing when I merge #44 (currently working on it locally)

@adarshdigievo
adarshdigievo merged commit 7f2dec3 into master Oct 30, 2026
9 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.

3 participants