Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

diffbot-apis-client

A small Java client for the Diffbot Article API — point it at a web page and get back the extracted article as a typed object rather than raw HTML.

Archived. Written in 2014 against Diffbot API v2, which has since been superseded. Kept as a reference for the shape rather than something to depend on.

Usage

DiffbotApi api = new DiffbotApiImpl();
ArticleResponse article = api.article(token, "http://example.com/some-story");

System.out.println(article.getTitle());
System.out.println(article.getText());

token is your Diffbot API token.

What's inside

Four classes, deliberately:

Class Role
DiffbotApi Interface — one method, article(token, url), plus the base URL constant
DiffbotApiImpl Builds the request URL, calls it, deserialises the JSON with Gson
HttpClient Plain GET over HttpURLConnection
ArticleResponse The response mapped to fields

Only the Article endpoint is covered. Diffbot offers others — Frontpage, Product, Image — and adding one means a method on the interface plus a matching response model; the client was structured with that in mind, but the rest were never needed.

Build

mvn package

Depends on Gson. Tests in DiffbotApiTest call the live API, so they need a valid token.

About

Java client for the Diffbot Article API — minimal demo. Java, 2014.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages