44
55namespace Scrapegraphai \ServiceContracts ;
66
7+ use Scrapegraphai \Core \Exceptions \APIException ;
78use Scrapegraphai \Core \Implementation \HasRawResponse ;
89use Scrapegraphai \Crawl \CrawlGetResultsResponse ;
910use Scrapegraphai \Crawl \CrawlStartParams \Rules ;
@@ -18,12 +19,27 @@ interface CrawlContract
1819 * @api
1920 *
2021 * @return CrawlGetResultsResponse<HasRawResponse>
22+ *
23+ * @throws APIException
2124 */
2225 public function retrieveResults (
2326 string $ taskID ,
2427 ?RequestOptions $ requestOptions = null
2528 ): CrawlGetResultsResponse ;
2629
30+ /**
31+ * @api
32+ *
33+ * @return CrawlGetResultsResponse<HasRawResponse>
34+ *
35+ * @throws APIException
36+ */
37+ public function retrieveResultsRaw (
38+ string $ taskID ,
39+ mixed $ params ,
40+ ?RequestOptions $ requestOptions = null
41+ ): CrawlGetResultsResponse ;
42+
2743 /**
2844 * @api
2945 *
@@ -38,6 +54,8 @@ public function retrieveResults(
3854 * @param bool $sitemap Use sitemap for crawling
3955 *
4056 * @return CrawlStartResponse<HasRawResponse>
57+ *
58+ * @throws APIException
4159 */
4260 public function start (
4361 $ url ,
@@ -51,4 +69,18 @@ public function start(
5169 $ sitemap = omit,
5270 ?RequestOptions $ requestOptions = null ,
5371 ): CrawlStartResponse ;
72+
73+ /**
74+ * @api
75+ *
76+ * @param array<string, mixed> $params
77+ *
78+ * @return CrawlStartResponse<HasRawResponse>
79+ *
80+ * @throws APIException
81+ */
82+ public function startRaw (
83+ array $ params ,
84+ ?RequestOptions $ requestOptions = null
85+ ): CrawlStartResponse ;
5486}
0 commit comments