Linguatools top spanish collocation API

Overview

Looks up a word in a spanish collocation database with the top spanish collocations and returns

  • the best spanish collocations ordered by frequency
  • 2 or 3 example sentences for each collocation

How to use Linguatools Top Spanish Collocation API

Connect to API

GET /?lang={lang}&query={word}

parameterdescriptionparameter value
langThe following language ISO 639-1 code (case sensitive)es (more in preparation)
queryany word (case insensitive)e.g. prestar, dar, apoyo, llevar

Test the API

You can test the API and develop your own application with our test translate API – for free.

Test the test API with:

  • lang es
  • query prestar

http request (test API)

https://lt-collocation-es-test.herokuapp.com/?lang=es&query=prestar
wget https://lt-collocation-es-test.herokuapp.com/?lang=es&query=prestar

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 the 200 most frequently used spanish collocations are included in the test API. The paid API (see below) contains the best 2,000 manually selected spanish collocations with 2-3 example sentences.

API response

Code snippets

Ruby

Python

Paid API

Content

The paid API includes 2,000 spanish collocations with 2-3 spanish example sentences.
The parameters are the same as in the test API.
After licensing you get the end point to access the full collocation database with the 2,000 most frequently used spanish collocations .

Examples of use

You can query the manually compiled 2.000 most frequently used Spanish collocations in this online demo.

For each collocation example sentences are provided.

Licensing conditions

The API/data package can be used in unlimited private and commercial projects of the purchaser:
E. g. in a website application, in a smartphone app etc.

Redistribution is not allowed.

If you want to use the API/data package in your project please contact peter.kolb@linguatools.org for pricing and license conditions.
The prices for the API start at 9 €/month (max. 1 query per second)

Top Spanish collocations as a data package

The 2,000 manually selected spanish collocations are also available as a data package.

Other language APIs by linguatools: https://linguatools.org/language-apis/

An overview of all collocation databases: https://linguatools.org/online-projects/collocation-database/