The dictionary contains more than 4 million English collocations.
The API looks up a word in a dictionary and returns
- all collocations ordered by significance
- up to 3 example sentences for each collocation
- the syntactic relation of each collocation
How to use Linguatools Collocation API
Connect to API
Endpoint and Parameters
|query||any word (case insensitive)||e.g. change|
|lang||One of the following language ISO 639-1 codes (case sensitive):||
|relation||One of the following relations (case sensitive, optional):
|min_sig||any number as the minimum significance (optional). Will return only collocations with
Test the API
You can test the API and develop your own application – for free, with
- our test translate API on Heroku OR
- after sign up in RapidAPI
Test the test API with:
http request (test API)
Important note (!):
The initial API call might take up to 30 seconds because the heroku dyno falls asleep after 30 minutes of inactivity. (The test API runs on a free heroku dyno.)
Further limits of the test API:
The test API contains only a subset of the complete collocation database. Only highly significant collocations (significance > 30,000) are included. Therefore only 6,000 collocations are included in the test API.
After sign up in RapidAPI you can test the collocation API (with access to the full dictionary with 4 million collocations).
http request (API)
You get full access (free & paid) to the full database with 4 million English collocations if you sign up in RapidAPI.
"collocation":"to smoke pipe",
"Breakfast was over , and a number were <b>smoking</b> <b>pipes</b> .",
"The tramp was sitting outside , <b>smoking</b> a <b>pipe</b> .",
"The old man was standing outside , <b>smoking</b> a <b>pipe</b> ."
In raw format you will see the html tags <b> and </b> as \u003cb\u003e and \u003c/b\u003e
apiurl = "https://lt-collocation-test.herokuapp.com/todos/?query=smoke&lang=en"
api = Curl::Easy.new(apiurl)
json_data = JSON.parse(api.body_str)
apiurl = 'https://lt-collocation-test.herokuapp.com/todos/?query=smoke&lang=en'
response = requests.get(apiurl)
json_data = json.loads(response.text)
The API/data package can be used in any number of private and commercial projects of the purchaser:
E. g. in a website application, in a smartphone app etc.
Redistribution is not allowed.
Examples of use
1. Query the complete linguatools collocations database online:
2. We make use of collocations in our online tool Gramomat:
URL: https://gramomat.com/ [A click into the object field to see the suggested collocations]