How-To

Press

MyMemory: API technical specifications

Quick start with our REST API!

Our REST API has been designed to be as easy as possible to implement. It is similar to the Google Translate API, extended with MyMemory specific parameters and lets you search and contribute to MyMemory archives.


Get

Searches MyMemory for matches against a segment.

Free, anonymous usage is limited to 100 requests/day.
Provide a valid email ('de' parameter), where we can reach you in case of troubles, and enjoy 1000 requests/day.
Are you a CAT tool maker? Get whitelisted! Write us and get 3000 requests/day!

If you are interested in even larger volumes, have a look at our Mashape plans!

Call example:

http://api.mymemory.translated.net/get?q=Hello World!&langpair=en|it

Parameter description:

Parameter Description Type Example value
q The sentence you want to translate. Use UTF-8.
Max 500 bytes
Mandatory Hello World!
langpair Source and language pair, separated by the | symbol. Use ISO standard names or RFC3066 Mandatory en|it
of Output format Optional json (default), tmx, serialized php array
mt Enables Machine Translation in results.
You can turn it off if you want just human segments
Optional 1 (default), 0
key Authenticates the request; matches from your private TM are returned too.
Get your key here or use the keygen API
Optional
onlyprivate If your request is authenticated, returns only matches from your private TM Optional 0 (default), 1
ip The IP of the end user generating the request.
Recommended for CAT tools and high volume usage
Originating IP is always overridden by X-Forwarded-For header, if the latter is set.
Optional 93.81.217.71
de A valid email where we can reach you in case of troubles.
Recommended for CAT tools and high volume usage
Optional user@yourdomain.com
user Authenticates the request; matches from your private TM are returned too. Optional, but needs the key parameter.
Kept for backward compatibility only: now the key parameter alone is sufficient


Keygen

Generates the key associated with a username.

Call example:

http://api.mymemory.translated.net/keygen?user=username&pass=password

Parameter description:

Parameter Description Type Example value
user The username whose key we want to generate. Mandatory
pass The password associated with the username. Mandatory


Set

Contributes a translation unit (segment and translation) in some language pair to MyMemory.
Without specifying any key parameter, the contribution is available for everybody (Thank you!).

Call example:

http://api.mymemory.translated.net/set?seg=Hello World!&tra=Ciao mondo!&langpair=en|it

Parameter description:

Parameter Description Type Example value
seg The sentence you want to add in source language. Use UTF-8. Mandatory Hello World
tra The sentence you want to add in target language. Use UTF-8. Mandatory Ciao Mondo
langpair Source and language pair, separated by the | symbol. Use ISO standard names or RFC3066 Mandatory en|it
key Authenticates the request; the translation will be submitted into your private TM only.
Get your key here or use the keygen API
Optional
de A valid email where we can reach you in case of troubles.
Recommended for CAT tools and high volume usage
Optional user@yourdomain.com


Note: We also have an API for on-demand human translation services.