TalorData official Java SDK for integrating search data into your AI workflow, RAG / fine-tuning, or Java application. TalorData helps developers and AI applications connect to real-time, structured, and reliable search data through a single SERP API. With support for Google, Bing, News, Images, Shopping, Maps, Scholar, Trends, and more, TalorData makes it easier to build AI agents, search copilots, SEO workflows, and data-driven automations powered by live search results.
This library can be consumed through JitPack after you create and push a Git tag.
Add the JitPack repository:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Then add the dependency:
<dependency>
<groupId>com.github.Talordata</groupId>
<artifactId>talordata-serp-java</artifactId>
<version>v0.1.0</version>
</dependency>
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.Talordata:talordata-serp-java:v0.1.0'
}
-
JitPack coordinates follow
com.github.<GitHubUser>:<RepoName>:<GitTag>. -
The version must match an existing Git tag such as
v0.1.0. -
Once the tag is pushed to GitHub, JitPack will build the artifact from this repository automatically.
Sign up at TalorData and get your API key from the dashboard.
import com.talordata.serp.Client;
import com.talordata.serp.SerpResults;
import java.util.Map;
public class Main {
public static void main(String[] args) {
Client client = new Client(System.getenv("TALORDATA_API_TOKEN"));
Object result = client.search(Map.of(
"engine", "google",
"q", "car"
));
if (result instanceof SerpResults) {
SerpResults serpResults = (SerpResults) result;
System.out.println(serpResults.getStatus());
System.out.println(serpResults.get("search_information"));
} else {
System.out.println(result);
}
}
}
You can also set the token once in your shell:
export TALORDATA_API_TOKEN=your_token
Then use the static helper:
import com.talordata.serp.TalorDataSerp;
import java.util.Map;
public class Main {
public static void main(String[] args) {
Object result = TalorDataSerp.search(Map.of(
"engine", "google",
"q", "car"
));
System.out.println(result);
}
}
-
examples/BasicSearch.java: basicjson=1search example. -
examples/JsonPlusHtml.java:json=2example with both HTML and parsed JSON. -
examples/HtmlOutput.java:json=3example that prints HTML output.
-
new Client(...): create a reusable client. -
client.search(...): send a form-encodedPOSTrequest to/serp/v1/requestand return the parsed result. -
client.searchJson(...): alias ofsearch(...). -
client.searchHtml(...): return the HTML string forjson=3. -
client.rawSearch(...): return the raw HTTP response body.
-
json=1: returns parsed JSON data. This is the default mode used byclient.search(...). -
json=2: returns bothhtmlandjson. The SDK automatically parsesdata.jsoninto a Java object when possible. -
json=3: returns HTML. The SDK unwraps the HTML string from the API response.
import com.talordata.serp.Client;
import java.util.Map;
public class Main {
public static void main(String[] args) {
Client client = new Client(System.getenv("TALORDATA_API_TOKEN"));
Object result = client.search(Map.of(
"url", "https://www.google.com/search",
"q", "car",
"json", 1
));
System.out.println(result);
}
}
-
Auth uses the
Authorization: Bearer <token>header. -
Requests are sent as
application/x-www-form-urlencoded. -
Boolean params are normalized to
"1"and"0"before sending.
Explore TalorData SERP API integrations and use cases: