|
|
0 |
**WARNING: This is an experimental API and can change in future.** |
|
|
1 |
|
| 0 |
Here is an example of searching inside a book using the searching within a book using the API. |
2 |
Here is an example of searching inside a book using the searching within a book using the API. |
| 1 |
|
3 |
|
| 2 |
http://ia341335.us.archive.org/fulltext/inside.php?item_id=designevaluation25clin&doc=designevaluation25clin&path=/0/items/designevaluation25clin&q=%22library%20science%22&callback=reply |
4 |
This API is based on changing datanode hosts (i.e. an archive.org item's files live on data hosts which can change). To find the data node host of an item, go to archive.org/metadata/{identifier} and change the prefix `ia800204` to the value of `d1` or `d2` accordingly. The `path` variable in the url may also have to change to `dir` value within the `metadata`: |
|
|
5 |
|
|
|
6 |
https://ia800204.us.archive.org/fulltext/inside.php?item_id=designevaluation25clin&doc=designevaluation25clin&path=/27/items/designevaluation25clin&q=%22library%20science%22 |
| 3 |
|
7 |
|
| 4 |
Information you need to search inside a book, with an example from the above search: |
8 |
Information you need to search inside a book, with an example from the above search: |
| 5 |
|
9 |
|
| 6 |
* hostname: ia341335.us.archive.org (host where the book is stored) |
10 |
* hostname: ia800204.us.archive.org (host where the book is stored) |
| 7 |
* item_id: designevaluation25clin (archive.org item ID) |
11 |
* item_id: designevaluation25clin (archive.org item ID) |
| 8 |
* doc: designevaluation25clin (most times this is the same as the item_id) |
12 |
* doc: designevaluation25clin (most times this is the same as the item_id) |
| 9 |
* path: /0/items/designevaluation25clin (path of the book on this host) |
13 |
* path: /27/items/designevaluation25clin (path of the book on this host) |
| 10 |
* q: "library science" (phrase to search for) |
14 |
* q: "library science" (phrase to search for) |
| 11 |
* callback: reply (optional callback for JSONP) |
15 |
* callback: reply (optional callback for JSONP) |
|
|
16 |
|
|
|
17 |
You can find the hostname and path using the archive.org locator service. |
| 12 |
|
12 |
|
| ... |
|
... |
|
| 21 |
"matches": [ |
21 |
"matches": [ |
| 22 |
... |
28 |
... |
|
|
29 |
] |
|
|
30 |
} ) |
| 23 |
|
31 |
|
| 24 |
The reply includes page count, this is the number of pages that were passed to the OCR. |
32 |
The reply includes page count, this is the number of pages that were passed to the OCR. |
| 25 |
|
33 |
|
| 26 |
Example of a match: |
34 |
Example of a match: |
| 27 |
|
35 |
|
| 28 |
{ |
36 |
{ |
| 29 |
"text": "The first Clinic on Library Applications of Data Processing was held at the Illini Union on the Urbana-Champaign campus of the University of Illinois, April 28 - May 1, 1963 under the sponsorship of the University of Illinois Graduate School of {{{Library}}} {{{Science}}}. Writing in the Foreword to the Clinic proceedings, Herbert Goldhor (1964) provides the rationale for sponsoring such a Clinic:", |
37 |
"text": "The first Clinic on Library Applications of Data Processing was held at the Illini Union on the Urbana-Champaign campus of the University of Illinois, April 28 - May 1, 1963 under the sponsorship of the University of Illinois Graduate School of {{{Library}}} {{{Science}}}. Writing in the Foreword to the Clinic proceedings, Herbert Goldhor (1964) provides the rationale for sponsoring such a Clinic:", |
| 30 |
"par": [ |
38 |
"par": [ |
| 31 |
{ |
39 |
{ |
| 32 |
"page": 14, "page_width": 2134, "page_height": 3328, |
40 |
"page": 14, "page_width": 2134, "page_height": 3328, |
| 33 |
"b": 1090, "t": 700, "r": 2024, "l": 192, |
41 |
"b": 1090, "t": 700, "r": 2024, "l": 192, |
| 34 |
"boxes": [ |
42 |
"boxes": [ |
| 35 |
{ "r": 1560, "b": 957, "t": 899, "l": 1378 }, |
43 |
{ "r": 1560, "b": 957, "t": 899, "l": 1378 }, |
| 36 |
{ "r": 1767, "b": 957, "t": 899, "l": 1587 } |
44 |
{ "r": 1767, "b": 957, "t": 899, "l": 1587 } |
| 37 |
] |
45 |
] |
| 38 |
} |
46 |
} |
| 39 |
] |
47 |
] |
| 40 |
}, |
48 |
} |
| 41 |
|
41 |
|
| ... |
|
... |
|
| 46 |
Hyphenation means words can break across lines and across pages. |
46 |
Hyphenation means words can break across lines and across pages. |
|