@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api WebScraping.AI
@base https://api.webscraping.ai
@version 3.2.0
@auth ApiKey api_key in query
@endpoints 7
@toc ai(2), html(1), text(1), selected(1), selected-multiple(1), account(1)

@group ai
@endpoint GET /ai/question
@required {url: str}
@optional {question: str, headers: map, timeout: int=10000, js: bool=true, js_timeout: int=2000, wait_for: str, proxy: str(datacenter/residential)=datacenter, country: str(us/gb/de/it/fr/ca/es/ru/jp/kr/in/hk/tr)=us, custom_proxy: str, device: str(desktop/mobile/tablet)=desktop, error_on_404: bool=false, error_on_redirect: bool=false, js_script: str, format: str(json/text)=json}
@returns(200)
@errors {400, 402, 403, 429, 500, 504}

@endpoint GET /ai/fields
@required {url: str, fields: map}
@optional {headers: map, timeout: int=10000, js: bool=true, js_timeout: int=2000, wait_for: str, proxy: str(datacenter/residential)=datacenter, country: str(us/gb/de/it/fr/ca/es/ru/jp/kr/in/hk/tr)=us, custom_proxy: str, device: str(desktop/mobile/tablet)=desktop, error_on_404: bool=false, error_on_redirect: bool=false, js_script: str}
@returns(200)
@errors {400, 402, 403, 429, 500, 504}

@endgroup

@group html
@endpoint GET /html
@required {url: str}
@optional {headers: map, timeout: int=10000, js: bool=true, js_timeout: int=2000, wait_for: str, proxy: str(datacenter/residential)=datacenter, country: str(us/gb/de/it/fr/ca/es/ru/jp/kr/in/hk/tr)=us, custom_proxy: str, device: str(desktop/mobile/tablet)=desktop, error_on_404: bool=false, error_on_redirect: bool=false, js_script: str, return_script_result: bool=false, format: str(json/text)=json}
@returns(200)
@errors {400, 402, 403, 429, 500, 504}

@endgroup

@group text
@endpoint GET /text
@required {url: str}
@optional {text_format: str(plain/xml/json)=plain, return_links: bool=false, headers: map, timeout: int=10000, js: bool=true, js_timeout: int=2000, wait_for: str, proxy: str(datacenter/residential)=datacenter, country: str(us/gb/de/it/fr/ca/es/ru/jp/kr/in/hk/tr)=us, custom_proxy: str, device: str(desktop/mobile/tablet)=desktop, error_on_404: bool=false, error_on_redirect: bool=false, js_script: str}
@returns(200)
@errors {400, 402, 403, 429, 500, 504}

@endgroup

@group selected
@endpoint GET /selected
@required {url: str}
@optional {selector: str, headers: map, timeout: int=10000, js: bool=true, js_timeout: int=2000, wait_for: str, proxy: str(datacenter/residential)=datacenter, country: str(us/gb/de/it/fr/ca/es/ru/jp/kr/in/hk/tr)=us, custom_proxy: str, device: str(desktop/mobile/tablet)=desktop, error_on_404: bool=false, error_on_redirect: bool=false, js_script: str, format: str(json/text)=json}
@returns(200)
@errors {400, 402, 403, 429, 500, 504}

@endgroup

@group selected-multiple
@endpoint GET /selected-multiple
@required {url: str}
@optional {selectors: [str], headers: map, timeout: int=10000, js: bool=true, js_timeout: int=2000, wait_for: str, proxy: str(datacenter/residential)=datacenter, country: str(us/gb/de/it/fr/ca/es/ru/jp/kr/in/hk/tr)=us, custom_proxy: str, device: str(desktop/mobile/tablet)=desktop, error_on_404: bool=false, error_on_redirect: bool=false, js_script: str}
@returns(200)
@errors {400, 402, 403, 429, 500, 504}

@endgroup

@group account
@endpoint GET /account
@returns(200) {email: str, remaining_api_calls: int, resets_at: int, remaining_concurrency: int}
@errors {403}

@endgroup

@end
