The Basics

If you're comfortable with using the Twitter or Facebook API, then this will be a cinch. All responses can be formatted as either JSON or XML.

Pay special attention to which HTTP verb is required (usually POST).

There are no rate limits, however you are limited to total calls in a month according to which account you signed up with. For more information on accounts and limitations, check out the Repustate pricing page.

Endpoints

API calls are made to either http://api.repustate.com OR if you want to keep your data away from prying eyes, https://api.repustate.com

Rate Limiting

There are no limits to the number of calls you can make per minute/hour/day etc. however all accounts are subject to monthly limits according to the plan you signed up for.

In the event that you exceed your montly amount, you will receive an HTTP 420 response on all subsequent API calls.

Client Libraries

We've got client libraries to help you out. Head over to our Bit Bucket repo.

Multiple languages

Some of the API calls below can be operated on multiple languages, not just in English. To specify another language, you have to provide the two letter code for the language you're interested in. Below are the currently supported languages:

Language Code Notes
English en Default
Arabic ar
Chinese zh
German de
French fr
Spanish es
Italian it

Lastly, if you see something wrong or would like us to add or improve things, please let us know.

Sample call

Here's an example of an API call. Each API call requires that you pass in a version number, your API key and specify a format for the response. In this example below, our API key is "demokey" and we're using version 2 (v2) of the API

curl -d "url=www.twitter.com" http://api.repustate.com/v2/demokey/score.json

NB: "demokey" is just a sample API key. You should replace it with your actual key which will look something like this: 05b0cb45065491ed795fbf14ac18a94d06353d2a

Authentication

There is no explicit authentication mechanism, you just include your API key in each and every call to the API.

Sentiment

Repustate's sentiment analysis allows you to determine the sentiment (how people "feel" about a particular topic) from any data source you have access to. Like most of Repustate's API calls, you have a choice of how to specify your arguments. You can supply one of a block of text, a single URL, or a list of URLs.

HTTP Method(s):

POST

Arguments:

Name Required? Notes
text No A block of text
url No Any valid URL
lang No The two letter code of the language you want to analyze the sentiment in. The default is English (en); you do not need to specify anything if you're just scoring English text.

Note that one of text or url must be included, but not both. If both are included, the text value will be used.

Response:

status Possible values: OK, Error. If there is an error, you will get additional information about what went wrong (e.g. missing fields, incorrect API key).
score A decimal number. Negative numbers mean negative sentiment and positive numbers mean positive. Any score "close" to 0 can be interpreted as being neutral.

Usage:

curl -d "url=www.twitter.com" http://api.repustate.com/v2/demokey/score.json

Here are sample responses in both formats.

    {
  "status": "OK", 
  "score": 1.0
}
                        
    <repustate>
 <status>
  OK
 </status>
 <score>
  1.0
 </score>
</repustate>
                        

Sentiment (by topic)

Longer text can sometimes contain multiple topics or ideas. If you want the sentiment as it relates to a particular topic within a block of text, then this API call will scope the sentiment to one (or more) topics.

HTTP Method(s):

POST

Arguments:

Name Required? Notes
topics Yes Comma separated list of topics that you want to analyze the sentiment for.
text Yes The block or blocks of text you want to analyze sentiment for. If you want to include multiple blocks of text in one API call, enumerate this parameter (e.g. text1, text2, text3) and the response will include a reference to each text block's ID so you can reconcile scores on your end.
lang No The language to analyze the text in. Default is 'en' (English).

Response:

status The status of your request, OK or Fail if there was an error.
results A list of scores, where each topic gets a score for each block of text in your request. Included in the response is the ID of the text block, the score for each topic in that text block, as well as the frequency with which the topic occurred in the block of text.

Usage:

curl -d "topics=Obama,cake&text=President Obama was very happy to announce new legislation today. Obama was greeted with a round of applause, but the cake they served afterwards was horrible and left everybody running for the exits." https://api.repustate.com/v2/YOUR_API_KEY/topic.json

Here are sample responses in both formats.

    {
  "status": "OK", 
  "results": [
    {
      "topic": "Obama", 
      "freq": 2, 
      "score": 0.1136, 
      "id": "text1"
    }, 
    {
      "topic": "cake", 
      "freq": 2, 
      "score": -0.39129, 
      "id": "text1"
    }
  ]
}
                        
    <?xml version='1.0' encoding='utf-8'?>
<repustate>
 <results>
  <element>
   <topic>
    Obama
   </topic>
   <score>
    0.1136
   </score>
   <freq>
    2
   </freq>
   <id>
    text1
   </id>
  </element>
  <element>
   <topic>
    cake
   </topic>
   <score>
    -0.39129
   </score>
   <freq>
    2
   </freq>
   <id>
    text1
   </id>
  </element>
 </results>
</repustate>
                        

Sentiment (bulk)

If you plan on analyzing a large number of text documents (i.e you already have the text and you're not relying on Repustate to grab the content via a URL) then we suggest utilizing our bulk API. With this API call, you can POST up to 500 pieces of text a time when using English and 100 pieces of text at a time for other languages and Repustate will return an XML or JSON list with a score for each block of text.

HTTP Method(s):

POST

Arguments:

Name Required? Notes
text Yes One or more blocks of text. Each argument starting with 'text' will be scored. To help you reconcile scores with blocks of text, Repustate requires that you append some sort of ID to the POST argument. For example, if you had 50 blocks of text, you could enumerate them from 1 to 50 as text1, text2, ..., text50.
lang No The two letter code of the language you want to analyze the sentiment in. The default is English (en); you do not need to specify anything if you're just scoring English text.
chunk No If provided (it can be any value, the key "chunk" just has to be appear in the POST somewhere), each result will also have a list of chunks that were extracted from the text.

All languages can be analyzed in bulk however non-english languages are limited to 100 pieces of text at a time, for now.

When enumerating blocks of text, please start from 1 (e.g text1, text2, ... , textN)

Response:

status Possible values: OK, Error. If there is an error, you will get additional information about what went wrong (e.g. missing fields, incorrect API key).
results A list of scores and id's, one for each block of text POSTed. See below for the format of each item in this list.
result Each score result will consist of a score (decimal number) and an ID (as defined by the original request.) There can be 0 or more results returned.

Usage:

curl -d "text1=first block of text&text2=second block of text" http://api.repustate.com/v2/demokey/bulk-score.json

Here are sample responses in both formats.

    {
  "status": "OK", 
  "results": [
    {
      "score": 1.0, 
      "id": 1
    }, 
    {
      "score": 0.87, 
      "id": 2
    }
  ]
}
                        
    <?xml version='1.0' encoding='utf-8'?>
<repustate>
 <status>
  OK
 </status>
 <results>
  <result>
   <id>
    1
   </id>
   <score>
    0.98
   </score>
  </result>
  <result>
   <id>
    2
   </id>
   <score>
    -0.45
   </score>
  </result>
 </results>
</repustate>
                        

Chunking with sentiment

Often you might be interested in the individual portions of a document's sentiment, rather than the overall sentiment. Chunking is the process of breaking up a document into its more interesting parts and evaluating the sentiment on it. This API call chunks and returns the sentiment for each chunk.

HTTP Method(s):

POST

Arguments:

Name Required? Notes
url No
text No One of URL or text must be specified.
lang No The language of your text. English ('en') is the default and does not need to be specified.

Note that one of text or url must be included, but not both. If both are included, the text value will be used.

Response:

status Possible values: OK, Error. If there is an error, you will get additional information about what went wrong (e.g. missing fields, incorrect API key).
chunks A list of chunks, where each chunk has a score associated with it. If your response type is XML, the scores and chunks come sequentially one after the other.

Usage:

curl -d "text=The food was great, but the service was terrible." http://api.repustate.com/v2/demokey/chunk.json

Here are sample responses in both formats.

    {
  "status": "OK", 
  "chunks": [
    {
      "chunk": "The service was great", 
      "score": 1
    }, 
    {
      "chunk": "the food was terrible", 
      "score": -1
    }
  ]
}
                        
    <?xml version='1.0' encoding='utf-8'?>
<repustate>
 <status>
  OK
 </status>
 <chunks>
  <element>
   <chunk>
    The food was great
   </chunk>
   <score>
    0.25
   </score>
  </element>
  <element>
   <chunk>
    the service was terrible
   </chunk>
   <score>
    -0.25819
   </score>
  </element>
 </chunks>
</repustate>
                        

Categorizations

Sometimes sentiment alone isn't enough - you want to know which aspects of a particular subject carry sentiment. For example, if you're a hotel, you might be interested in knowing people's opinions on your staff, as well as your amenities and the food offerings.

This API call automically categorizes text according to industry-specific categories. Below you'll find information on which industry verticals are supported as well as the categories for each:

IndustryCategories
hotel food, price, location, accommodations, amenities, staff
airline price, staff, in-flight, loyalty
restaurant price, food, staff, location, atmosphere, events
telecom price, service, products

HTTP Method(s):

POST

Arguments:

Name Required? Notes
niche Yes The group of categories you're interested in using. Options are one of: hotel, airline, telco, retail, restaurant.
text No The text you'd like to analyze. You must supply either text or a URL.
url No The URL of the web page you'd like to analyze. You must supply either a URL or a text block.
lang No The default is 'en' (English).

Only English is supported right now.

Response:

status Indicates whether or not the request went through properly without error. Should be OK or FAIL.
categories If your response type is JSON, each matching category will be a top level key with each matching text chunk a member in a list, along with its sentiment score.

If your response type is XML, each matching category is a to level node where each chunk and its score are enclosed within an "element" tag i.e. you can have more than one element tag appearing in the document.

Usage:

curl -d "text=I loved the rooms, but the coffee could have been better&niche=hotel" http://api.repustate.com/v2/YOUR_API_KEY/categorize.json

Here are sample responses in both formats.

    {
  "food": [
    {
      "chunk": "the coffee could have been better", 
      "score": -0.20655
    }
  ], 
  "accommodations": [
    {
      "chunk": "I loved the rooms", 
      "score": 0.25819
    }
  ]
}
                        
    <?xml version='1.0' encoding='utf-8'?>
<repustate>
 <food>
  <element>
   <chunk>
    the coffee could have been better
   </chunk>
   <score>
    -0.20655
   </score>
  </element>
 </food>
 <accommodations>
  <element>
   <chunk>
    I loved the rooms
   </chunk>
   <score>
    0.25819
   </score>
  </element>
 </accommodations>
</repustate>
                        

Clean HTML

This API call will extract out the most important part of a web page, removing all tags and any common header or footer content. For those familiar with Readability.js, this API call replicates Readability's functionality.

If the article has a main image, the URL to this image will also be returned.

HTTP Method(s):

GET

Arguments:

Name Required? Notes
url Yes Any valid URL that hass been url encoded ("escaped"). If the URL specified is a URL-shortened one (e.g. bit.ly), Repustate will follow the redirects properly until the final page is found.

* Note: all of the above API calls use this implicitly so you don't have to clean your HTML before passing it to Repustate. Only use this API call if you intend to do your own processing after the fact with the cleaned up HTML. 

* Note 2: This call doesn't work on home pages e.g. cnn.com, ebay.com, nytimes.com. Its intended use is for single article pages.

Response:

status Possible values: OK, Error. If there is an error, you will get additional information about what went wrong (e.g. missing fields, incorrect API key).
text The most important text extracted from the URL
image The URL to the "main" image, if it exists, for this web page.

Usage:

Here are sample responses in both formats.

    {
  "status": "OK", 
  "text": "I'm clean HTML without all of the clutter of tags."
}
                        
    <repustate>
 <status>
  OK
 </status>
 <text>
  I'm clean HTML without all of the clutter of tags.
 </text>
</repustate>
                        

N-grams

This API call generates all n-grams within a block of text (or URL) and returns the frequency of their occurrence. For more information about n-grams, check out the Wikipedia entry. You can specify up to what length 'n' you want generated, but anything higher than 5 probably won't return anything useful.

Optional arguments include the ability to filter on a minimum frequency of occurrence as well as a minimum number of n-gram terms (e.g. only show bi-grams or more and skip all unigrams).

Please note that if you are using HTTP GET, any optional arguments need to be URL-encoded. If you are using HTTP POST, any optional arguments should be part of your POST'ed data.

 

HTTP Method(s):

POST,GET

Arguments:

Name Required? Notes
url No Any valid URL. If the URL specified is a URL-shortened one (e.g. bit.ly), Repustate will follow the redirects properly until the final page is found. You must HTTP GET when calling with a URL.
text No Any block of text. You must HTTP POST when calling with a block of text
max No Up to what length of n-grams that should be generated. The default is 5.
min No The minimum length of n-grams that should be generated. The default is 1.
stopwords No Include this argument with a value of 1 if you want to omit any stopwords from being included in the n-grams that are generated. The default is 0 i.e. to include stopwords.
lang No The two letter code of the language you're analyzing. The default is English (en); you do not need to specify anything if you're just using English text.
freq No The minimum frequency of occurrence that should be returned. If for example you put freq=2, then no n-gram that occurs fewer than two times will appear in your result set. This is useful because all n-grams appear once, but the n-grams that appear repeatedly might be of some importance.

Response:

status Possible values: OK, Error. If there is an error, you will get additional information about what went wrong (e.g. missing fields, incorrect API key).
text The text that was analyzed.
ngrams A list of n-grams found. For each one found, you will see three key-value pairs:
length - How many tokens are in the n-gram.
ngram - The n-gram itself.
freq - The frequency of its occurrence in the document

Usage:

Here are sample responses in both formats.

    {'status': 'OK',
         'text': 'This is my block of text.',
         'url': 'http://www.repustate.com/u/055fd3a3ae6079dfbd3a1cf9d799fa93c1729620/',
         'ngrams': [
            {'ngram': 'This', 'freq': 1, 'length': 1},
            {'ngram': 'block', 'freq': 1, 'length': 1},
            {'ngram': 'is', 'freq': 1, 'length': 1}, 
            ...
         ]
        }
                        
    <repustate>
 <status>
  OK
 </status>
 <text>
  This is my block of text.
 </text>
 <url>
  http://www.repustate.com/u/055fd3a3ae6079dfbd3a1cf9d799fa93c1729620/
 </url>
 <ngrams>
  <ngram_container>
   <length>
    1
   </length>
   <ngram>
    This
   </ngram>
   <freq>
    1
   </freq>
  </ngram_container>
  <ngram_container>
   <length>
    1
   </length>
   <ngram>
    block
   </ngram>
   <freq>
    1
   </freq>
  </ngram_container>
  <ngram_container>
   <length>
    1
   </length>
   <ngram>
    is
   </ngram>
   <freq>
    1
   </freq>
  </ngram_container>
 </ngrams>
</repustate>
                        

POS tagging

Get access to Repustate's all purpose part-of-speech tagger in the language of your choice. This API call returns the entire text block tagged with the part of speech for each word.

The list of possible tags and their meaning for ALL languages is below:

NN: noun
ADJ: adjective
VB: verb
ADV: adverb
CONJ: conjunction
PREP: preposition
ART: article
PP: pronoun
POSS: possessive noun
PUNC: punctuation 

HTTP Method(s):

POST

Arguments:

Name Required? Notes
text Yes The text you would like to tag.
lang No The language code for the language your text is in. If omitted, English is assumed.

While the tags can be more specific (different verb tenses etc.) we have simplified the list of possible tags and collapsed all possible tags into the minimal set required.

Response:

tags A list of hashes, with a key 'tag' and a key 'word', representing the part-of-speech tag for the given word, respectively.
status Possible values: OK, Error. If there is an error, you will get additional information about what went wrong (e.g. missing fields, incorrect API key).
text The original text that was analyzed
language The language of the text.

Usage:

curl -d "text=Let me see the part of speech tags for this sentence!" http://api.repustate.com/v2/demokey/pos.json

Here are sample responses in both formats.

    {
  "status": "OK", 
  "text": "Let me see the part of speech tags for this sentence!", 
  "language": "en", 
  "tags": [
    {
      "tag": "VB", 
      "word": "let"
    }, 
    {
      "tag": "PP", 
      "word": "me"
    }, 
    {
      "tag": "VB", 
      "word": "see"
    }, 
    {
      "tag": "ART", 
      "word": "the"
    }, 
    {
      "tag": "NN", 
      "word": "part"
    }, 
    {
      "tag": "PREP", 
      "word": "of"
    }, 
    {
      "tag": "NN", 
      "word": "speech"
    }, 
    {
      "tag": "NN", 
      "word": "tag"
    }, 
    {
      "tag": "PREP", 
      "word": "for"
    }, 
    {
      "tag": "ART", 
      "word": "this"
    }, 
    {
      "tag": "NN", 
      "word": "sentence"
    }, 
    {
      "tag": "PUNC", 
      "word": "!"
    }
  ]
}
                        
    <?xml version='1.0' encoding='utf-8'?>
<repustate>
 <status>
  OK
 </status>
 <text>
  Let me see the part of speech tags for this sentence!
 </text>
 <language>
  en
 </language>
 <tags>
  <element>
   <tag>
    VB
   </tag>
   <word>
    let
   </word>
  </element>
  <element>
   <tag>
    PP
   </tag>
   <word>
    me
   </word>
  </element>
  <element>
   <tag>
    VB
   </tag>
   <word>
    see
   </word>
  </element>
  <element>
   <tag>
    ART
   </tag>
   <word>
    the
   </word>
  </element>
  <element>
   <tag>
    NN
   </tag>
   <word>
    part
   </word>
  </element>
  <element>
   <tag>
    PREP
   </tag>
   <word>
    of
   </word>
  </element>
  <element>
   <tag>
    NN
   </tag>
   <word>
    speech
   </word>
  </element>
  <element>
   <tag>
    NN
   </tag>
   <word>
    tag
   </word>
  </element>
  <element>
   <tag>
    PREP
   </tag>
   <word>
    for
   </word>
  </element>
  <element>
   <tag>
    ART
   </tag>
   <word>
    this
   </word>
  </element>
  <element>
   <tag>
    NN
   </tag>
   <word>
    sentence
   </word>
  </element>
  <element>
   <tag>
    PUNC
   </tag>
   <word>
    !
   </word>
  </element>
 </tags>
</repustate>
                        

Adjectives

With Repustate's natural language toolkit, you can extract key adjectives from data all over the world. Find out which words people are using to describe a particular brand, person or idea.

HTTP Method(s):

POST

Arguments:

Name Required? Notes
cloud No By default, the response is a list of unique adjectives found. Specifying cloud=1 will return a frequency count of adjectives.
text No A block of text. You must use HTTP POST if you're analyzing a block of text.
url No Any valid, URL-encoded URL. Use HTTP POST.
lang No The two letter code of the language you're analyzing. The default is English (en); you do not need to specify anything if you're just using English text.

You must specify at least one of 'url' or 'text' otherwise you will receive an error for providing insufficient arguments.

Response:

status Possible values: OK, Error. If there is an error, you will get additional information about what went wrong (e.g. missing fields, incorrect API key).
result If `cloud` is not specified, a list of adjectives. If `cloud` was specified, you'll receive key/value pairs matching adjective to its frequency of occurence.

Usage:

curl -d "text=This is a big block of new text" http://api.repustate.com/v2/demokey/adj.xml

Here are sample responses in both formats.

    {
  "status": "OK", 
  "results": [
    "big", 
    "new"
  ]
}
                        
    <repustate>
 <status>
  OK
 </status>
 <results>
  <result>
   big
  </result>
  <result>
   new
  </result>
 </results>
</repustate>
# The response when cloud = True
<repustate>
 <status>
  OK
 </status>
 <results>
  <big>
   1
  </big>
  <new>
   1
  </new>
 </results>
</repustate>
                        

Verbs

With Repustate's natural language toolkit, you can extract key verbs, or action words, from data all over the world. Find the words that connote an intent to act on a certain product or trend.

HTTP Method(s):

POST

Arguments:

Name Required? Notes
cloud No By default, the response is a list of unique adjectives found. Specifying cloud=1 will return a frequency count of adjectives.
text No A block of text. You must use HTTP POST if you're analyzing a block of text.
url No Any valid, URL-encoded URL. Use HTTP POST.
lang No The two letter code of the language you're analyzing. The default is English (en); you do not need to specify anything if you're just using English text.

Response:

status Possible values: OK, Error. If there is an error, you will get additional information about what went wrong (e.g. missing fields, incorrect API key).
result If `cloud` is not specified, a list of adjectives. If `cloud` was specified, you'll receive key/value pairs matching adjective to its frequency of occurence.

Usage:

curl -d "text=This man is buying iPads." http://api.repustate.com/v2/demokey/verb.json

Here are sample responses in both formats.

    {
  "status": "OK", 
  "results": [
    "buying"
  ]
}
                        
    <repustate>
 <status>
  OK
 </status>
 <results>
  <result>
   buying
  </result>
 </results>
</repustate>
# The response when cloud = True
<repustate>
 <status>
  OK
 </status>
 <results>
  <buying>
   1
  </buying>
 </results>
</repustate>
                        

Nouns

With Repustate's natural language toolkit, you can extract nouns, or people, places and things, from data all over the world. Find the topics that are of importance to your customers with this API call.

HTTP Method(s):

POST

Arguments:

Name Required? Notes
cloud No By default, the response is a list of unique nouns found. Specifying cloud=1 will return a frequency count of nouns.
text No A block of text. You must use HTTP POST if you're analyzing a block of text
url No Any valid, encoded URL. Use HTTP POST.
lang No The language of the text you're analyzing.

Response:

status Possible values: OK, Error. If there is an error, you will get additional information about what went wrong (e.g. missing fields, incorrect API key).
result If `cloud` is not specified, a list of nouns. If `cloud` was specified, you'll receive key/value pairs matching a noun to its frequency of occurence.

Usage:

curl -d "text=This man is buying iPads." http://api.repustate.com/v2/demokey/noun.json

Here are sample responses in both formats.

    {
  "status": "OK", 
  "results": [
    "man", 
    "iPads"
  ]
}
                        
    <repustate>
 <status>
  OK
 </status>
 <results>
  <result>
   man
  </result>
  <result>
   iPads
  </result>
 </results>
</repustate>
                        

Correction

If you feel our sentiment engine is incorrect, you can issue a correction using this API call. This correction will only affect your data and cannot be influenced by others. In other words, if another Repustate user submits a correction stating that "I love hockey" is negative, that will only affect their scoring going forward, not anybody else's.

HTTP Method(s):

POST

Arguments:

Name Required? Notes
score Yes The score you think the text should have. Submit -1 for negative, 0 for neutral, and 1 for positive.
Text Yes The snippet of text which you're correcting. For best results, only submit the text that needs to be corrected, and not the surrounding text. For example, in the sentence "The hotel's beds were too soft", if you want this to be negative, then submit "beds were too soft" (or maybe even "too soft") as being negative, and not the "The hotel" part of the sentence. This will allow our engine to learn much faster.
lang Yes The language of the text you're analyzing.

Response:

status This will be the value OK simply meaning that your correction has been received and applied.

Usage:

curl -d "text=the beds are too soft&score=-1&lang=en" http://api.repustate.com/v2/demokey/correction.json

Here are sample responses in both formats.

    {
  "status": "OK"
}
                        
    <?xml version='1.0' encoding='utf-8'?>
<repustate>
 <status>
  OK
 </status>
</repustate>
                        

Language detection

Given a piece of text (or a URL to a website), this API call will determine the language of the text in question. The response will contain a two letter code representing the language identified. Possible languages are english (en), french (fr), german (de), spanish (es), dutch (nl) and italian (it).

If a language cannot be accurately detected, an empty string will be returned as the language code.

HTTP Method(s):

POST,GET

Arguments:

Name Required? Notes
url No Either a URL or a block of text must be provided. Only used with GET.
text No Either a URL or a block of text must be provided. Only used with POST.

Response:

status OK of Fail.
text The text that was analyzed.
language Two letter code representing the language identified.

Usage:

http://api.repustate.com/v2/YOUR_API_KEY/detect-language.json?url=http://tcrn.ch/aav9Ty

Here are sample responses in both formats.

    {
  "status": "OK", 
  "text": "The service was great, but the food was terrible.", 
  "language": "en"
}
                        
    <?xml version='1.0' encoding='utf-8'?>
<repustate>
 <status>
  OK
 </status>
 <text>
  The service was great, but the food was terrible.
 </text>
 <language>
  en
 </language>
</repustate>
                        

Bulk language detection

Similar to language detection, but works on many pieces of text all at once. Structured similarly to the bulk sentiment call.

HTTP Method(s):

POST

Arguments:

Name Required? Notes
text Yes One or more blocks of text. Each argument starting with 'text' will be scored. To help you reconcile scores with blocks of text, Repustate requires that you append some sort of ID to the POST argument. For example, if you had 50 blocks of text, you could enumerate them from 1 to 50 as text1, text2, ..., text50.

Response:

status OK or Fail.
results A list of tuples, matching the ID of the text block with the language that it was tagged as being.

Usage:

curl -d "text1=first block of text&text2=second block of text" http://api.repustate.com/v2/YOUR_API_KEY/bulk-detect-language.json

Here are sample responses in both formats.

    {"status":"OK", "results":[{"language":'en', "id":1}, "language":'fr', "id":2}]}
                        
    <repustate>
 <status>
  OK
 </status>
 <results>
  <result>
   <id>
    1
   </id>
   <language>
    en
   </language>
  </result>
  <result>
   <id>
    2
   </id>
   <language>
    fr
   </language>
  </result>
 </results>
</repustate>
                        

Usage

Retrieve your API usage for the current billing period.

HTTP Method(s):

GET

Arguments:

Name Required? Notes

Response:

calls_used The total API calls that have been used this billing period
status The status of this API call, or an error if something went wrong.
max_calls_allowed The maximum number of API calls your account is entitled to for the current billing period.

Usage:

curl http://api.repustate.com/v2/YOUR_API_KEY/usage.json

Here are sample responses in both formats.

    {
  "max_calls_allowed": 4000000, 
  "status": "OK", 
  "calls_used": 761099
}
                        
    <repustate>
 <status>
  OK
 </status>
 <max_calls_allowed>
  4000000
 </max_calls_allowed>
 <calls_used>
  761099
 </calls_used>
</repustate>