Version at: 16/06/2021, 00:41 vs. version at: 16/06/2021, 00:42
1# API
2
13Briefly, ...
24
35## For one sentence
46
57https://tatoeba.org/eng/api_v0/sentence/1
68
79## Search results
810
911### Search: Canadian (not an exact match, so gets "Canadians", too.)
1012from: eng
1113to: jpn
1214list: 907
1315direct translations only
1416
1517https://dev.tatoeba.org/eng/api_v0/search?from=eng&list=907&query=Canadian&trans_filter=limit&trans_link=direct&trans_to=jpn&to=jpn
1618
1719### Search: Boston
1820from: eng
1921to: jpn
2022audio: yes
2123sort: created
2224(direct and indirect translations)
2325
2426https://dev.tatoeba.org/eng/api_v0/search?from=eng&trans_filter=limit&query=Boston&sort=created&has_audio=yes&trans_to=jpn&to=jpn
2527
2628### Search: =play (exact match)
2729from: eng
2830to: jpn
2931list: 907
3032sort: words
3133direct translations only
3234
3335https://dev.tatoeba.org/eng/api_v0/search?from=eng&list=907&query=%3Dplay&sort=created&trans_filter=limit&trans_link=direct&trans_to=jpn&to=jpn
3436
3537## Paging
3638
3739You can find out how many pages there thanks to the count and the perPage in the paging information.
3840
3941https://dev.tatoeba.org/eng/api_v0/search?from=eng&list=907&query=Canadian&trans_filter=limit&trans_link=direct&trans_to=jpn&to=jpn&page=2
4042
4143 "paging": {
4244 "Sentences": {
4345 "finder": "all",
4446 "page": 2,
4547 "current": 8,
4648 "count": 18,
4749 "perPage": 10,
4850 "start": 11,
4951 "end": 18,
5052 "prevPage": true,
5153 "nextPage": false,
5254 "pageCount": 2,
5355 "sort": null,
5456 "direction": null,
5557 "limit": null,
5658 "sortDefault": false,
5759 "directionDefault": false,
5860 "scope": null,
5961 "completeSort": []
6062 }
6163 },
6264
6365
6466
6567The properties you'll be interested in are:
6668
6769page - this is the current page.
6870current - this is the number of items displayed in the current page.
6971count - this is the total number of results.
7072perPage - this is the number of results per page.
7173To know how many pages there are in total, you divide count by perPage and round up to the upper integer.
7274
7375
7476
7577
7678## For information on the API, ...
7779
7880See https://github.com/Tatoeba/tatoeba2/issues/2669
7981
8082
8183
diff view generated by jsdifflib

Version at: 16/06/2021, 00:41

Briefly, ...

## For one sentence

https://tatoeba.org/eng/api_v0/sentence/1

## Search results

### Search: Canadian (not an exact match, so gets "Canadians", too.)
from: eng
to: jpn
list: 907
direct translations only

https://dev.tatoeba.org/eng/api_v0/search?from=eng&list=907&query=Canadian&trans_filter=limit&trans_link=direct&trans_to=jpn&to=jpn

### Search: Boston
from: eng
to: jpn
audio: yes
sort: created
(direct and indirect translations)

https://dev.tatoeba.org/eng/api_v0/search?from=eng&trans_filter=limit&query=Boston&sort=created&has_audio=yes&trans_to=jpn&to=jpn

### Search: =play (exact match)
from: eng
to: jpn
list: 907
sort: words
direct translations only

https://dev.tatoeba.org/eng/api_v0/search?from=eng&list=907&query=%3Dplay&sort=created&trans_filter=limit&trans_link=direct&trans_to=jpn&to=jpn

## Paging

You can find out how many pages there thanks to the count and the perPage in the paging information.

https://dev.tatoeba.org/eng/api_v0/search?from=eng&list=907&query=Canadian&trans_filter=limit&trans_link=direct&trans_to=jpn&to=jpn&page=2

  "paging": {
    "Sentences": {
      "finder": "all",
      "page": 2,
      "current": 8,
      "count": 18,
      "perPage": 10,
      "start": 11,
      "end": 18,
      "prevPage": true,
      "nextPage": false,
      "pageCount": 2,
      "sort": null,
      "direction": null,
      "limit": null,
      "sortDefault": false,
      "directionDefault": false,
      "scope": null,
      "completeSort": []
    }
  },



The properties you'll be interested in are:

page - this is the current page.
current - this is the number of items displayed in the current page.
count - this is the total number of results.
perPage - this is the number of results per page.
To know how many pages there are in total, you divide count by perPage and round up to the upper integer.




## For information on the API, ...

See https://github.com/Tatoeba/tatoeba2/issues/2669


version at: 16/06/2021, 00:42

# API

Briefly, ...

## For one sentence

https://tatoeba.org/eng/api_v0/sentence/1

## Search results

### Search: Canadian (not an exact match, so gets "Canadians", too.)
from: eng
to: jpn
list: 907
direct translations only

https://dev.tatoeba.org/eng/api_v0/search?from=eng&list=907&query=Canadian&trans_filter=limit&trans_link=direct&trans_to=jpn&to=jpn

### Search: Boston
from: eng
to: jpn
audio: yes
sort: created
(direct and indirect translations)

https://dev.tatoeba.org/eng/api_v0/search?from=eng&trans_filter=limit&query=Boston&sort=created&has_audio=yes&trans_to=jpn&to=jpn

### Search: =play (exact match)
from: eng
to: jpn
list: 907
sort: words
direct translations only

https://dev.tatoeba.org/eng/api_v0/search?from=eng&list=907&query=%3Dplay&sort=created&trans_filter=limit&trans_link=direct&trans_to=jpn&to=jpn

## Paging

You can find out how many pages there thanks to the count and the perPage in the paging information.

https://dev.tatoeba.org/eng/api_v0/search?from=eng&list=907&query=Canadian&trans_filter=limit&trans_link=direct&trans_to=jpn&to=jpn&page=2

  "paging": {
    "Sentences": {
      "finder": "all",
      "page": 2,
      "current": 8,
      "count": 18,
      "perPage": 10,
      "start": 11,
      "end": 18,
      "prevPage": true,
      "nextPage": false,
      "pageCount": 2,
      "sort": null,
      "direction": null,
      "limit": null,
      "sortDefault": false,
      "directionDefault": false,
      "scope": null,
      "completeSort": []
    }
  },



The properties you'll be interested in are:

page - this is the current page.
current - this is the number of items displayed in the current page.
count - this is the total number of results.
perPage - this is the number of results per page.
To know how many pages there are in total, you divide count by perPage and round up to the upper integer.




## For information on the API, ...

See https://github.com/Tatoeba/tatoeba2/issues/2669


Note

The lines in green are the lines that have been added in the new version. The lines in red are those that have been removed.