# WikiTree

> Look up genealogy data from WikiTree, the free, collaborative, single-family-tree of the world. Fetch person and free-space profiles, biographies, and photos; walk ancestors, descendants, relatives, and nuclear families; trace the connection between any two people; explore DNA-test connections; and search the tree by name, dates, and place. Uses WikiTree's keyless public API. No account or API key required.

App · Misc References · 14 actions. Web page: https://docs.lodol.com/docs/integrations/wikitree

## Actions

### Get ancestors

Get multiple generations of a person's ancestors, following the father and mother links back through the tree.

**Inputs**

- Profile (`key`, text, required): The WikiTree ID (the name after '/wiki/' in a profile's URL, e.g. 'Clemens-1') or the numeric Person/User ID.
- Generations back (`depth`, number): How many generations of ancestors to return (1 = parents, 2 = grandparents, up to 10). From 1 to 10. Default: `5`.
- Fields to return (`fields`, text): Which profile fields to include in the result. Leave empty to return WikiTree's default set of fields. One or more of: `Id` (Person ID), `PageId` (Page ID), `Name` (WikiTree ID), `FirstName` (First name), `MiddleName` (Middle name), `MiddleInitial` (Middle initial), `LastNameAtBirth` (Last name at birth), `LastNameCurrent` (Current last name), `LastNameOther` (Other last names), `Nicknames`, and 33 more.
- Biography format (`bio_format`, text): Format for the biography text when the Bio field is returned: wiki markup, rendered HTML, or both. One of: `wiki` (Wiki markup), `html` (Rendered HTML), `both` (Both wiki and HTML). Default: `wiki`.
- Follow merged / redirected profiles (`resolve_redirect`, true/false): If a requested profile has been merged or redirected, follow it to its final destination and return that profile instead. Default: `true`.

**Outputs**

- `result` (object)

**Example output**

```json
{
  "result": {
    "ancestors": [
      {
        "Father": 3640,
        "Id": 3636,
        "Mother": 3641,
        "Name": "Adams-35"
      },
      {
        "Father": 3642,
        "Id": 3640,
        "Mother": 3643,
        "Name": "Adams-38"
      },
      {
        "Father": 3660,
        "Id": 3641,
        "Mother": 3661,
        "Name": "Bass-1"
      }
    ],
    "status": 0,
    "user_id": 3636
  }
}
```

### Get biography

Get the biography text of a Person profile, as wiki markup, rendered HTML, or both.

**Inputs**

- Profile (`key`, text, required): The WikiTree ID (the name after '/wiki/' in a profile's URL, e.g. 'Clemens-1') or the numeric Person/User ID.
- Biography format (`bio_format`, text): Format for the biography text when the Bio field is returned: wiki markup, rendered HTML, or both. One of: `wiki` (Wiki markup), `html` (Rendered HTML), `both` (Both wiki and HTML). Default: `wiki`.
- Follow merged / redirected profiles (`resolve_redirect`, true/false): If a requested profile has been merged or redirected, follow it to its final destination and return that profile instead. Default: `true`.

**Outputs**

- `result` (object)

**Example output**

```json
{
  "result": {
    "Id": 5185,
    "Name": "Clemens-1",
    "PageId": 7146,
    "bio": "== Biography ==\nSamuel Langhorne Clemens, better known by his pen name Mark Twain, was an American writer and humorist.",
    "status": 0,
    "user_id": 5185
  }
}
```

### Get categories

Get the list of categories a profile belongs to.

**Inputs**

- Profile (`key`, text, required): The WikiTree ID (the name after '/wiki/' in a profile's URL, e.g. 'Clemens-1') or the numeric Person/User ID. For a Free-Space Profile, prefix the name with 'Space:'.

**Outputs**

- `result` (object)

**Example output**

```json
{
  "result": {
    "categories": [
      "Notables",
      "Lewis_and_Clark_Expedition",
      "Lemhi_Shoshone"
    ],
    "page_name": "Shoshone-1",
    "status": 0
  }
}
```

### Get connection between two profiles

Find how two people are connected and the degrees of separation between them, returning the path of profiles that links them.

**Inputs**

- Profiles (`keys`, text, required): Exactly two WikiTree IDs or numeric IDs, separated by a comma (e.g. 'Adams-35,Windsor-1').
- Kind of connection (`relation`, text): Which kind of connection path to find. One of: `0` (Shortest path), `1` (Shortest path, excluding spouses), `2` (Through a common ancestor), `3` (Through a common descendant), `4` (Through fathers only), `5` (Through mothers only), `6` (Through Y-DNA), `7` (Through mitochondrial DNA), `8` (Through autosomal DNA), `11` (Through ancestors, or any relation as a fallback). Default: `0`.
- Fields to return (`fields`, text): Which profile fields to include in the result. Leave empty to return WikiTree's default set of fields. One or more of: `Id` (Person ID), `PageId` (Page ID), `Name` (WikiTree ID), `FirstName` (First name), `MiddleName` (Middle name), `MiddleInitial` (Middle initial), `LastNameAtBirth` (Last name at birth), `LastNameCurrent` (Current last name), `LastNameOther` (Other last names), `Nicknames`, and 33 more.
- Profiles to avoid (`ignore_ids`, text): Numeric IDs to exclude from the path, separated by commas.
- Only the distance (`nopath`, true/false): Return only the number of steps between the two profiles, not the full path. Default: `false`.

**Outputs**

- `result` (object)

**Example output**

```json
{
  "result": {
    "path": [
      {
        "Id": 3636,
        "Name": "Adams-35"
      },
      {
        "Id": 3586,
        "Name": "Adams-10",
        "pathStatus": "20",
        "pathType": "child"
      }
    ],
    "pathLength": 16,
    "relation": 0,
    "status": "",
    "userid1": 3636,
    "userid2": 64662
  }
}
```

### Get descendants

Get multiple generations of a person's descendants, following the children links down through the tree.

**Inputs**

- Profile (`key`, text, required): The WikiTree ID (the name after '/wiki/' in a profile's URL, e.g. 'Clemens-1') or the numeric Person/User ID.
- Generations forward (`depth`, number): How many generations of descendants to return (1 = children, 2 = grandchildren, up to 5). From 1 to 5. Default: `2`.
- Fields to return (`fields`, text): Which profile fields to include in the result. Leave empty to return WikiTree's default set of fields. One or more of: `Id` (Person ID), `PageId` (Page ID), `Name` (WikiTree ID), `FirstName` (First name), `MiddleName` (Middle name), `MiddleInitial` (Middle initial), `LastNameAtBirth` (Last name at birth), `LastNameCurrent` (Current last name), `LastNameOther` (Other last names), `Nicknames`, and 33 more.
- Biography format (`bio_format`, text): Format for the biography text when the Bio field is returned: wiki markup, rendered HTML, or both. One of: `wiki` (Wiki markup), `html` (Rendered HTML), `both` (Both wiki and HTML). Default: `wiki`.
- Follow merged / redirected profiles (`resolve_redirect`, true/false): If a requested profile has been merged or redirected, follow it to its final destination and return that profile instead. Default: `true`.

**Outputs**

- `result` (object)

**Example output**

```json
{
  "result": {
    "descendants": {
      "3586": {
        "Father": 3636,
        "Id": 3586,
        "Mother": 3637,
        "Name": "Adams-10"
      },
      "3588": {
        "Father": 3636,
        "Id": 3588,
        "Mother": 3637,
        "Name": "Adams-11"
      }
    },
    "status": 0,
    "user_name": "Adams-35"
  }
}
```

### Get DNA tests by test-taker

Get the DNA tests a person has taken, with test types and haplogroups.

**Inputs**

- Profile (`key`, text, required): The WikiTree ID (the name after '/wiki/' in a profile's URL, e.g. 'Clemens-1') or the numeric Person/User ID.

**Outputs**

- `result` (object)

**Example output**

```json
{
  "result": {
    "dnaTests": [
      {
        "assigned": "2020-04-02 13:40:30",
        "assignedBy": "Whitten-1",
        "dna_id": "1",
        "dna_name": "23andMe",
        "dna_slug": "23andme_audna",
        "dna_type": "auDNA",
        "haplo": "R1b1b2a1a1*",
        "haplom": "U5a1a1",
        "markers": "0"
      }
    ],
    "page_name": "Whitten-1",
    "status": 0
  }
}
```

### Get DNA tests connected to a profile

Get the DNA tests connected to a profile: tests taken by the person or by relatives that cover this profile.

**Inputs**

- Profile (`key`, text, required): The WikiTree ID (the name after '/wiki/' in a profile's URL, e.g. 'Clemens-1') or the numeric Person/User ID.

**Outputs**

- `result` (object)

**Example output**

```json
{
  "result": {
    "dnaTests": [
      {
        "assigned": "2020-04-02 13:40:30",
        "assignedBy": "Whitten-1",
        "dna_id": "1",
        "dna_name": "23andMe",
        "dna_slug": "23andme_audna",
        "dna_type": "auDNA",
        "haplo": "R1b1b2a1a1*",
        "haplom": "U5a1a1",
        "taker": {
          "Id": "32",
          "Name": "Whitten-1",
          "PageId": "24"
        }
      }
    ],
    "page_name": "Whitten-1",
    "status": 0
  }
}
```

### Get people

Get many profiles at once by ID, optionally pulling in their ancestors, descendants, and nuclear family. Page through large result sets.

**Inputs**

- Profiles (`keys`, text, required): One or more WikiTree IDs or numeric IDs, separated by commas.
- Fields to return (`fields`, text): Which profile fields to include in the result. Leave empty to return WikiTree's default set of fields. One or more of: `Id` (Person ID), `PageId` (Page ID), `Name` (WikiTree ID), `FirstName` (First name), `MiddleName` (Middle name), `MiddleInitial` (Middle initial), `LastNameAtBirth` (Last name at birth), `LastNameCurrent` (Current last name), `LastNameOther` (Other last names), `Nicknames`, and 30 more.
- Biography format (`bio_format`, text): Format for the biography text when the Bio field is returned: wiki markup, rendered HTML, or both. One of: `wiki` (Wiki markup), `html` (Rendered HTML), `both` (Both wiki and HTML). Default: `wiki`.
- Ancestor generations (`ancestors`, number): How many generations of ancestors to also include for each profile (0–10). From 0 to 10. Default: `0`.
- Descendant generations (`descendants`, number): How many generations of descendants to also include for each profile (0–5). From 0 to 5. Default: `0`.
- Nuclear-family generations (`nuclear`, number): How many generations of nuclear family (parents, siblings, spouses, children) to include (0–5). From 0 to 5. Default: `0`.
- Minimum generation (`min_generation`, number): Only return related profiles at or beyond this generation number. At least 1.
- Include siblings (`siblings`, true/false): Include siblings of the requested profiles. Default: `false`.
- How many people (`limit`, number): Maximum number of profiles to return (1–1000). From 1 to 1000. Default: `100`.
- Start at (`start`, number): Index of the first profile to return (0-based). At least 0. Default: `0`.

**Outputs**

- `result` (object)

**Example output**

```json
{
  "result": {
    "people": {
      "5185": {
        "BirthDate": "1835-11-30",
        "DeathDate": "1910-04-21",
        "FirstName": "Samuel",
        "Id": 5185,
        "LastNameAtBirth": "Clemens",
        "Name": "Clemens-1"
      },
      "64662": {
        "BirthDate": "1926-04-21",
        "DeathDate": "2022-09-08",
        "FirstName": "Elizabeth",
        "Id": 64662,
        "LastNameAtBirth": "Windsor",
        "Name": "Windsor-1"
      }
    },
    "resultByKey": {
      "Clemens-1": {
        "Id": 5185
      },
      "Windsor-1": {
        "Id": 64662
      }
    },
    "status": ""
  }
}
```

### Get person

Get a single Person profile by its WikiTree ID or numeric ID. Like Get profile, but only for Person profiles.

**Inputs**

- Profile (`key`, text, required): The WikiTree ID (the name after '/wiki/' in a profile's URL, e.g. 'Clemens-1') or the numeric Person/User ID.
- Fields to return (`fields`, text): Which profile fields to include in the result. Leave empty to return WikiTree's default set of fields. One or more of: `Id` (Person ID), `PageId` (Page ID), `Name` (WikiTree ID), `FirstName` (First name), `MiddleName` (Middle name), `MiddleInitial` (Middle initial), `LastNameAtBirth` (Last name at birth), `LastNameCurrent` (Current last name), `LastNameOther` (Other last names), `Nicknames`, and 33 more.
- Biography format (`bio_format`, text): Format for the biography text when the Bio field is returned: wiki markup, rendered HTML, or both. One of: `wiki` (Wiki markup), `html` (Rendered HTML), `both` (Both wiki and HTML). Default: `wiki`.
- Follow merged / redirected profiles (`resolve_redirect`, true/false): If a requested profile has been merged or redirected, follow it to its final destination and return that profile instead. Default: `true`.

**Outputs**

- `result` (object)

**Example output**

```json
{
  "result": {
    "person": {
      "BirthDate": "1835-11-30",
      "DeathDate": "1910-04-21",
      "FirstName": "Samuel",
      "Gender": "Male",
      "Id": 5185,
      "IsLiving": 0,
      "LastNameAtBirth": "Clemens",
      "LastNameCurrent": "Clemens",
      "MiddleName": "Langhorne",
      "Name": "Clemens-1",
      "PageId": 7146,
      "Privacy": 60
    },
    "status": 0
  }
}
```

### Get photos

Get the photos attached to a profile, with image URLs. Page through and sort the results.

**Inputs**

- Profile (`key`, text, required): The WikiTree ID (the name after '/wiki/' in a profile's URL, e.g. 'Clemens-1') or the numeric Person/User ID. For a Free-Space Profile, prefix the name with 'Space:'.
- How many photos (`limit`, number): How many photos to return (1–100). From 1 to 100. Default: `10`.
- Start at (`start`, number): Index of the first photo to return (0-based). At least 0. Default: `0`.
- Sort by (`order`, text): How to order the returned photos. One of: `PageId` (Page ID), `Uploaded` (Upload time), `ImageName` (Image file name), `Date` (Photo date). Default: `PageId`.
- Follow merged / redirected profiles (`resolve_redirect`, true/false): If a requested profile has been merged or redirected, follow it to its final destination and return that profile instead. Default: `true`.

**Outputs**

- `result` (object)

**Example output**

```json
{
  "result": {
    "limit": 10,
    "order": "PageId",
    "page_name": "Clemens-1",
    "photos": [
      {
        "Date": "1860-00-00",
        "Height": "750",
        "ImageName": "1860-_Clemens.jpg",
        "PageId": "7299",
        "Title": "Samuel L. Clemens",
        "Type": "photo",
        "URL": "/photo/jpg/1860-_Clemens",
        "URL_300": "/photo/300px/1860-_Clemens.jpg",
        "URL_75": "/photo/75px/1860-_Clemens.jpg",
        "Width": "571"
      }
    ],
    "start": 0,
    "status": 0
  }
}
```

### Get profile

Get a single Person or Free-Space profile by its WikiTree ID or numeric ID. Choose exactly which fields to return.

**Inputs**

- Profile (`key`, text, required): The WikiTree ID (the name after '/wiki/' in a profile's URL, e.g. 'Clemens-1') or the numeric Person/User ID. For a Free-Space Profile, prefix the name with 'Space:'.
- Fields to return (`fields`, text): Which profile fields to include in the result. Leave empty to return WikiTree's default set of fields. One or more of: `Id` (Person ID), `PageId` (Page ID), `Name` (WikiTree ID), `FirstName` (First name), `MiddleName` (Middle name), `MiddleInitial` (Middle initial), `LastNameAtBirth` (Last name at birth), `LastNameCurrent` (Current last name), `LastNameOther` (Other last names), `Nicknames`, and 33 more.
- Biography format (`bio_format`, text): Format for the biography text when the Bio field is returned: wiki markup, rendered HTML, or both. One of: `wiki` (Wiki markup), `html` (Rendered HTML), `both` (Both wiki and HTML). Default: `wiki`.
- Follow merged / redirected profiles (`resolve_redirect`, true/false): If a requested profile has been merged or redirected, follow it to its final destination and return that profile instead. Default: `true`.

**Outputs**

- `result` (object)

**Example output**

```json
{
  "result": {
    "page_name": "Clemens-1",
    "profile": {
      "BirthDate": "1835-11-30",
      "BirthLocation": "Florida, Monroe, Missouri, United States",
      "DeathDate": "1910-04-21",
      "DeathLocation": "Redding, Fairfield, Connecticut, United States",
      "FirstName": "Samuel",
      "Gender": "Male",
      "Id": 5185,
      "IsLiving": 0,
      "LastNameAtBirth": "Clemens",
      "LastNameCurrent": "Clemens",
      "MiddleName": "Langhorne",
      "Name": "Clemens-1",
      "PageId": 7146,
      "Privacy": 60
    },
    "status": 0
  }
}
```

### Get profiles connected by a DNA test

Get the profiles connected to a person through one of their DNA tests.

**Inputs**

- Profile (`key`, text, required): The WikiTree ID (the name after '/wiki/' in a profile's URL, e.g. 'Clemens-1') or the numeric Person/User ID.
- DNA test (`dna_id`, text, required): Which DNA test to follow the connections of. One of: `1` (23andMe), `2` (AncestryDNA), `3` (AncestryDNA (Paternal lineage)), `4` (AncestryDNA (Maternal lineage)), `6` (Family Tree DNA (Family Finder)), `7` (Family Tree DNA (mtDNA)), `8` (Family Tree DNA (Y-DNA)), `9` (Other autosomal DNA), `10` (Other mitochondrial DNA), `11` (Other Y-DNA), `12` (MyHeritage DNA), `13` (Living DNA).

**Outputs**

- `result` (object)

**Example output**

```json
{
  "result": {
    "connections": [
      {
        "Id": "13654071",
        "Name": "Whitten-1205",
        "PageId": "14605469"
      },
      {
        "Id": "7156327",
        "Name": "Whitten-692",
        "PageId": "7419651"
      }
    ],
    "dnaTest": {
      "dna_id": "8",
      "dna_name": "FTDNA Y-Chromosome",
      "dna_slug": "ftdna_ydna",
      "dna_type": "yDNA"
    },
    "page_name": "Whitten-1",
    "status": 0
  }
}
```

### Get relatives

Get the immediate relatives (parents, children, siblings, and spouses) of one or more profiles.

**Inputs**

- Profiles (`keys`, text, required): One or more WikiTree IDs or numeric IDs, separated by commas.
- Fields to return (`fields`, text): Which profile fields to include in the result. Leave empty to return WikiTree's default set of fields. One or more of: `Id` (Person ID), `PageId` (Page ID), `Name` (WikiTree ID), `FirstName` (First name), `MiddleName` (Middle name), `MiddleInitial` (Middle initial), `LastNameAtBirth` (Last name at birth), `LastNameCurrent` (Current last name), `LastNameOther` (Other last names), `Nicknames`, and 33 more.
- Biography format (`bio_format`, text): Format for the biography text when the Bio field is returned: wiki markup, rendered HTML, or both. One of: `wiki` (Wiki markup), `html` (Rendered HTML), `both` (Both wiki and HTML). Default: `wiki`.
- Include parents (`get_parents`, true/false): Include each profile's parents. Default: `true`.
- Include children (`get_children`, true/false): Include each profile's children. Default: `true`.
- Include spouses (`get_spouses`, true/false): Include each profile's spouses. Default: `true`.
- Include siblings (`get_siblings`, true/false): Include each profile's siblings. Default: `true`.

**Outputs**

- `result` (object)

**Example output**

```json
{
  "result": {
    "items": [
      {
        "key": "Clemens-1",
        "person": {
          "Children": {
            "5260": {
              "Id": 5260,
              "Name": "Clemens-12"
            }
          },
          "Id": 5185,
          "Name": "Clemens-1",
          "Parents": {
            "5186": {
              "Id": 5186,
              "Name": "Clemens-2"
            }
          },
          "Siblings": {
            "5191": {
              "Id": 5191,
              "Name": "Clemens-3"
            }
          },
          "Spouses": {
            "5256": {
              "Id": 5256,
              "Name": "Langdon-1"
            }
          }
        },
        "user_id": 5185,
        "user_name": "Clemens-1"
      }
    ],
    "status": 0
  }
}
```

### Search for a person

Search WikiTree's profiles by name, dates, locations, gender, and parents, the same search offered on WikiTree.com. Provide at least one name to search on.

**Inputs**

- First name (`first_name`, text): Given name to search for.
- Last name (`last_name`, text): Family name to search for.
- Birth date (`birth_date`, date): Approximate or exact birth date.
- Death date (`death_date`, date): Approximate or exact death date.
- Preferred name (`real_name`, text): The name the person was known by.
- Current last name (`last_name_current`, text): The person's present-day last name.
- Birth location (`birth_location`, text): Place of birth.
- Death location (`death_location`, text): Place of death.
- Gender (`gender`, text): Restrict results to one gender. One of: `Male`, `Female`.
- Father's first name (`father_first_name`, text): Given name of the person's father.
- Father's last name (`father_last_name`, text): Family name of the person's father.
- Mother's first name (`mother_first_name`, text): Given name of the person's mother.
- Mother's last name (`mother_last_name`, text): Family name of the person's mother.
- Date matching (`date_include`, text): How strictly the birth/death dates must match. One of: `both` (Require both dates to match), `neither` (Match even when dates are missing).
- Date tolerance (years) (`date_spread`, number): Allowed difference in years when matching dates (1–20). From 1 to 20.
- Allow century typos (`century_typo`, true/false): Also match dates that differ by a century. Default: `false`.
- Living people only (`is_living`, true/false): Restrict results to living people. Default: `false`.
- Exact surname only (`skip_variants`, true/false): Do not expand the last name to spelling variants. Default: `false`.
- Match last name against (`last_name_match`, text): Which last name to match on. One of: `all` (Any last name), `current` (Current last name), `birth` (Last name at birth), `strict` (Strict (exact match)).
- Sort by (`sort`, text): Primary ordering of the results. One of: `first` (First name), `last` (Last name), `birth` (Birth date), `death` (Death date), `manager` (Profile manager).
- Then sort by (`secondary_sort`, text): Secondary ordering of the results. One of: `first` (First name), `last` (Last name), `birth` (Birth date), `death` (Death date), `manager` (Profile manager).
- Fields to return (`fields`, text): Which profile fields to include in the result. Leave empty to return WikiTree's default set of fields. One or more of: `Id` (Person ID), `PageId` (Page ID), `Name` (WikiTree ID), `FirstName` (First name), `MiddleName` (Middle name), `MiddleInitial` (Middle initial), `LastNameAtBirth` (Last name at birth), `LastNameCurrent` (Current last name), `LastNameOther` (Other last names), `Nicknames`, and 33 more.
- How many results (`limit`, number): Maximum number of matches to return (1–100). From 1 to 100. Default: `10`.
- Start at (`start`, number): Index of the first match to return (0-based). At least 0. Default: `0`.

**Outputs**

- `result` (object)

**Example output**

```json
{
  "result": {
    "limit": 10,
    "matches": [
      {
        "BirthDate": "1835-11-30",
        "DeathDate": "1910-04-21",
        "FirstName": "Samuel",
        "Id": 5185,
        "LastNameAtBirth": "Clemens",
        "Name": "Clemens-1"
      }
    ],
    "start": 0,
    "status": 0,
    "total": 164
  }
}
```
