Collins Dictionary REST API documentation


Summary

ResourceMethodDescription
http://www.example.com/api/v1/dictionaries
Getting list of available dictionaries in JSON.
Getting list of available dictionaries in XML.
http://www.example.com/api/v1/dictionaries/{dictCode}
Getting single dictionary information in JSON.
Getting single dictionary information in XML.
http://www.example.com/api/v1/dictionaries/{dictCode}/topics
Getting all topics in JSON
Getting all topics in XML
http://www.example.com/api/v1/dictionaries/{dictCode}/topics/{thesaurusName}
Unused
Unused
http://www.example.com/api/v1/dictionaries/{dictCode}/topics/{thesaurusName}/{topicId}
Getting topic information with subtopic and linked entries in JSON.
Getting topic information with subtopic and linked entries in XML.
http://www.example.com/api/v1/dictionaries/{dictCode}/search
Getting first page of results in JSON.
Getting first page of results in XML.
http://www.example.com/api/v1/dictionaries/{dictCode}/search/first
Getting first matching result in XML.
Getting first matching result in JSON.
http://www.example.com/api/v1/dictionaries/{dictCode}/search/didyoumean
Getting all suggestions for the given word in JSON
Getting all suggestions for the given word in XML
http://www.example.com/api/v1/dictionaries/{dictCode}/entries
Unused
Unused
http://www.example.com/api/v1/dictionaries/{dictCode}/entries/{entryId}
Getting entry information with content in specified format in JSON.
Getting entry information with content in specified format in XML.
http://www.example.com/api/v1/dictionaries/{dictCode}/entries/{entryId}/nearbyentries
Getting preceding and following entries of current entry in same dictionary in JSON.
Getting preceding and following entries of current entry in same dictionary in XML.
http://www.example.com/api/v1/dictionaries/{dictCode}/entries/{entryId}/pronunciations
Getting all pronunciations of the selected entry in XML.
Getting all pronunciations of the selected entry in JSON.
http://www.example.com/api/v1/dictionaries/{dictCode}/entries/{entryId}/relatedentries
Getting all linked entries in same or other dictionaries in JSON.
Getting all linked entries in same or other dictionaries in XML.
http://www.example.com/api/v1/dictionaries/{dictCode}/wordoftheday
Getting full entry for Word of the day in JSON.
Getting full entry for Word of the day in XML.
http://www.example.com/api/v1/dictionaries/{dictCode}/wordoftheday/preview
Getting short version for the Word of the day in JSON.
Getting short version for the Word of the day in XML.
http://www.example.com/api/v1/documentation/wadl
REST API documentation in XML format.
http://www.example.com/api/v1/documentation/html
REST API documentation in HTML format.
http://www.example.com/api/v1/wordoftheday
Getting full entry for Word of the day in JSON.
Getting full entry for Word of the day in XML.
http://www.example.com/api/v1/wordoftheday/preview
Getting short version for the Word of the day in JSON.
Getting short version for the Word of the day in XML.

Resources


http://www.example.com/api/v1/dictionaries

Methods
GEThttpGet()

Getting list of available dictionaries in JSON.

request
unspecified
responses
representations for status code 200
application/json[{ "dictionaryName": [STRING], "dictionaryCode": [STRING], "dictionaryUrl": [STRING] }]
representations for status code 500
application/json{ "errorCode": [STRING], "errorMessage": [STRING] }
GEThttpGetXml()

Getting list of available dictionaries in XML.

request
unspecified
responses
representations for status code 200
application/xml<dictionaries> <dictionary> <dictionaryCode>[STRING]</dictionaryCode> <dictionaryName>[STRING]</dictionaryName> <dictionaryUrl>[STRING]</dictionaryUrl> </dictionary> ... </dictionaries>
representations for status code 500
application/xml<error> <errorCode>[STRING]</errorCode> <errorMessage>[STRING]</errorMessage> </error>

http://www.example.com/api/v1/dictionaries/{dictCode}

Methods
GEThttpGet()

Getting single dictionary information in JSON.

request
template params
dictCodestringdictionary code find in dictionaries list

responses
representations for status code 404
application/json{"errorCode":"InvalidDictionary", "errorMessage":"Dictionary '<dictionary code>' not found."}
representations for status code 200
application/json{ "dictionaryName": [STRING], "dictionaryCode": [STRING], "dictionaryUrl": [STRING] }
GEThttpGetXml()

Getting single dictionary information in XML.

request
template params
dictCodestringdictionary code find in dictionaries list

responses
representations for status code 404
application/xml<error> <errorCode>InvalidDictionary</errorCode> <errorMessage>Dictionary '[dictionary code]' not found.</errorMessage> </error>
representations for status code 200
application/xml<dictionary> <dictionaryCode>[STRING]</dictionaryCode> <dictionaryName>[STRING]</dictionaryName> <dictionaryUrl>[STRING]</dictionaryUrl> </dictionary>

http://www.example.com/api/v1/dictionaries/{dictCode}/topics

Methods
GEThttpGet()

Getting all topics in JSON

request
template params
dictCodestringdictionary code find in dictionaries list

responses
representations for status code 200
application/json{thesaurusList: [STRING ARRAY]}
GEThttpGetXml()

Getting all topics in XML

request
template params
dictCodestringdictionary code find in dictionaries list

responses
representations for status code 200
application/xml<thesaurusList><thesaurus>STRING</thesaurus></thesaurusList>

http://www.example.com/api/v1/dictionaries/{dictCode}/topics/{thesaurusName}

Methods
GEThttpGet()

Unused

request
template params
dictCodestringdictionary code find in dictionaries list
thesaurusNamestringthe thesaurus name of the topic

responses
representations for status code 200
application/json{}
GEThttpGetXml()

Unused

request
template params
dictCodestringdictionary code find in dictionaries list
thesaurusNamestringthe thesaurus name of the topic

responses
representations for status code 200
application/xml<topics />

http://www.example.com/api/v1/dictionaries/{dictCode}/topics/{thesaurusName}/{topicId}

Methods
GEThttpGet()

Getting topic information with subtopic and linked entries in JSON.

request
template params
dictCodestringdictionary code find in dictionaries list
thesaurusNamestringthe thesaurus name of the topic
topicIdstringthe id of the topic

responses
representations for status code 200
application/json{ "dictionaryCode": [STRING], "entries": [ENTRY ARRAY], "parentId": [STRING], "subTopics": [SUBTOPIC ARRAY], "topicId": [STRING], "topicLabel": [STRING], "topicUrl": [STRING] }. Subtopic structure: { "subTopicId": [STRING], "subTopicLabel": [STRING], "subTopicUrl": [STRING] }. Entry structure: { "entryId": [STRING], "entryLabel": [STRING], "entryUrl": [STRING] }.
GEThttpGetXml()

Getting topic information with subtopic and linked entries in XML.

request
template params
dictCodestringdictionary code find in dictionaries list
thesaurusNamestringthe thesaurus name of the topic
topicIdstringthe id of the topic

responses
representations for status code 200
application/json<topic> <dictionaryCode>[STRING]</dictionaryCode> <entries>[ENTRY ARRAY]</entries> <parentId>[STRING]</parentId> <subTopics>[SUBTOPIC ARRAY]</subTopics> <topicId>[STRING]</topicId> <topicLabel>[STRING]</topicLabel> <topicUrl>[STRING]</topicUrl> </topic> . Entry structure: <entries> <entryId>[STRING]</entryId> <entryLabel>[STRING]</entryLabel> <entryUrl>[STRING]</entryUrl> </entries>. Subtopic structure: <subTopics> <subTopicId>[STRING]</subTopicId> <subTopicLabel>[STRING]</subTopicLabel> <subTopicUrl>[STRING]</subTopicUrl> </subTopics>.

http://www.example.com/api/v1/dictionaries/{dictCode}/search

Methods
GEThttpGet()

Getting first page of results in JSON.

request
template params
dictCodestringdictionary code find in dictionaries list

query params
qstringSearch terms
pagesizeintthe number of results per page to return
pageindexintthe index of result page to return

responses
representations for status code 404
application/json{"errorCode":"PageNotFound","errorMessage": "Selected page index not found" }
representations for status code 200
application/json{ "dictionaryCode": [STRING], "results": [RESULT ARRAY] }. Result structure: { "entryLabel": [STRING], "entryUrl": [STRING], "entryId": [STRING] }
representations for status code 400
application/json{"errorCode":"InvalidParameter","errorMessage": "Page index is not a valid integer superior to 0" } or {"errorCode":"InvalidParameter","errorMessage": "Page size is not a valid integer between 1 and 100"}
GEThttpGetXml()

Getting first page of results in XML.

request
template params
dictCodestringdictionary code find in dictionaries list

query params
qstringSearch terms
pagesizeintthe number of results per page to return
pageindexintthe index of result page to return

responses
representations for status code 404
application/xml<error><errorCode>PageNotFound</errorCode><errorMessage>Selected page index not found</errorMessage></error>
representations for status code 200
application/xml<search> <dictionaryCode>[STRING]</dictionaryCode> <results>[RESULT ARRAY]</results> </search>. Result structure: <entry> <entryLabel>[STRING]</entryLabel> <entryUrl>[STRING]</entryUrl> <entryId>[STRING]</entryId> </entry>
representations for status code 400
application/xml<error><errorCode>InvalidParameter</errorCode><errorMessage>Page index is not a valid integer superior to 0</errorMessage></error> or <error><errorCode>InvalidParameter< /errorCode><errorMessage>Page size is not a valid integer between 1 and 100</errorMessage></error> or <error> <errorCode>EmptyQuery</errorCode> <errorMessage>search term is not specified</errorMessage> </error>

http://www.example.com/api/v1/dictionaries/{dictCode}/search/first

Methods
GEThttpGetSearchFirstXml()

Getting first matching result in XML.

request
template params
dictCodestringdictionary code find in dictionaries list

query params
qstringSearch terms
formatstringcan be "html" or "xml" (defaults is "html").

responses
representations for status code 200
application/xml<entry> <dictionaryCode>[STRING]</dictionaryCode> <entryContent>[STRING]</entryContent> <entryId>[STRING]</entryId> <entryLabel>[STRING]</entryLabel> <entryUrl>[STRING]</entryUrl> <format>[STRING]</format> <topics>[TOPICS]</topics> </entry>. Topic structure: <topic> <topicId>[STRING]</topicId> <topicLabel>[STRING]</topicLabel> <topicParentId>[STRING]</topicParentId> <topicUrl>[STRING]</topicUrl></topic>
representations for status code 400
application/xml<error> <errorCode>EmptyQuery</errorCode> <errorMessage>search term is not specified</errorMessage> </error>
GEThttpGetSearchFirst()

Getting first matching result in JSON.

request
template params
dictCodestringdictionary code find in dictionaries list

query params
qstringSearch terms
formatstringcan be "html" or "xml" (defaults is "html").

responses
representations for status code 200
application/json{ "topics": [TOPICS ARRAY], "dictionaryCode": [STRING], "entryLabel": [STRING], "entryContent": [STRING], "entryUrl": [STRING], "format": [STRING], "entryId": [STRING] }. Topic structure: { "topicId": [STRING], "topicLabel": [STRING], "topicParentId":[STRING], "topicUrl": [STRING] }
representations for status code 400
application/json{'errorCode': "EmptyQuery", "errorMessage": "search term is not specified"}

http://www.example.com/api/v1/dictionaries/{dictCode}/search/didyoumean

Methods
GEThttpGetSpelling()

Getting all suggestions for the given word in JSON

request
template params
dictCodestringdictionary code find in dictionaries list

query params
qstringthe word we are searching for
entrynumberintthe number of Did you Mean results [optional, 10 by default, maximum allowed 10]

responses
representations for status code 200
application/json{ "dictionaryCode": [STRING], "searchTerm": [STRING], "suggestions": [STRING ARRAY] }.
GEThttpGetSpellingXml()

Getting all suggestions for the given word in XML

request
template params
dictCodestringdictionary code find in dictionaries list

query params
qstringthe word we are searching for
entrynumberintthe number of Did you Mean results [optional, 10 by default, maximum allowed 10]

responses
representations for status code 200
application/xml<didyoumean> <dictionaryCode>[STRING]</dictionaryCode> <searchTerm>[STRING]</searchTerm> <suggestions>[SUGGESTS ARRAY]</suggestions> </didyoumean>. Suggest structure: <suggestion>[STRING]</suggestion>

http://www.example.com/api/v1/dictionaries/{dictCode}/entries

Methods
GEThttpGet()

Unused

request
template params
dictCodestringdictionary code find in dictionaries list

responses
representations for status code 200
application/json{}
GEThttpGetXml()

Unused

request
template params
dictCodestringdictionary code find in dictionaries list

responses
representations for status code 200
application/xml<entries />

http://www.example.com/api/v1/dictionaries/{dictCode}/entries/{entryId}

Methods
GEThttpGet()

Getting entry information with content in specified format in JSON.

request
template params
dictCodestringdictionary code find in dictionaries list
entryIdstringentry id can be retrieve in search result, topics entries or word of the day preview

query params
formatstringcan be "html" or "xml" (defaults is "html").

responses
representations for status code 404
application/json{'errorCode': "InvalidEntryId", "errorMessage": "Entry '[entry ID]' not found."}
representations for status code 200
application/json{ "topics": [TOPICS ARRAY], "dictionaryCode": [STRING], "entryLabel": [STRING], "entryContent": [STRING], "entryUrl": [STRING], "format": [STRING], "entryId": [STRING] }. Topic structure: { "topicId": [STRING], "topicLabel": [STRING], "topicParentId":[STRING], "topicUrl": [STRING] }
GEThttpGetXml()

Getting entry information with content in specified format in XML.

request
template params
dictCodestringdictionary code find in dictionaries list
entryIdstringentry id can be retrieve in search result, topics entries or word of the day preview

query params
formatstringcan be "html" or "xml" (defaults is "html").

responses
representations for status code 404
application/xml<error> <errorCode>InvalidEntryId</errorCode> <errorMessage>Entry '[entry ID]' not found.</errorMessage> </error>
representations for status code 200
application/xml<entry> <dictionaryCode>[STRING]</dictionaryCode> <entryContent>[STRING]</entryContent> <entryId>[STRING]</entryId> <entryLabel>[STRING]</entryLabel> <entryUrl>[STRING]</entryUrl> <format>[STRING]</format> <topics>[TOPICS]</topics> </entry>. Topic structure: <topic> <topicId>[STRING]</topicId> <topicLabel>[STRING]</topicLabel> <topicParentId>[STRING]</topicParentId> <topicUrl>[STRING]</topicUrl></topic>

http://www.example.com/api/v1/dictionaries/{dictCode}/entries/{entryId}/nearbyentries

Methods
GEThttpGetNearbyEntries()

Getting preceding and following entries of current entry in same dictionary in JSON.

request
template params
dictCodestringdictionary code find in dictionaries list
entryIdstringentry id can be retrieve in search result, topics entries or word of the day preview

query params
entrynumberintthe number of results preceding/following the given entry [optional, 10 by default, maximum allowed 50]

responses
representations for status code 200
application/json{ "dictionaryCode": [STRING], "entryId": [STRING], "nearbyPrecedingEntries": [RESULT ARRAY], "nearbyFollowingEntries": [RESULT ARRAY] }. Result structure: { "entryId": [STRING], "entryLabel": [STRING], "entryUrl": [STRING] }
GEThttpGetNearbyEntriesXml()

Getting preceding and following entries of current entry in same dictionary in XML.

request
template params
dictCodestringdictionary code find in dictionaries list
entryIdstringentry id can be retrieve in search result, topics entries or word of the day preview

query params
entrynumberintthe number of results preceding/following the given entry [optional, 10 by default, maximum allowed 50]

responses
representations for status code 200
application/xml<entry> <dictionaryCode>[STRING]</dictionaryCode> <entryId>[STRING]</entryId> <nearbyPrecedingEntries>[RESULT ARRAY]</nearbyPrecedingEntries> <nearbyFollowingEntries>[RESULT ARRAY]</nearbyFollowingEntries> </entry>. Result structure: <nearbyEntry> <entryId>[STRING]</entryId> <entryLabel>[STRING]</entryLabel> <entryUrl>[STRING]</entryUrl> </nearbyEntry>

http://www.example.com/api/v1/dictionaries/{dictCode}/entries/{entryId}/pronunciations

Methods
GEThttpGetPronunciationsXml()

Getting all pronunciations of the selected entry in XML.

request
template params
dictCodestringdictionary code find in dictionaries list
entryIdstringentry id can be retrieve in search result, topics entries or word of the day preview

query params
langstringfilter pronunciations list by language
formatstringspecified pronunciations file format. can be "mp3" or "ogg" (defaults is "mp3").

responses
representations for status code 200
application/xml<pronunciations> <pronunciation> <dictionaryCode>[STRING]</dictionaryCode> <entryId>[STRING]</entryId> <lang>[STRING]</lang> <url>[STRING]</url> </pronunciation> <pronunciations>
GEThttpGetPronunciations()

Getting all pronunciations of the selected entry in JSON.

request
template params
dictCodestringdictionary code find in dictionaries list
entryIdstringentry id can be retrieve in search result, topics entries or word of the day preview

query params
langstringfilter pronunciations list by language
formatstringspecified pronunciations file format. can be "mp3" or "ogg" (defaults is "mp3").

responses
representations for status code 200
application/json[{"dictionaryCode": [STRING], "entryId": [STRING], "lang": [STRING], "url": [STRING]}]

http://www.example.com/api/v1/dictionaries/{dictCode}/entries/{entryId}/relatedentries

Methods
GEThttpGetRelatedEntries()

Getting all linked entries in same or other dictionaries in JSON.

request
template params
dictCodestringdictionary code find in dictionaries list
entryIdstringentry id can be retrieve in search result, topics entries or word of the day preview

responses
representations for status code 200
application/json{ "dictionaryCode": [STRING], "entryId": [STRING], "relatedEntries": [RELATED ARRAY] }. Related structure: { "dictionaryCode": [STRING], "dictionaryName": [STRING], "entryId": [STRING], "entryLabel": [STRING], "entryUrl": [STRING] }
GEThttpGetRelatedEntriesXml()

Getting all linked entries in same or other dictionaries in XML.

request
template params
dictCodestringdictionary code find in dictionaries list
entryIdstringentry id can be retrieve in search result, topics entries or word of the day preview

responses
representations for status code 200
application/xml<entry> <dictionaryCode>[STRING]</dictionaryCode> <entryId>[STRING]</entryId> <relatedEntries>[RELATED ARRAY]</relatedEntries> </entry>. Related structure: <relatedEntry> <dictionaryCode>[STRING]</dictionaryCode> <dictionaryName>[STRING]</dictionaryName> <entryId>[STRING]</entryId> <entryLabel>[STRING]</entryLabel> <entryUrl>[STRING]</entryUrl> </relatedEntry>

http://www.example.com/api/v1/dictionaries/{dictCode}/wordoftheday

Methods
GEThttpGet()

Getting full entry for Word of the day in JSON.

request
template params
dictCodestringdictionary code find in dictionaries list

query params
daystringdate representation in ISO 8601 format date (YYYY-MM-DD, optional)
formatstringcan be "html" or "xml" (optional) (defaults is "html")

responses
representations for status code 200
application/json{ "dictionaryCode": [STRING], "entryLabel": [STRING], "entryContent": [STRING], "entryUrl": [STRING], "format": [STRING], "entryId": [STRING] }.
GEThttpGetXml()

Getting full entry for Word of the day in XML.

request
template params
dictCodestringdictionary code find in dictionaries list

query params
daystringdate representation in ISO 8601 format date (YYYY-MM-DD, optional)
formatstringcan be "html" or "xml" (optional) (defaults is "html")

responses
representations for status code 200
application/xml<entry> <dictionaryCode>[STRING]</dictionaryCode> <entryContent>[STRING]</entryContent> <entryId>[STRING]</entryId> <entryLabel>[STRING]</entryLabel> <entryUrl>[STRING]</entryUrl> <format>[STRING]</format> </entry>.

http://www.example.com/api/v1/dictionaries/{dictCode}/wordoftheday/preview

Methods
GEThttpGetPreview()

Getting short version for the Word of the day in JSON.

request
template params
dictCodestringdictionary code find in dictionaries list

query params
daystringdate representation in ISO 8601 format date (YYYY-MM-DD, optional)

responses
representations for status code 200
application/json{ "dictionaryCode": [STRING], "entryLabel": [STRING], "htmlEntryPreview": [STRING], "textEntryPreview": [STRING], "entryUrl": [STRING], "format": [STRING], "entryId": [STRING] }.
GEThttpGetPreviewXml()

Getting short version for the Word of the day in XML.

request
template params
dictCodestringdictionary code find in dictionaries list

query params
daystringdate representation in ISO 8601 format date (YYYY-MM-DD, optional)

responses
representations for status code 200
application/xml<entry> <dictionaryCode>[STRING]</dictionaryCode> <htmlEntryPreview>[STRING]</htmlEntryPreview> <textEntryPreview>[STRING]</textEntryPreview> <entryId>[STRING]</entryId> <entryLabel>[STRING]</entryLabel> <entryUrl>[STRING]</entryUrl> <format>[STRING]</format> </entry>.

http://www.example.com/api/v1/documentation/wadl

Methods
GEThttpGetXmlDoc()

REST API documentation in XML format.

request
unspecified
responses
representations for status code 200
text/xml

http://www.example.com/api/v1/documentation/html

Methods
GEThttpGetHtmlDoc()

REST API documentation in HTML format.

request
unspecified
responses
representations for status code 200
text/html

http://www.example.com/api/v1/wordoftheday

Methods
GEThttpGet()

Getting full entry for Word of the day in JSON.

request
query params
daystringdate representation in ISO 8601 format date (YYYY-MM-DD, optional)
formatstringcan be "html" or "xml" (optional) (defaults is "html")

responses
representations for status code 200
application/json{ "dictionaryCode": [STRING], "entryLabel": [STRING], "entryContent": [STRING], "entryUrl": [STRING], "format": [STRING], "entryId": [STRING] }.
GEThttpGetXml()

Getting full entry for Word of the day in XML.

request
query params
daystringdate representation in ISO 8601 format date (YYYY-MM-DD, optional)
formatstringcan be "html" or "xml" (optional) (defaults is "html")

responses
representations for status code 200
application/xml<entry> <dictionaryCode>[STRING]</dictionaryCode> <entryContent>[STRING]</entryContent> <entryId>[STRING]</entryId> <entryLabel>[STRING]</entryLabel> <entryUrl>[STRING]</entryUrl> <format>[STRING]</format> </entry>.

http://www.example.com/api/v1/wordoftheday/preview

Methods
GEThttpGetPreview()

Getting short version for the Word of the day in JSON.

request
query params
daystringdate representation in ISO 8601 format date (YYYY-MM-DD, optional)

responses
representations for status code 200
application/json{ "dictionaryCode": [STRING], "entryLabel": [STRING], "htmlEntryPreview": [STRING], "textEntryPreview": [STRING], "entryUrl": [STRING], "format": [STRING], "entryId": [STRING] }.
GEThttpGetPreviewXml()

Getting short version for the Word of the day in XML.

request
query params
daystringdate representation in ISO 8601 format date (YYYY-MM-DD, optional)

responses
representations for status code 200
application/xml<entry> <dictionaryCode>[STRING]</dictionaryCode> <htmlEntryPreview>[STRING]</htmlEntryPreview> <textEntryPreview>[STRING]</textEntryPreview> <entryId>[STRING]</entryId> <entryLabel>[STRING]</entryLabel> <entryUrl>[STRING]</entryUrl> <format>[STRING]</format> </entry>.