decodo-sdk 2.3.1__tar.gz → 2.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. {decodo_sdk-2.3.1/src/decodo_sdk.egg-info → decodo_sdk-2.4.1}/PKG-INFO +177 -79
  2. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/README.md +176 -78
  3. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/pyproject.toml +7 -1
  4. decodo_sdk-2.4.1/src/decodo/__init__.py +116 -0
  5. decodo_sdk-2.4.1/src/decodo/api/web_scraping_api.py +229 -0
  6. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/codegen/web_scraping_api/generate_targets.py +13 -0
  7. decodo_sdk-2.4.1/src/decodo/errors.py +88 -0
  8. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/generated/decodo.ir.json +927 -1
  9. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/generated/targets.py +86 -0
  10. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/schema/bundled_schema.py +6 -1
  11. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/schema/remote_schema.py +5 -0
  12. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/schema/types.py +30 -3
  13. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/types/__init__.py +22 -0
  14. decodo_sdk-2.4.1/src/decodo/types/data_api.py +199 -0
  15. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1/src/decodo_sdk.egg-info}/PKG-INFO +177 -79
  16. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo_sdk.egg-info/SOURCES.txt +3 -0
  17. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/tests/test_client.py +29 -0
  18. decodo_sdk-2.4.1/tests/test_data_api.py +412 -0
  19. decodo_sdk-2.4.1/tests/test_generated_exports.py +41 -0
  20. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/tests/test_web_scraping_api.py +3 -0
  21. decodo_sdk-2.3.1/src/decodo/__init__.py +0 -293
  22. decodo_sdk-2.3.1/src/decodo/api/web_scraping_api.py +0 -91
  23. decodo_sdk-2.3.1/src/decodo/errors.py +0 -36
  24. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/LICENSE +0 -0
  25. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/setup.cfg +0 -0
  26. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/api/__init__.py +0 -0
  27. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/client.py +0 -0
  28. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/codegen/__init__.py +0 -0
  29. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/codegen/codegen.py +0 -0
  30. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/codegen/web_scraping_api/__init__.py +0 -0
  31. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/codegen/web_scraping_api/generate_parameters.py +0 -0
  32. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/codegen/web_scraping_api/shared.py +0 -0
  33. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/codegen/web_scraping_api/types.py +0 -0
  34. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/generated/__init__.py +0 -0
  35. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/generated/parameters.py +0 -0
  36. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/http.py +0 -0
  37. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/py.typed +0 -0
  38. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/schema/__init__.py +0 -0
  39. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/schema/build_target_meta.py +0 -0
  40. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/schema/constants.py +0 -0
  41. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/schema/expand_path.py +0 -0
  42. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/schema/resolve_latest_ir.py +0 -0
  43. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/targets.py +0 -0
  44. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/types/requests.py +0 -0
  45. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo/types/responses.py +0 -0
  46. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo_sdk.egg-info/dependency_links.txt +0 -0
  47. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo_sdk.egg-info/requires.txt +0 -0
  48. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/src/decodo_sdk.egg-info/top_level.txt +0 -0
  49. {decodo_sdk-2.3.1 → decodo_sdk-2.4.1}/tests/test_http.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: decodo-sdk
3
- Version: 2.3.1
3
+ Version: 2.4.1
4
4
  Summary: Official Python SDK for the Decodo APIs
5
5
  Author: Decodo
6
6
  License: MIT License
@@ -305,11 +305,11 @@ client = DecodoClient(
305
305
  )
306
306
  ```
307
307
 
308
- | Parameter | Description |
309
- | --- | --- |
310
- | `api_key` | Web Data API key. Recommended |
311
- | `token` | Web Scraping API basic auth token for older plans, the base64-encoded `user:password` string from the Decodo dashboard. Use it instead of `api_key` |
312
- | `timeout_ms` | Request timeout in milliseconds (default: 180000) |
308
+ | Parameter | Description |
309
+ | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
310
+ | `api_key` | Web Data API key. Recommended |
311
+ | `token` | Web Scraping API basic auth token for older plans, the base64-encoded `user:password` string from the Decodo dashboard. Use it instead of `api_key` |
312
+ | `timeout_ms` | Request timeout in milliseconds (default: 180000) |
313
313
 
314
314
  ## Web Scraping API
315
315
 
@@ -453,6 +453,116 @@ for task in batch["queries"]:
453
453
  print(result)
454
454
  ```
455
455
 
456
+ ## Data API: search, map and crawl
457
+
458
+ These endpoints are served by the Data API at `data.decodo.com` and need an `api_key`. Calling them on a client configured with a basic auth `token` raises `ValueError` saying an API key is required. They live on the same `client.web_scraping_api` namespace.
459
+
460
+ Parameters are plain dictionaries. The `SearchRequest`, `MapRequest` and `CrawlRequest` types are `TypedDict`s you can use for editor completion; they are always importable and need no code generation. Bodies are validated against the bundled schema before the request is sent, like `scrape`.
461
+
462
+ ### Search
463
+
464
+ Runs a web search and returns the parsed result document:
465
+
466
+ ```python
467
+ from decodo import DecodoClient, DecodoConfig, SearchRequest, WebScrapingApiConfig
468
+
469
+ client = DecodoClient(
470
+ DecodoConfig(
471
+ web_scraping_api=WebScrapingApiConfig(
472
+ api_key="<api_key>",
473
+ ),
474
+ )
475
+ )
476
+
477
+ result = client.web_scraping_api.search(
478
+ SearchRequest(query="coffee shops", geo="United States", page=1)
479
+ )
480
+
481
+ for item in result.get("organic", []):
482
+ print(item["rank"], item["title"], item["link"])
483
+ ```
484
+
485
+ A search that ran but could not be scraped still answers with HTTP 200 and `status: "failed"` plus a `message`, so check `result["status"]` before reading the fields.
486
+
487
+ ### Map
488
+
489
+ Discovers the links on a site, from its pages and sitemap:
490
+
491
+ ```python
492
+ from decodo import DecodoClient, DecodoConfig, MapRequest, WebScrapingApiConfig
493
+
494
+ client = DecodoClient(
495
+ DecodoConfig(
496
+ web_scraping_api=WebScrapingApiConfig(
497
+ api_key="<api_key>",
498
+ ),
499
+ )
500
+ )
501
+
502
+ result = client.web_scraping_api.map(
503
+ MapRequest(url="https://www.example.com", limit=100, sitemap="include")
504
+ )
505
+
506
+ for link in result["results"][0]["content"]["links"]:
507
+ print(link["url"])
508
+ ```
509
+
510
+ ### Crawl
511
+
512
+ `crawl` starts a crawl, waits for it to finish and returns every page with its content:
513
+
514
+ ```python
515
+ from decodo import (
516
+ CrawlError,
517
+ CrawlInterruptedError,
518
+ CrawlRequest,
519
+ CrawlTimeoutError,
520
+ DecodoClient,
521
+ DecodoConfig,
522
+ WebScrapingApiConfig,
523
+ )
524
+
525
+ client = DecodoClient(
526
+ DecodoConfig(
527
+ web_scraping_api=WebScrapingApiConfig(
528
+ api_key="<api_key>",
529
+ ),
530
+ )
531
+ )
532
+
533
+ try:
534
+ pages = client.web_scraping_api.crawl(
535
+ CrawlRequest(url="https://www.example.com", limit=20, max_depth=2),
536
+ poll_interval=5,
537
+ timeout=600,
538
+ )
539
+ except CrawlTimeoutError as err:
540
+ print(f"Still running, fetch it later with get_crawl_results({err.crawl_id!r})")
541
+ except CrawlError as err:
542
+ print(f"Crawl {err.crawl_id} ended {err.status}: {err.reason}")
543
+ else:
544
+ for page in pages:
545
+ print(page["url"], page["status"], page.get("content", "")[:80])
546
+ ```
547
+
548
+ A crawl that stops early because of `max_duration` or a vendor limit ends with status `truncated`; `crawl` returns the pages it did collect. Pages are returned as the API lists them, each with its `status` (`pending`, `done` or `faulted`) and, when the fetch failed, a `content_error` instead of `content`.
549
+
550
+ The lower-level methods let you drive a crawl yourself, for example to start it in one process and collect it in another:
551
+
552
+ ```python
553
+ started = client.web_scraping_api.start_crawl(CrawlRequest(url="https://www.example.com"))
554
+ crawl_id = started["crawl_id"]
555
+
556
+ status = client.web_scraping_api.get_crawl_status(crawl_id)
557
+ print(status["status"], status["completed"], status["in_flight"])
558
+
559
+ pages = client.web_scraping_api.get_crawl_results(crawl_id)
560
+
561
+ client.web_scraping_api.cancel_crawl(crawl_id)
562
+ ```
563
+
564
+ `get_crawl_status` returns `pending`, `done`, `faulted`, `cancelled` or `truncated`, with a `reason` when the crawl stopped early.
565
+
456
566
  ## Targets and parameter classes
457
567
 
458
568
  Every target in the `Target` enum has a matching parameter class. The name of the class is the enum member name followed by `Params`:
@@ -482,87 +592,73 @@ Each target accepts one primary input parameter (`url`, `query`, `product_id`, o
482
592
 
483
593
  ### Search engines
484
594
 
485
- | Target | Parameter class | Description | Example input |
486
- | --- | --- | --- | --- |
487
- | `Target.GoogleSearch` | `GoogleSearchParams` | Google Search results for a query | `query="coffee shops"` |
488
- | `Target.GoogleMaps` | `GoogleMapsParams` | Google Maps search results | `query="coffee shops brooklyn"` |
489
- | `Target.GoogleShoppingSearch` | `GoogleShoppingSearchParams` | Google Shopping search results | `query="laptop"` |
490
- | `Target.GoogleShoppingProduct` | `GoogleShoppingProductParams` | Google Shopping product page | `query="laptop"` |
491
- | `Target.GoogleSuggest` | `GoogleSuggestParams` | Google Autocomplete suggestions | `query="coffee"` |
492
- | `Target.GoogleLens` | `GoogleLensParams` | Google Lens reverse image search | `query="https://example.com/cat.jpg"` |
493
- | `Target.GoogleTravelHotels` | `GoogleTravelHotelsParams` | Google Travel hotel listings | `query="hotels in paris"` |
494
- | `Target.GoogleTrendsExplore` | `GoogleTrendsExploreParams` | Google Trends explore data | `query="coffee"` |
495
- | `Target.GoogleAds` | `GoogleAdsParams` | Google Ads results for a query | `query="laptop"` |
496
- | `Target.BingSearch` | `BingSearchParams` | Bing Search results | `query="electric vehicles"` |
497
- | `Target.Bing` | `BingParams` | Raw Bing URL scraping | `url="https://bing.com/search?q=laptop"` |
595
+ | Target | Parameter class | Description | Example input |
596
+ | ------------------------------ | ----------------------------- | --------------------------------- | ---------------------------------------- |
597
+ | `Target.GoogleSearch` | `GoogleSearchParams` | Google Search results for a query | `query="coffee shops"` |
598
+ | `Target.GoogleLens` | `GoogleLensParams` | Google Lens reverse image search | `query="https://example.com/cat.jpg"` |
599
+ | `Target.GoogleTravelHotels` | `GoogleTravelHotelsParams` | Google Travel hotel listings | `query="hotels in paris"` |
600
+ | `Target.GoogleAds` | `GoogleAdsParams` | Google Ads results for a query | `query="laptop"` |
601
+ | `Target.BingSearch` | `BingSearchParams` | Bing Search results | `query="electric vehicles"` |
602
+ | `Target.Bing` | `BingParams` | Raw Bing URL scraping | `url="https://bing.com/search?q=laptop"` |
498
603
 
499
604
  ### eCommerce
500
605
 
501
- | Target | Parameter class | Description | Example input |
502
- | --- | --- | --- | --- |
503
- | `Target.AmazonProduct` | `AmazonProductParams` | Amazon product detail page by ASIN | `query="B09H74FXNW"` |
504
- | `Target.AmazonSearch` | `AmazonSearchParams` | Amazon search results | `query="laptop"` |
505
- | `Target.AmazonPricing` | `AmazonPricingParams` | Amazon pricing and offers | `query="B09H74FXNW"` |
506
- | `Target.AmazonSellers` | `AmazonSellersParams` | Amazon seller listings | `query="B09H74FXNW"` |
507
- | `Target.AmazonBestsellers` | `AmazonBestsellersParams` | Amazon bestsellers by category | `query="electronics"` |
508
- | `Target.WalmartProduct` | `WalmartProductParams` | Walmart product page by product ID | `product_id="15296401808"` |
509
- | `Target.WalmartSearch` | `WalmartSearchParams` | Walmart search results | `query="laptop"` |
510
- | `Target.Walmart` | `WalmartParams` | Raw Walmart URL scraping | `url="https://walmart.com/ip/15296401808"` |
511
- | `Target.TargetProduct` | `TargetProductParams` | Target.com product page by product ID | `product_id="92186007"` |
512
- | `Target.TargetSearch` | `TargetSearchParams` | Target.com search results | `query="laptop"` |
513
- | `Target.Target` | `TargetStoreParams` | Raw Target.com URL scraping | `url="https://target.com/p/-/A-92186007"` |
514
- | `Target.LowesSearch` | `LowesSearchParams` | Lowe's search results | `query="drill"` |
515
- | `Target.Ecommerce` | `EcommerceParams` | Generic eCommerce page with parser | `url="https://example.com/product/123"` |
606
+ | Target | Parameter class | Description | Example input |
607
+ | -------------------------- | ------------------------- | ------------------------------------- | ------------------------------------------ |
608
+ | `Target.AmazonProduct` | `AmazonProductParams` | Amazon product detail page by ASIN | `query="B09H74FXNW"` |
609
+ | `Target.AmazonSearch` | `AmazonSearchParams` | Amazon search results | `query="laptop"` |
610
+ | `Target.AmazonPricing` | `AmazonPricingParams` | Amazon pricing and offers | `query="B09H74FXNW"` |
611
+ | `Target.AmazonSellers` | `AmazonSellersParams` | Amazon seller listings | `query="B09H74FXNW"` |
612
+ | `Target.AmazonBestsellers` | `AmazonBestsellersParams` | Amazon bestsellers by category | `query="electronics"` |
613
+ | `Target.WalmartProduct` | `WalmartProductParams` | Walmart product page by product ID | `product_id="15296401808"` |
614
+ | `Target.WalmartSearch` | `WalmartSearchParams` | Walmart search results | `query="laptop"` |
615
+ | `Target.Walmart` | `WalmartParams` | Raw Walmart URL scraping | `url="https://walmart.com/ip/15296401808"` |
616
+ | `Target.TargetProduct` | `TargetProductParams` | Target.com product page by product ID | `product_id="92186007"` |
617
+ | `Target.TargetSearch` | `TargetSearchParams` | Target.com search results | `query="laptop"` |
618
+ | `Target.Target` | `TargetStoreParams` | Raw Target.com URL scraping | `url="https://target.com/p/-/A-92186007"` |
516
619
 
517
620
  ### Social media
518
621
 
519
- | Target | Parameter class | Description | Example input |
520
- | --- | --- | --- | --- |
521
- | `Target.RedditPost` | `RedditPostParams` | Reddit post by URL | `url="https://reddit.com/r/nba/comments/..."` |
522
- | `Target.RedditSubreddit` | `RedditSubredditParams` | Reddit subreddit by URL | `url="https://reddit.com/r/nba/"` |
523
- | `Target.RedditUser` | `RedditUserParams` | Reddit user profile by URL | `url="https://reddit.com/user/example/"` |
524
- | `Target.YoutubeVideo` | `YoutubeVideoParams` | YouTube video by ID | `query="dFu9aKJoqGg"` |
525
- | `Target.YoutubeSearch` | `YoutubeSearchParams` | YouTube search results | `query="ambient music"` |
526
- | `Target.YoutubeSearchMax` | `YoutubeSearchMaxParams` | YouTube search results (extended) | `query="ambient music"` |
527
- | `Target.YoutubeMetadata` | `YoutubeMetadataParams` | YouTube video metadata by ID | `query="dFu9aKJoqGg"` |
528
- | `Target.YoutubeTranscript` | `YoutubeTranscriptParams` | YouTube video transcript by ID | `query="dFu9aKJoqGg"` |
529
- | `Target.YoutubeSubtitles` | `YoutubeSubtitlesParams` | YouTube video subtitles by ID | `query="dFu9aKJoqGg"` |
530
- | `Target.YoutubeChannel` | `YoutubeChannelParams` | YouTube channel by handle or ID | `query="@decodo_official"` |
531
- | `Target.TiktokPost` | `TiktokPostParams` | TikTok post by URL | `url="https://www.tiktok.com/@nba/video/..."` |
532
- | `Target.TiktokShopSearch` | `TiktokShopSearchParams` | TikTok Shop search results | `query="wireless earbuds"` |
533
- | `Target.TiktokShopProduct` | `TiktokShopProductParams` | TikTok Shop product page by product ID | `product_id="7100000000000000000"` |
534
- | `Target.Tiktok` | `TiktokParams` | Raw TikTok URL scraping | `url="https://www.tiktok.com/@nba"` |
535
- | `Target.InstagramGraphqlProfile` | `InstagramGraphqlProfileParams` | Instagram profile via GraphQL | `query="nba"` |
622
+ | Target | Parameter class | Description | Example input |
623
+ | -------------------------------- | ------------------------------- | -------------------------------------- | --------------------------------------------- |
624
+ | `Target.RedditPost` | `RedditPostParams` | Reddit post by URL | `url="https://reddit.com/r/nba/comments/..."` |
625
+ | `Target.RedditSubreddit` | `RedditSubredditParams` | Reddit subreddit by URL | `url="https://reddit.com/r/nba/"` |
626
+ | `Target.RedditUser` | `RedditUserParams` | Reddit user profile by URL | `url="https://reddit.com/user/example/"` |
627
+ | `Target.YoutubeSearch` | `YoutubeSearchParams` | YouTube search results | `query="ambient music"` |
628
+ | `Target.YoutubeMetadata` | `YoutubeMetadataParams` | YouTube video metadata by ID | `query="dFu9aKJoqGg"` |
629
+ | `Target.YoutubeSubtitles` | `YoutubeSubtitlesParams` | YouTube video subtitles by ID | `query="dFu9aKJoqGg"` |
630
+ | `Target.YoutubeChannel` | `YoutubeChannelParams` | YouTube channel by handle or ID | `query="@decodo_official"` |
631
+ | `Target.TiktokPost` | `TiktokPostParams` | TikTok post by URL | `url="https://www.tiktok.com/@nba/video/..."` |
632
+ | `Target.TiktokShopSearch` | `TiktokShopSearchParams` | TikTok Shop search results | `query="wireless earbuds"` |
633
+ | `Target.TiktokShopProduct` | `TiktokShopProductParams` | TikTok Shop product page by product ID | `product_id="7100000000000000000"` |
634
+ | `Target.Tiktok` | `TiktokParams` | Raw TikTok URL scraping | `url="https://www.tiktok.com/@nba"` |
536
635
 
537
636
  ### AI tools
538
637
 
539
- | Target | Parameter class | Description | Example input |
540
- | --- | --- | --- | --- |
541
- | `Target.Chatgpt` | `ChatgptParams` | ChatGPT response for a prompt | `prompt="What are the top three dog breeds?"` |
542
- | `Target.Perplexity` | `PerplexityParams` | Perplexity response for a prompt | `prompt="What causes seasonal allergies?"` |
543
- | `Target.Gemini` | `GeminiParams` | Gemini response for a prompt | `prompt="What are the top three dog breeds?"` |
544
- | `Target.GoogleAiMode` | `GoogleAiModeParams` | Google AI Mode response | `query="What are the top three dog breeds?"` |
638
+ | Target | Parameter class | Description | Example input |
639
+ | --------------------- | -------------------- | -------------------------------- | --------------------------------------------- |
640
+ | `Target.Chatgpt` | `ChatgptParams` | ChatGPT response for a prompt | `prompt="What are the top three dog breeds?"` |
641
+ | `Target.Perplexity` | `PerplexityParams` | Perplexity response for a prompt | `prompt="What causes seasonal allergies?"` |
642
+ | `Target.Gemini` | `GeminiParams` | Gemini response for a prompt | `prompt="What are the top three dog breeds?"` |
643
+ | `Target.GoogleAiMode` | `GoogleAiModeParams` | Google AI Mode response | `query="What are the top three dog breeds?"` |
545
644
 
546
645
  ### Other
547
646
 
548
- | Target | Parameter class | Description | Example input |
549
- | --- | --- | --- | --- |
550
- | `Target.Bbb` | `BbbParams` | Better Business Bureau listing by URL | `url="https://bbb.org/us/ny/new-york/..."` |
551
- | `Target.Autotrader` | `AutotraderParams` | Autotrader listing by URL | `url="https://autotrader.com/cars-for-sale/..."` |
552
- | `Target.Mobile` | `MobileParams` | Mobile.de listing by URL | `url="https://mobile.de/auto/..."` |
553
- | `Target.Airbnb` | `AirbnbParams` | Airbnb listing by URL | `url="https://airbnb.com/rooms/12345"` |
554
- | `Target.AppleAppStore` | `AppleAppStoreParams` | Apple App Store app by URL | `url="https://apps.apple.com/app/id12345"` |
647
+ | Target | Parameter class | Description | Example input |
648
+ | ---------------------- | --------------------- | ------------------------------------- | ------------------------------------------------ |
649
+ | `Target.Bbb` | `BbbParams` | Better Business Bureau listing by URL | `url="https://bbb.org/us/ny/new-york/..."` |
650
+ | `Target.Autotrader` | `AutotraderParams` | Autotrader listing by URL | `url="https://autotrader.com/cars-for-sale/..."` |
651
+ | `Target.Mobile` | `MobileParams` | Mobile.de listing by URL | `url="https://mobile.de/auto/..."` |
652
+ | `Target.Airbnb` | `AirbnbParams` | Airbnb listing by URL | `url="https://airbnb.com/rooms/12345"` |
653
+ | `Target.AppleAppStore` | `AppleAppStoreParams` | Apple App Store app by URL | `url="https://apps.apple.com/app/id12345"` |
555
654
 
556
655
  ### Universal scraping
557
656
 
558
- | Target | Parameter class | Description | Example input |
559
- | --- | --- | --- | --- |
560
- | `Target.Universal` | `UniversalParams` | Any URL via the universal scraper | `url="https://example.com"` |
561
- | `Target.Google` | `GoogleParams` | Raw Google URL scraping | `url="https://google.com/search?q=laptop"` |
562
- | `Target.Amazon` | `AmazonParams` | Raw Amazon URL scraping | `url="https://amazon.com/dp/B09H74FXNW"` |
563
-
564
-
565
- > `Target.UniversalEcommerce` isn't listed above because it doesn't accept a primary input parameter like `url`, `query`, `product_id`, or `prompt`. Its parameter class `UniversalEcommerceParams` only accepts optional configuration fields such as `callback_url`.
657
+ | Target | Parameter class | Description | Example input |
658
+ | ------------------ | ----------------- | --------------------------------- | ------------------------------------------ |
659
+ | `Target.Universal` | `UniversalParams` | Any URL via the universal scraper | `url="https://example.com"` |
660
+ | `Target.Google` | `GoogleParams` | Raw Google URL scraping | `url="https://google.com/search?q=laptop"` |
661
+ | `Target.Amazon` | `AmazonParams` | Raw Amazon URL scraping | `url="https://amazon.com/dp/B09H74FXNW"` |
566
662
 
567
663
  For the full target list and parameter details, see the API documentation:
568
664
 
@@ -643,13 +739,15 @@ except DecodoError as err:
643
739
 
644
740
  The `["results"]["results"]` nesting above is the shape returned when `parse=True`. Without it, `content` holds the raw page instead.
645
741
 
646
- | Error | Raised when | Useful attributes |
647
- | --- | --- | --- |
648
- | `AuthenticationError` | The API returns `401` or `403` | `status_code` |
649
- | `RateLimitError` | The API returns `429` | `status_code` |
650
- | `ValidationError` | The payload fails local schema validation, or the API returns `422` | `errors`, `status_code` |
651
- | `TimeoutError` | The request exceeds `timeout_ms` | none |
652
- | `DecodoError` | Any other unsuccessful response. Base class for the three errors above | `status_code`, `api_status` |
742
+ | Error | Raised when | Useful attributes |
743
+ | --------------------- | ------------------------------------------------------------------------------------ | ------------------------------ |
744
+ | `AuthenticationError` | The API returns `401` or `403` | `status_code` |
745
+ | `RateLimitError` | The API returns `429` | `status_code` |
746
+ | `ValidationError` | The payload fails local schema validation, or the API returns `422` | `errors`, `status_code` |
747
+ | `TimeoutError` | The request exceeds `timeout_ms` | none |
748
+ | `CrawlTimeoutError` | `crawl()` exceeds its `timeout`. Subclass of `TimeoutError`; the crawl keeps running | `crawl_id` |
749
+ | `CrawlError` | `crawl()` ends `faulted` or `cancelled`. Subclass of `DecodoError` | `crawl_id`, `status`, `reason` |
750
+ | `DecodoError` | Any other unsuccessful response. Base class for the three errors above | `status_code`, `api_status` |
653
751
 
654
752
  Two things to keep in mind:
655
753