The Text Analysis API conforms to Representational State Transfer (REST) API usage principles, and can be used in any environment capable of making HTTP requests.
Learn more - Check out the Features and Functions.


 

Your first call is 3 steps away


for an account (or )

Try all of Rosette, free up to 10,000 calls/month!

Get your application keys

Generate your application keys on your API Credentials page,
so Rosette will know who is calling.

Run code samples

Here are code samples for various languages to help you get started.


Check out the cURL API documentation.

$ curl "https://api.rosette.com/rest/v1/ping"
  -H'X-RosetteAPI-Key: Your API key here'


Visit our GitHub page for the binding and documentation.

$ pip install rosette_api
from rosette.api import API
api = API(user_key="Your API Key here")
result = api.ping()
print("/ping: ", result)

Visit our GitHub page for the binding and documentation.

Available through composer:

$ composer require "rosette/api: >=1.3"
<?php
require_once dirname(__FILE__) . '/../vendor/autoload.php';
use rosette\api\Api;
use rosette\api\RosetteException;
$options = getopt(null, array('key:', 'url::'));
if (!isset($options['key'])) {
    echo 'Usage: php ' . __FILE__ . " --key  --url=\n";
    exit();
}
$api = isset($options['url']) ? new Api($options['key'], $options['url']) : new Api($options['key']);
try {
    $result = $api->ping();
    var_dump($result);
} catch (RosetteException $e) {
    error_log($e);
}

Visit our GitHub page for the binding and documentation.

For Maven, add the following dependency to your POM:

<dependency>
<groupId>com.basistech.rosette</groupId>
<artifactId>rosette-api</artifactId>
<version>1.3.2</version>
</dependency>

Visit our GitHub page for the binding and documentation.

Available through github:

$ git clone https://github.com/rosette-api/R-Binding.git
$ cd R-binding/current-release
$ R CMD INSTALL rosetteApi_1.3.0.tar.gz
source("../R/Api.R")
library(rjson)
library("optparse")

option_list = list( make_option(c("-k", "--key"), action="store", default=NA, type='character',
              help="Rosette API key"))
opt_parser = OptionParser(option_list=option_list)
opt = parse_args(opt_parser)

if(is.null(opt$url)){
    result <- api(opt$key, "ping")
} else {
    result <- api(opt$key, "ping", NULL, NULL, opt$url)
}
print(result)

Visit our GitHub page for the binding and documentation.

Available as a gem:

$ gem install rosette_api
require 'rosette_api'

api_key, url = ARGV

if !url
  rosette_api = RosetteAPI.new(api_key)
else
  rosette_api = RosetteAPI.new(api_key, url)
end
response = rosette_api.ping
puts JSON.pretty_generate(response)

Visit our GitHub page for the binding and documentation.

Available through nuget:

$ nuget install rosette_api
class ping
    {
        static void Main(string[] args)
        {
            string apikey = "Your API key";
            string alturl = string.Empty;

            if (args.Length != 0)
            {
                apikey = args[0];
                alturl = args.Length > 1 ? args[1] : string.Empty;
            }
            try
            {
                CAPI NewCAPI = string.IsNullOrEmpty(alturl) ? new CAPI(apikey) : new CAPI(apikey, alturl);
                Dictionary pingResult = NewCAPI.Ping();
                Console.WriteLine(new JavaScriptSerializer().Serialize(pingResult));
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception: " + e.Message);
            }
        }
    }

Visit our GitHub page for the binding and documentation.

Available through npm:

$ npm install rosette-api
$ npm install argparse
"use strict";

var Api = require("../lib/Api");
var ArgumentParser = require("argparse").ArgumentParser;

var parser = new ArgumentParser({
  addHelp: true,
  description: "Send ping to check for reachability of Rosette API"
});
parser.addArgument(["--key"], {help: "Rosette API key", required: true});
parser.addArgument(["--url"], {help: "Rosette API alt-url", required: false});
var args = parser.parseArgs();

var api = new Api(args.key, args.url);
var endpoint = "ping";

api.rosette(endpoint, function(err, res){
	if(err){
		console.log(err)
	} else {
		console.log(JSON.stringify(res, null, 2));
	}
});




Notes: