@@ -7,10 +7,10 @@ if start.nil?
77end
88stop = lines.find_index do |line|
99 next false if line.lstrip.start_with?('//')
10- line.match?(/\bassert(True|NotNull)\s*\(/)
10+ line. match?(/\bassert(True|NotNull)\s*\(/)
1111end
1212if stop.nil?
13- raise "No assertTrue/assertNotNull found in #{path}"
13+ raise "No assertTrue/assertNotNull found in #{path}. "
1414end
1515slice = lines[start..stop-1]
1616slice << "System.out.println(results.toString());"
@@ -50,7 +50,7 @@ dependencies {
5050To list all available versions:
5151https://jitpack.io/api/builds/com.github.serpapi/serpapi-java
5252
53- or you can download the jar file from https://github.com/serpapi/serpapi-java/releases
53+ Or you can download the JAR file from https://github.com/serpapi/serpapi-java/releases
5454
5555Note: JitPack builds Maven artifacts from GitHub releases and tags.
5656
@@ -80,7 +80,7 @@ class App {
8080 auth.put("api_key", apiKey);
8181
8282 // create client
83- SerpApi serpapi= new SerpApi(auth);
83+ SerpApi serpapi = new SerpApi(auth);
8484
8585 // create search parameters
8686 Map< String , String > parameter = new HashMap< > ();
@@ -159,7 +159,7 @@ Retrieve the same search from the archive:
159159// now search in the archive
160160String id = results.getAsJsonObject("search_metadata").getAsJsonPrimitive("id").getAsString();
161161
162- // retrieve search from the archive with speed for free
162+ //Retrieve search from the archive quickly and for free
163163JsonObject archive = serpapi.searchArchive(id);
164164System.out.println(archive.toString());
165165```
@@ -177,7 +177,7 @@ SerpApi serpapi = new SerpApi(parameter);
177177JsonObject account = serpapi.account();
178178System.out.println(account.toString());
179179```
180- it prints your account information.
180+ It prints your account information.
181181
182182[AccountApiTest.java](https://github.com/serpapi/serpapi-java/blob/master/src/test/java/serpapi/AccountApiTest.java)
183183
@@ -193,65 +193,65 @@ Map<String, String> parameter = new HashMap<>();
193193parameter.put("q", "coffee");
194194System.out.println(serpapi.markdown(parameter));
195195```
196- it prints the results as raw markdown , intended for LLM and agent consumption.
196+ It prints the results as raw Markdown , intended for LLM and agent consumption.
197197
198198[MarkdownApiTest.java](https://github.com/serpapi/serpapi-java/blob/master/src/test/java/serpapi/MarkdownApiTest.java)
199199
200200## Examples in Java
201201
202- ### Search bing
202+ ### Search Bing
203203<%= snippet ( 'java' , 'src/test/java/serpapi/example/BingTest.java' ) %>
204204see: [https://serpapi.com/bing-search-api](https://serpapi.com/bing-search-api)
205205
206- ### Search baidu
206+ ### Search Baidu
207207<%= snippet ( 'java' , 'src/test/java/serpapi/example/BaiduTest.java' ) %>
208208see: [https://serpapi.com/baidu-search-api](https://serpapi.com/baidu-search-api)
209209
210- ### Search yahoo
210+ ### Search Yahoo
211211<%= snippet ( 'java' , 'src/test/java/serpapi/example/YahooTest.java' ) %>
212212see: [https://serpapi.com/yahoo-search-api](https://serpapi.com/yahoo-search-api)
213213
214- ### Search youtube
214+ ### Search YouTube
215215<%= snippet ( 'java' , 'src/test/java/serpapi/example/YoutubeTest.java' ) %>
216216see: [https://serpapi.com/youtube-search-api](https://serpapi.com/youtube-search-api)
217217
218- ### Search walmart
218+ ### Search Walmart
219219<%= snippet ( 'java' , 'src/test/java/serpapi/example/WalmartTest.java' ) %>
220220see: [https://serpapi.com/walmart-search-api](https://serpapi.com/walmart-search-api)
221221
222- ### Search ebay
222+ ### Search eBay
223223<%= snippet ( 'java' , 'src/test/java/serpapi/example/EbayTest.java' ) %>
224224see: [https://serpapi.com/ebay-search-api](https://serpapi.com/ebay-search-api)
225225
226- ### Search naver
226+ ### Search Naver
227227<%= snippet ( 'java' , 'src/test/java/serpapi/example/NaverTest.java' ) %>
228228see: [https://serpapi.com/naver-search-api](https://serpapi.com/naver-search-api)
229229
230- ### Search home depot
230+ ### Search Home Depot
231231<%= snippet ( 'java' , 'src/test/java/serpapi/example/HomeDepotTest.java' ) %>
232232see: [https://serpapi.com/home-depot-search-api](https://serpapi.com/home-depot-search-api)
233233
234- ### Search apple app store
234+ ### Search Apple App Store
235235<%= snippet ( 'java' , 'src/test/java/serpapi/example/AppleAppStoreTest.java' ) %>
236236see: [https://serpapi.com/apple-app-store](https://serpapi.com/apple-app-store)
237237
238- ### Search duckduckgo
238+ ### Search DuckDuckGo
239239<%= snippet ( 'java' , 'src/test/java/serpapi/example/DuckduckgoTest.java' ) %>
240240see: [https://serpapi.com/duckduckgo-search-api](https://serpapi.com/duckduckgo-search-api)
241241
242- ### Search google
242+ ### Search Google
243243<%= snippet ( 'java' , 'src/test/java/serpapi/example/GoogleTest.java' ) %>
244244see: [https://serpapi.com/search-api](https://serpapi.com/search-api)
245245
246- ### Search google scholar
246+ ### Search Google Scholar
247247<%= snippet ( 'java' , 'src/test/java/serpapi/example/GoogleScholarTest.java' ) %>
248248see: [https://serpapi.com/google-scholar-api](https://serpapi.com/google-scholar-api)
249249
250- ### Search google autocomplete
250+ ### Search Google autocomplete
251251<%= snippet ( 'java' , 'src/test/java/serpapi/example/GoogleAutocompleteTest.java' ) %>
252252see: [https://serpapi.com/google-autocomplete-api](https://serpapi.com/google-autocomplete-api)
253253
254- ### Search google product
254+ ### Search Google product
255255```java
256256// setup serpapi client
257257Map< String , String > auth = new HashMap< > ();
@@ -267,31 +267,31 @@ JsonObject results = client.search(parameter);
267267System.out.println(results.toString());
268268```
269269
270- * source code: [src/test/java/serpapi/example/GoogleProductTest.java](https://github.com/serpapi/serpapi-java/blob/master/src/test/java/serpapi/example/GoogleProductTest.java)
270+ * Source code: [src/test/java/serpapi/example/GoogleProductTest.java](https://github.com/serpapi/serpapi-java/blob/master/src/test/java/serpapi/example/GoogleProductTest.java)
271271
272272see: [https://serpapi.com/google-product-api](https://serpapi.com/google-product-api)
273273
274- ### Search google reverse image
274+ ### Search Google reverse image
275275<%= snippet ( 'java' , 'src/test/java/serpapi/example/GoogleReverseImageTest.java' ) %>
276276see: [https://serpapi.com/google-reverse-image](https://serpapi.com/google-reverse-image)
277277
278- ### Search google events
278+ ### Search Google events
279279<%= snippet ( 'java' , 'src/test/java/serpapi/example/GoogleEventsTest.java' ) %>
280280see: [https://serpapi.com/google-events-api](https://serpapi.com/google-events-api)
281281
282- ### Search google maps
282+ ### Search Google Maps
283283<%= snippet ( 'java' , 'src/test/java/serpapi/example/GoogleMapsTest.java' ) %>
284284see: [https://serpapi.com/google-maps-api](https://serpapi.com/google-maps-api)
285285
286- ### Search google jobs
286+ ### Search Google jobs
287287<%= snippet ( 'java' , 'src/test/java/serpapi/example/GoogleJobsTest.java' ) %>
288288see: [https://serpapi.com/google-jobs-api](https://serpapi.com/google-jobs-api)
289289
290- ### Search google play
290+ ### Search Google Play
291291<%= snippet ( 'java' , 'src/test/java/serpapi/example/GooglePlayTest.java' ) %>
292292see: [https://serpapi.com/google-play-api](https://serpapi.com/google-play-api)
293293
294- ### Search google images
294+ ### Search Google Images
295295<%= snippet ( 'java' , 'src/test/java/serpapi/example/GoogleImagesTest.java' ) %>
296296see: [https://serpapi.com/images-results](https://serpapi.com/images-results)
297297
@@ -375,7 +375,7 @@ Build (use the wrapper):
375375./gradlew build
376376```
377377
378- The main library JAR is under `build/libs/` (for example `serpapi-1.1.0.jar`, name follows `version` in `build.gradle`). Copy it into your project’s `lib/` directory if you are not using Maven/Gradle dependency resolution.
378+ The main library JAR is under `build/libs/` (for example, `serpapi-1.1.0.jar`; the name follows `version` in `build.gradle`). Copy it into your project’s `lib/` directory if you are not using Maven/Gradle dependency resolution.
379379
380380## TLS / HTTPS and older JVMs
381381### Symptom
@@ -388,7 +388,7 @@ SerpApi is served over **HTTPS (TLS)**. Very old JRE/JDK builds may lack the TLS
388388
389389### Solution
390390
391- Use a **current JDK** (this project is tested on **JDK 21**). On macOS you can select an installed JDK, for example:
391+ Use a **current JDK** (this project is tested on **JDK 21**). On macOS, you can select an installed JDK, for example:
392392
393393```sh
394394/usr/libexec/java_home -V
@@ -406,7 +406,7 @@ On Windows, install a current JDK from your vendor and point `JAVA_HOME` at it.
406406MIT license
407407
408408## Changelog
409- - 1.2.0 — Add markdown support, improve error handling if corrupt data received
409+ - 1.2.0 — Add Markdown support, improve error handling if corrupt data is received
410410- 1.1.0 — Java 21, Gradle 8.x; ongoing API and example updates
411411- 1.0.0 — Revisit API naming and align the client with serpapi.com
412412
0 commit comments