Package ai.webscraping
Class Client
java.lang.Object
ai.webscraping.Client
Official Java client for the WebScraping.AI API.
Typical use:
Client client = new Client(Config.builder().apiKey("YOUR_KEY").build());
String html = client.html(HtmlOptions.builder()
.url("https://example.com")
.js(true)
.build());
All methods are synchronous. Errors are unchecked: any non-2xx response
throws a typed ApiException subclass;
transport-level failures throw
ApiTimeoutException or
ApiConnectionException.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccount()fields(FieldsOptions opts) html(HtmlOptions opts) question(QuestionOptions opts) selected(SelectedOptions opts) text(TextOptions opts)
-
Constructor Details
-
Client
-
Client
public Client()Convenience constructor reading the API key fromWEBSCRAPING_AI_API_KEY.
-
-
Method Details
-
getConfig
-
html
-
text
-
selected
-
selectedMultiple
-
question
-
fields
-
account
-