1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "fileUrls": [
12 "https://arxiv.org/pdf/2305.10601",
13 "https://arxiv.org/pdf/1706.03762",
14 "https://raw.githubusercontent.com/microsoft/markitdown/main/packages/markitdown/tests/test_files/test.docx",
15 "https://raw.githubusercontent.com/microsoft/markitdown/main/packages/markitdown/tests/test_files/test.xlsx",
16 "https://raw.githubusercontent.com/microsoft/markitdown/main/packages/markitdown/tests/test_files/test.pptx",
17 "https://raw.githubusercontent.com/microsoft/markitdown/main/packages/markitdown/tests/test_files/test.json",
18 "https://raw.githubusercontent.com/microsoft/markitdown/main/README.md",
19 "https://raw.githubusercontent.com/apify/apify-sdk-python/master/README.md",
20 "https://people.sc.fsu.edu/~jburkardt/data/csv/airtravel.csv",
21 "https://www.ietf.org/rfc/rfc2119.txt",
22 "https://www.gutenberg.org/cache/epub/11/pg11.txt",
23 "https://example.com"
24 ],
25 "includePageBreaks": false,
26 "truncateChars": 0
27};
28
29
30const run = await client.actor("ntriqpro/pdf-to-markdown").call(input);
31
32
33console.log('Results from dataset');
34console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
35const { items } = await client.dataset(run.defaultDatasetId).listItems();
36items.forEach((item) => {
37 console.dir(item);
38});
39
40