Stats API
The Stats API is composed of 3 endpoints:
- Statistics — check your project’s translation statistics UPDATED
- Charts — get your project’s stats as a PNG image
- Top Translators — get your project’s top translators
🔗Stats
This endpoint is accessible by both read-write and read-only Project API keys and returns a project’s translation statistics.
/api/projects/:project_token/stats.format [GET]
where format is one of json, xml or yaml.
🔗Optional Parameters
file: File ID to filter by.date_range: Time since the strings were added. Accepts a string such as1.day.ago,27.days.ago,3.months.ago,2.years.ago. Will list segments added since 1 day ago, 27 days ago, etc.modification_date_range: Time since the translation were modified for a language. Accepts a string such as1.day.ago,27.days.ago,3.months.ago,2.years.ago. Will list modified segments since 1 day ago, 27 days ago, etc.category: Category ID to filter by.label: Label ID to filter by.type: If not blank, can be one ofstring,plural,array,boolean. Will filters segments querying these attributes.user: If not blank, can be filled with a user ID, ornot-userID. For instance: my user ID is1234. I can count the segments I translated last withuser=1234. I can see the segments I didn’t translate last withnot-1234.
Examples:
- yaml: https://webtranslateit.com/api/projects/98e71ee45042066f1053ed900b4e8f4ec1f98451/stats.yaml
- xml: https://webtranslateit.com/api/projects/98e71ee45042066f1053ed900b4e8f4ec1f98451/stats.xml
- json: https://webtranslateit.com/api/projects/98e71ee45042066f1053ed900b4e8f4ec1f98451/stats.json?file=1943
Data structure in YAML:
---
fr:
generated_at: 2010-03-06 21:13:27.919203 Z
stale: false
count_strings: 1021 # string count
count_strings_done: 956
count_strings_to_proofread: 65
count_strings_to_verify: 0
count_strings_to_translate: 0
count_strings_not_translatable: 25
wc_count_strings: 8416 # word count
wc_count_strings_done: 7783
wc_count_strings_to_proofread: 633
wc_count_strings_to_verify: 0
wc_count_strings_to_translate: 0
wc_count_strings_not_translatable: 230
char_count_strings: 501243 # character count
char_count_strings_done: 70783
char_count_strings_to_proofread: 6033
char_count_strings_to_verify: 0
char_count_strings_to_translate: 0
char_count_strings_not_translatable: 2300
ru:
generated_at: 2010-03-08 21:06:04.209397 Z
stale: false
count_strings: 1021
count_strings_done: 124
...
🔗Charts
This endpoint is accessible by both read-write and read-only Project API keys and returns a project’s translation statistics.
/api/projects/:project_token/charts.png [GET]
Example:
https://webtranslateit.com/api/projects/98e71ee45042066f1053ed900b4e8f4ec1f98451/charts.png

🔗Top Translators
This endpoint is accessible by the read-write Project API key and returns a list of most active translators in a project.
/api/projects/:project_token/top_translators.format [GET]
Where format is one of json, xml or yaml.
You can choose to list your top translators by period of time by adding the optional parameter date, which can be one of this_week, last_week, this_month, last_month and this_year.
The endpoint returns the following information:
- The contributor’s rank for that period,
- The contributor’s email address,
- The contributor’s name if known,
- The ID of the membership (useful to manage memberships on the Users API),
- The amount of the contributor’s changes made during that period,
- The contributor’s language,
- URL to the contributor’s avatar.
You can pass an optional ?locale=xx argument containing a locale code to filter the Top Translators by language.
Data structure in YAML:
- :rank: 1
:avatar: https://secure.gravatar.com/avatar/46ff6de645e2045f8ce6a3d640c1d48c.png?d=identicon&r=PG
:email: email@googlemail.com
:name: John Doe
:membership_id: 1234
:changes: 22
:locale: sv
- :rank: 2
:avatar: https://secure.gravatar.com/avatar/1961fef04b12f9366acd7c0f7ce0297b.png?d=identicon&r=PG
:email: email@gmail.com
:name: Jane Doe
:membership_id: 3456
:changes: 18
:locale: ru
- :rank: 3
:avatar: https://secure.gravatar.com/avatar/a80d19a153623f4d9dc5f1365858da37.png?d=identicon&r=PG
:email: email2@gmail.com
:name: ""
:membership_id: 6789
:changes: 3
:locale: fr