Skip to content

Java README Integration Guide Additions - #11

Open
audrey-serpapi wants to merge 10 commits into
masterfrom
readme-doc-update
Open

audrey-serpapi wants to merge 10 commits into
masterfrom
readme-doc-update

Conversation

@audrey-serpapi

@audrey-serpapi audrey-serpapi commented Sep 8, 2026

Copy link
Copy Markdown

https://github.com/serpapi/marketing/issues/340
Summary of Changes:

  • Added Quickstart, Features, Response Formats, new API spotlights, Configuration, Search Asynchronous, Documentation, and Contributing
  • Introduced unit tests as source code to follow previous linked examples
  • Introduced CONTRIBUTING.md to mirror Ruby docs
  • Adjusted wording to mirror Ruby docs format
  • Removed/Updated Usage, Inspiration, Changelog
  • Updated README.md.erb
  • Used uniform api key name and package namespace
  • Remove persistent and timeout (unsupported features)
  • Kept Java namings camel case
  • Edited my own formatting and typos

@audrey-serpapi audrey-serpapi self-assigned this Sep 8, 2026
Comment thread README.md Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we should start earlier. Here, we're assuming people already have "build.gradle" file. Can we start somewhere, like creating a new folder, then ....

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like the repository we provide to be cloned in quickstart already has the gradle files and necessary setup ready. So, no gradle file editing is needed.
Would it be important to have a from scratch application section? Or just keep the main method as cloning our sample app with everything already set?

Comment thread README.md Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"You need a SerpApi account to obtain a key: https://serpapi.com/dashboard"

Duplication. We already mention it after the quickstart

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed, thanks

Comment thread README.md Outdated
The [SerpApi.com API Documentation](https://serpapi.com/search-api) contains a list of all the possible parameters that can be passed to the API.
## Features

- [Asynchronous searches](https://github.com/serpapi/serpapi-java/commit/75417ff5fe603d19c0a30933251d4bb469ddfe9b) for submitting non-blocking jobs and retrieving completed results from the Search Archive API

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we link it to a commit?

@audrey-serpapi audrey-serpapi Sep 14, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be there. We don't have an equivalent page for this so going to leave unlinked.

Comment thread README.md
parameter.put("p", "coffee");
JsonObject results = client.search(parameter);
System.out.println(results.toString());
System.out.println("waiting 10s for searches to complete...");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add a comment that this is a simulation. In real life, people may need to check process status instead of waiting for a specific time.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Done.

@hilmanski

Copy link
Copy Markdown

Any reasons we're dropping these sections:

  • Migrations from the old library
  • TLS / HTTPS and older JVMs

Please also create a summary of your PR changes in the description

CleanShot 2026-09-09 at 13 59 01

…e duplicate dashboard line, remove bad hyperlink, async note, add back in Migrations from the old library + TLS / HTTPS and older JVMs
@audrey-serpapi

Copy link
Copy Markdown
Author

Fixing some previous failing tests. Working for a clean build then will ask for review.

@audrey-serpapi

Copy link
Copy Markdown
Author

Hi @tanysheng @jvmvik @strzibny, could this get a review from you? Thanks

@strzibny

Copy link
Copy Markdown

Thanks @audrey-serpapi. I went through the changes and retested on latest Java 27. We still can't build with JDK 27 because of Gradle but that's expected.

Here are some things we should fix:

1, There is a mismatch between README.md and README.md.erb since the latter isn't updated and the contributor guide says to run make readme which would override our new changes.

2, You use API_KEY instead of SERPAPI_KEY in the new tests and because of that they won't be run on CI.

3, Let's keep example namespace everywhere so it's same:

package serpapi.example;
import serpapi.*;

4, persistent and timeout is configuration from the Ruby gem, but we don't have it here, so we need to skip it in README. The library has timeout but it's currently hardcoded.

5, Response format snippets are snaked_cased but should be CamelCased in Java (e.g. raw_html)

6, Google example likely need to use LocalDate

7, Actual package name is com.github.serpapi:serpapi-java not serp-api

Typos:

  • "you_image" → "your_image"
  • Broken markdown: [contributing guide](...CONTRIBUTING.md)) — extra ).
  • Stray empty blockquote (> alone) before "A couple of notes"
  • Inconsistent/broken indentation in the Google Shopping, Bing, Baidu, and Amazon examples

…nd timeout (unsupported features), make java namings camel case, use LocalDate instead of placeholder for google flights, replace package name, fix typos/formatting
@audrey-serpapi

Copy link
Copy Markdown
Author

Thank you for your review and feedback @strzibny! Have addressed 1-7 and typos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants