- Brand centric instead of search engine based
- No hard-coded logic per search engine
- Simple HTTP client (lightweight, reduced dependency)
- No magic default values
- Thread safe
- Easy extension
- Defensive code style (raise a custom exception)
- TDD - Test driven development
- Best API coding practice per platform
- KISS principles
We use JUnit, GitHub Actions (see workflow), and Gradle.
Run the full test suite locally (integration tests call the live API when a key is present):
export SERPAPI_KEY='your_key' # optional: without it, many tests skip; some tests require the key and will fail if unset
./gradlew testRegenerate README.md from the template after editing examples:
make readme # requires Ruby `erb`How to build from source Clone the repository:
git clone https://github.com/serpapi/serpapi-java.git
cd serpapi-javaBuild (use the wrapper):
./gradlew buildThe 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.