Skip to content

fix: align SDK types with actual API responses#7

Merged
VinciGit00 merged 2 commits intomainfrom
fix/align-types-with-api-docs
Feb 17, 2026
Merged

fix: align SDK types with actual API responses#7
VinciGit00 merged 2 commits intomainfrom
fix/align-types-with-api-docs

Conversation

@FrancescoSaverioZuppichini
Copy link
Member

Summary

  • Verified all SDK types against live API responses (curl + integration tests)
  • ScrapeResponse: fixed request_idscrape_request_id, added metadata field
  • SearchScraperResponse: added markdown_content, num_results fields
  • SmartScraperParams: added mock, steps, wait_ms, country_code
  • SearchScraperParams: added time_range, location_geo_code, mock
  • MarkdownifyParams: added mock, wait_ms, country_code
  • CrawlParams: added breadth, batch_size, headers, wait_ms, cache_website, same_domain_only, number_of_scrolls, website_html
  • SitemapParams: added headers, mock, stealth
  • ScrapeParams: added wait_ms
  • AgenticScraperParams: steps is now required (matches API docs)
  • Updated test mocks to match real API response shapes
  • Updated README with all new parameters
  • Added integration_test.ts for live API validation (bun run test:integration)
  • Scoped bun test to tests/ dir so integration test doesn't auto-run

Test plan

  • tsc --noEmit passes
  • biome check . passes
  • 21 unit tests pass
  • Integration test verified against live API (all 7 endpoints)

🤖 Generated with Claude Code

Verified all types against live API responses via curl.
Key fixes:
- ScrapeResponse: request_id → scrape_request_id, added metadata field
- SearchScraperResponse: added markdown_content, num_results fields
- SmartScraperParams: added mock, steps, wait_ms, country_code
- SearchScraperParams: added time_range, location_geo_code, mock
- MarkdownifyParams: added mock, wait_ms, country_code
- CrawlParams: added breadth, batch_size, headers, wait_ms, cache_website, same_domain_only, number_of_scrolls, website_html
- SitemapParams: added headers, mock, stealth
- ScrapeParams: added wait_ms
- AgenticScraperParams: steps is now required
- Updated test mocks to match real API response shapes
- Updated README with all new parameters
- Added integration_test.ts for live API validation
- Scoped bun test to tests/ directory

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@FrancescoSaverioZuppichini FrancescoSaverioZuppichini marked this pull request as draft February 17, 2026 12:27
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@FrancescoSaverioZuppichini FrancescoSaverioZuppichini marked this pull request as ready for review February 17, 2026 13:15
@VinciGit00 VinciGit00 merged commit 54c47ca into main Feb 17, 2026
3 checks passed
@VinciGit00 VinciGit00 deleted the fix/align-types-with-api-docs branch February 17, 2026 13:18
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