Try our Interactive Data Client: a revolutionary, AI-Powered, custom data retrieval tool. Retrieve ANY data on ANY subject within seconds: Start Now!

Using HttpClient in Java to Invoke Interzoid APIs

by Interzoid Team


Posted on August 31st, 2021


Using HttpClient in Java

In Java 11, a standardized HTTPClient was introduced enabling the sending of requests into the Cloud and the retrieval of responses.

Here is a quick basic example of usage (putting the API license key in the header):

                
      // create the request with the API end point and parameters
      HttpRequest request = HttpRequest.newBuilder()
           .uri(URI.create("https://api.interzoid.com/getcompanymatchadvanced?company=
                    IBM&algorithm=wide"))
           .header("content-type", "application/json")
           .header("x-api-key", "YOURAPIKEY")
           .method("GET", HttpRequest.BodyPublishers.noBody())
           .build();

      // make the request and receive the response
      response = HttpClient.newHttpClient().send(request,
                    HttpResponse.BodyHandlers.ofString());

      // print the response to the console
      System.out.println(response.body());
                

In this particular example, we are generating a similarity key for an organization name. This enables us to locate (through sorting, for example) other organization names that are similar, such as this:

Table of inconsistent company names and similarity key generation for data matching and standardization API

Identifying redundant organization names can be crucial in customer, vendor, or prospect databases. Additionally, this same technique can help us match company records across different data sources.

For the full working source code, visit here on Github.

For more information about the Company Name Matching API, visit here.

AI Interactive Data Client: Request and Receive Structured Data of Any Kind on Any Subject.
Also, turn your structured data requests into an API call to integrate anywhere with different input parameters.
More...
Generate your own Datasets: Retrieve Customized, Real-World Data on Demand as Defined by You
Get results immediately - with infinite possibilities.
More...
High-Performance Batch Processing: Call our APIs with Text Files as Input.
Perform bulk data enrichment using CSV or TSV files.
More...
Try our Pay-as-you-Go Option
Start increasing the usability and value of your data - start small and grow with success.
More...
Available in the AWS Marketplace.
Optionally add usage billing to your AWS account.
More...
Free Trial Usage Credits
Register for an Interzoid API account and receive free usage credits. Improve the value and usability of your strategic data assets now.
Check out our full list of AI-powered APIs
Easily integrate better data everywhere.
More...
Documentation and Overview
See our documentation site.
More...
Product Newsletter
Receive Interzoid product and technology updates.
More...