@@ -30,7 +30,7 @@ export function scrapegraphai(config: ClientConfig) {
3030 async scrape ( url : string , scrapeOptions ?: ApiScrapeOptions , requestOptions ?: RequestOptions ) {
3131 return request (
3232 "POST" ,
33- buildUrl ( "/v2/scrape" ) ,
33+ buildUrl ( "/api/ v2/scrape" ) ,
3434 key ,
3535 { url, ...scrapeOptions } ,
3636 mergeRequestOptions ( requestOptions ) ,
@@ -46,7 +46,7 @@ export function scrapegraphai(config: ClientConfig) {
4646 if ( extractOptions . fetchConfig ) body . fetchConfig = extractOptions . fetchConfig ;
4747 return request (
4848 "POST" ,
49- buildUrl ( "/v2/extract" ) ,
49+ buildUrl ( "/api/ v2/extract" ) ,
5050 key ,
5151 body ,
5252 mergeRequestOptions ( requestOptions ) ,
@@ -56,7 +56,7 @@ export function scrapegraphai(config: ClientConfig) {
5656 async search ( query : string , searchOptions ?: ApiSearchOptions , requestOptions ?: RequestOptions ) {
5757 return request (
5858 "POST" ,
59- buildUrl ( "/v2/search" ) ,
59+ buildUrl ( "/api/ v2/search" ) ,
6060 key ,
6161 { query, ...searchOptions } ,
6262 mergeRequestOptions ( requestOptions ) ,
@@ -66,7 +66,7 @@ export function scrapegraphai(config: ClientConfig) {
6666 async credits ( requestOptions ?: RequestOptions ) {
6767 return request (
6868 "GET" ,
69- buildUrl ( "/v2/credits" ) ,
69+ buildUrl ( "/api/ v2/credits" ) ,
7070 key ,
7171 undefined ,
7272 mergeRequestOptions ( requestOptions ) ,
@@ -81,7 +81,7 @@ export function scrapegraphai(config: ClientConfig) {
8181 const query = qs . toString ( ) ;
8282 return request (
8383 "GET" ,
84- buildUrl ( `/v2/history${ query ? `?${ query } ` : "" } ` ) ,
84+ buildUrl ( `/api/ v2/history${ query ? `?${ query } ` : "" } ` ) ,
8585 key ,
8686 undefined ,
8787 mergeRequestOptions ( requestOptions ) ,
@@ -92,7 +92,7 @@ export function scrapegraphai(config: ClientConfig) {
9292 async start ( url : string , crawlOptions ?: ApiCrawlOptions , requestOptions ?: RequestOptions ) {
9393 return request (
9494 "POST" ,
95- buildUrl ( "/v2/crawl" ) ,
95+ buildUrl ( "/api/ v2/crawl" ) ,
9696 key ,
9797 { url, ...crawlOptions } ,
9898 mergeRequestOptions ( requestOptions ) ,
@@ -102,7 +102,7 @@ export function scrapegraphai(config: ClientConfig) {
102102 async status ( id : string , requestOptions ?: RequestOptions ) {
103103 return request (
104104 "GET" ,
105- buildUrl ( `/v2/crawl/${ id } ` ) ,
105+ buildUrl ( `/api/ v2/crawl/${ id } ` ) ,
106106 key ,
107107 undefined ,
108108 mergeRequestOptions ( requestOptions ) ,
@@ -112,7 +112,7 @@ export function scrapegraphai(config: ClientConfig) {
112112 async stop ( id : string , requestOptions ?: RequestOptions ) {
113113 return request (
114114 "POST" ,
115- buildUrl ( `/v2/crawl/${ id } /stop` ) ,
115+ buildUrl ( `/api/ v2/crawl/${ id } /stop` ) ,
116116 key ,
117117 { } ,
118118 mergeRequestOptions ( requestOptions ) ,
@@ -122,7 +122,7 @@ export function scrapegraphai(config: ClientConfig) {
122122 async resume ( id : string , requestOptions ?: RequestOptions ) {
123123 return request (
124124 "POST" ,
125- buildUrl ( `/v2/crawl/${ id } /resume` ) ,
125+ buildUrl ( `/api/ v2/crawl/${ id } /resume` ) ,
126126 key ,
127127 { } ,
128128 mergeRequestOptions ( requestOptions ) ,
@@ -134,7 +134,7 @@ export function scrapegraphai(config: ClientConfig) {
134134 async create ( monitorCreateInput : ApiMonitorCreateInput , requestOptions ?: RequestOptions ) {
135135 return request (
136136 "POST" ,
137- buildUrl ( "/v2/monitor" ) ,
137+ buildUrl ( "/api/ v2/monitor" ) ,
138138 key ,
139139 { ...monitorCreateInput } ,
140140 mergeRequestOptions ( requestOptions ) ,
@@ -144,7 +144,7 @@ export function scrapegraphai(config: ClientConfig) {
144144 async list ( requestOptions ?: RequestOptions ) {
145145 return request (
146146 "GET" ,
147- buildUrl ( "/v2/monitor" ) ,
147+ buildUrl ( "/api/ v2/monitor" ) ,
148148 key ,
149149 undefined ,
150150 mergeRequestOptions ( requestOptions ) ,
@@ -154,7 +154,7 @@ export function scrapegraphai(config: ClientConfig) {
154154 async get ( id : string , requestOptions ?: RequestOptions ) {
155155 return request (
156156 "GET" ,
157- buildUrl ( `/v2/monitor/${ id } ` ) ,
157+ buildUrl ( `/api/ v2/monitor/${ id } ` ) ,
158158 key ,
159159 undefined ,
160160 mergeRequestOptions ( requestOptions ) ,
@@ -164,7 +164,7 @@ export function scrapegraphai(config: ClientConfig) {
164164 async pause ( id : string , requestOptions ?: RequestOptions ) {
165165 return request (
166166 "POST" ,
167- buildUrl ( `/v2/monitor/${ id } /pause` ) ,
167+ buildUrl ( `/api/ v2/monitor/${ id } /pause` ) ,
168168 key ,
169169 { } ,
170170 mergeRequestOptions ( requestOptions ) ,
@@ -174,7 +174,7 @@ export function scrapegraphai(config: ClientConfig) {
174174 async resume ( id : string , requestOptions ?: RequestOptions ) {
175175 return request (
176176 "POST" ,
177- buildUrl ( `/v2/monitor/${ id } /resume` ) ,
177+ buildUrl ( `/api/ v2/monitor/${ id } /resume` ) ,
178178 key ,
179179 { } ,
180180 mergeRequestOptions ( requestOptions ) ,
@@ -184,7 +184,7 @@ export function scrapegraphai(config: ClientConfig) {
184184 async delete ( id : string , requestOptions ?: RequestOptions ) {
185185 return request (
186186 "DELETE" ,
187- buildUrl ( `/v2/monitor/${ id } ` ) ,
187+ buildUrl ( `/api/ v2/monitor/${ id } ` ) ,
188188 key ,
189189 undefined ,
190190 mergeRequestOptions ( requestOptions ) ,
0 commit comments