Exporting Cards to PDF

Download folders or individual cards as PDF files for backup.

You may want to download some or all of your Guru cards to PDF files, for example as part of a business continuity plan in the unlikely event that Guru experiences downtime. There are two approaches: export whole folders, or export individual cards.

Method 1: Download folders to PDF

Get a list of folders:

curl -u $GURU_USER:$GURU_TOKEN https://api.getguru.com/api/v1/folders

The response is an array of folder objects, truncated here to the fields you need:

[
  {
    "home": true,
    "id": "c11cdef1-5bd5-4bc9-ba29-98625a2f1480",
    "title": "My Cool Collection",
    "collection": {
      "name": "My Cool Collection",
      "id": "f1e1b13f-b18f-490c-be0c-bef201bdd877",
      ...
    },
    "slug": "Tkdp84Bc/My-Cool-Collection",
    "numberOfFacts": 473
  },
  ...
]

Loop through each folder ID and call the endpoint below to download that folder's contents as a PDF:

curl -u $GURU_USER:$GURU_TOKEN -O https://api.getguru.com/api/v1/folders/{folderId}/pdf

For folders too large to export synchronously, see Exporting Folders to PDF Asynchronously.

Method 2: Download cards to PDF

Alternatively, download individual cards. Get a list of cards:

curl -u $GURU_USER:$GURU_TOKEN https://api.getguru.com/api/v1/cards/

The response is an array of card objects, truncated here to the most relevant fields:

[
  {
    "id": "eff59866-d332-4bc6-be0a-0fac7a199eb5",
    "preferredPhrase": "External Job Test",
    "slug": "cz8Ajp7i/External-Job-Test",
    "content": "<h1>Job Description</h1><p>External Job Description</p>...",
    "collection": {
      "id": "064c4e50-d274-4fb8-8bfd-b2e9d4d35d04",
      "name": "Guru - External Job Board",
      ...
    },
    "verificationState": "TRUSTED",
    "cardType": "CARD",
    ...
  }
]

Loop through each card ID and call:

curl -u $GURU_USER:$GURU_TOKEN -O https://api.getguru.com/api/v1/cards/{card_id}/pdf