Batch string download by IDs

Is there any progress in introducing an API endpoint where one can get a batch of strings by IDs? If I have 100 IDs, currently the only way is to loop through them and make a separate request for every single ID, that is pretty inefficient.

Hi there,

We support String Batch Operations:

Or do you mean something else?

I am not sure I understand, how the string batch operations are related to what I am asking for. I need to download certain strings (the original string, and the translation in a certain language), and I have an array of string IDs. String batch operations endpoint is for updating strings, not retrieving them.

If I have a list of string IDs, I can use “List Language Translations” endpoint to retrieve the translations. But the irony is that there seems to be no way how to retrieve a list of source strings, given string IDs. “List Strings” endpoint would be the most reasonable place to look for this functionality, but there is no stringIds parameter. So, apparently, there is no better way than to do 100 “Get String” requests.

Hi @Passiday, You’re right, at the moment there’s no way to fetch multiple strings by IDs in a single request. The usual workaround is to loop through your array of IDs and call Get String for each one. Many users handle this by scripting the calls so the requests are sent in sequence (or in parallel) and the results are collected together

1 Like

Thanks @Roman , for your clarification. I see that you are from the Crowdin Team, maybe you have any insight about whether there are any plans to introduce a way to download several strings at once, by IDs. That would even not require a major version update, that would be just an additional parameter for “List Strings” endpoint, or CroQL field on what to query on. It’s just that the functionality that is required in a project I am working on, needs to retrieve hundreds or, in some cases, thousands of strings (given their IDs). Having to make a separate request for each is both very slow, and it also puts unnecessary high load on API’s servers.

Hi @Passiday,

As Roman mentioned, there isn’t a dedicated endpoint to fetch multiple strings by ID in a single request now. At this time, the solution he described (looping through your array of IDs and calling Get String) is the correct and only way to retrieve the source strings you need.

We understand that processing a large number of strings one by one can be time-consuming. This is why many of our users write a script to automate these requests.

1 Like

Thanks, Iliana. I just hope that one day it will be possible via one request. I know one can write a script to automate series of requests but that basically means there is no way to make an app where user selects a set (associated string IDs stored in a database) and all the respective strings are loaded at that moment. There would be a long “Please wait” routine. Doable, but poor UX.

I’ll keep crossing my fingers to see implementation in the List Strings endpoint, both via stringIds and croq, some day.