Version at: 16/06/2021, 00:46 vs. version at: 16/06/2021, 00:47
11# API
22
33Briefly, ...
44
55## For one sentence
66
77https://tatoeba.org/eng/api_v0/sentence/1
88
99## Search results
1010
1111### Search: Canadian (not an exact match, so gets "Canadians", too.)
1212from: eng
1313to: jpn
1414list: 907
1515direct translations only
1616
1717https://tatoeba.org/eng/api_v0/search?from=eng&list=907&query=Canadian&trans_filter=limit&trans_link=direct&trans_to=jpn&to=jpn
1818
1919### Search: Boston
2020from: eng
2121to: jpn
2222audio: yes
2323sort: created
2424(direct and indirect translations)
2525
26https://dev.tatoeba.org/eng/api_v0/search?from=eng&trans_filter=limit&query=Boston&sort=created&has_audio=yes&trans_to=jpn&to=jpn
26https://tatoeba.org/eng/api_v0/search?from=eng&trans_filter=limit&query=Boston&sort=created&has_audio=yes&trans_to=jpn&to=jpn
2727
2828### Search: =play (exact match)
2929from: eng
3030to: jpn
3131list: 907
3232sort: words
3333direct translations only
3434
35https://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
35https://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
3636
3737
3838### Other
3939
4040Do an advanced search, copy the resulting URL and change the first part of the URL to match the first part of the API URL.
4141
4242https://tatoeba.org/en/sentences/advanced_search
4343
4444## Paging
4545
4646You can find out how many pages there thanks to the count and the perPage in the paging information.
4747
4848https://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
4949
5050 "paging": {
5151 "Sentences": {
5252 "finder": "all",
5353 "page": 2,
5454 "current": 8,
5555 "count": 18,
5656 "perPage": 10,
5757 "start": 11,
5858 "end": 18,
5959 "prevPage": true,
6060 "nextPage": false,
6161 "pageCount": 2,
6262 "sort": null,
6363 "direction": null,
6464 "limit": null,
6565 "sortDefault": false,
6666 "directionDefault": false,
6767 "scope": null,
6868 "completeSort": []
6969 }
7070 },
7171
7272
7373
7474The properties you'll be interested in are:
7575
7676page - this is the current page.
7777current - this is the number of items displayed in the current page.
7878count - this is the total number of results.
7979perPage - this is the number of results per page.
8080To know how many pages there are in total, you divide count by perPage and round up to the upper integer.
8181
8282
8383
8484
8585## For information on the API, ...
8686
8787See https://github.com/Tatoeba/tatoeba2/issues/2669
8888
8989
9090
diff view generated by jsdifflib

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

# 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://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


### Other

Do an advanced search, copy the resulting URL and change the first part of the URL to match the first part of the API URL.

https://tatoeba.org/en/sentences/advanced_search

## 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:47

# 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://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://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://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


### Other

Do an advanced search, copy the resulting URL and change the first part of the URL to match the first part of the API URL.

https://tatoeba.org/en/sentences/advanced_search

## 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.