Worms Get Distributions
worms_get_distributionsRetrieve recorded distributions for an AphiaID or canonical WoRMS LSID in byte-budgeted segments; resume nextResultOffset as resultOffset with unchanged selectors and filters. WoRMS attaches records to individual name usages, so one AphiaID's rows can miss those of its synonyms: includeSynonyms combines the accepted taxon's rows with those of up to 10 synonyms per call, each row tagged sourceAphiaId; consume nextResultOffset before advancing synonymOffset to synonymUnion.nextSynonymOffset with resultOffset 0. Filters apply to the complete fetched set before pagination and combine by conjunction: recordStatus normalizes case and surrounding whitespace before exact matching; others use case-insensitive whole-value equality without trimming. Rows retain duplicates and source order; no rows does not prove biological or taxon absence. A notice names the linked accepted ID, distinguishing an accepted alternative representation from its preferred ID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| aphiaId | Yes | Positive safe-integer AphiaID, decimal string, or canonical urn:lsid:marinespecies.org:taxname:<AphiaID>; outputs remain numeric. | |
| occurrence | No | Case-insensitive whole-value occurrence filter, such as Established; blank omitted. Observed values: worms_list_reference topic: distribution_terms. | |
| invasiveness | No | Case-insensitive whole-value invasiveness filter, such as Invasive; blank omitted. Observed values: worms_list_reference topic: distribution_terms. | |
| recordStatus | No | Record status valid, doubtful, or inaccurate; ignores case and surrounding whitespace; blank means no filter. | |
| resultOffset | No | Zero-based local position; resubmit unchanged selectors and options. | |
| synonymOffset | No | Zero-based synonym position; once nextResultOffset is null, resubmit synonymUnion.nextSynonymOffset here with resultOffset 0. Inactive without includeSynonyms. | |
| includeSynonyms | No | Combine the accepted taxon's records with its synonyms', 10 synonyms per call; rows then carry sourceAphiaId. | |
| establishmentMeans | No | Case-insensitive whole-value establishment filter, such as Alien; blank omitted. Observed values: worms_list_reference topic: distribution_terms. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| echo | No | Only effective filters; recordStatus is canonical lowercase, other populated values are unchanged. | |
| error | No | Present when the call failed. Absent on success. | |
| notice | No | Linked accepted/preferred-AphiaID and empty-evidence guidance, in that order. | |
| aphiaId | No | Positive safe-integer AphiaID; obtain from worms_resolve_taxon. | |
| byteBudget | No | Complete serialized response byte target. | |
| totalCount | No | Known local sequence length before pagination. | |
| attribution | No | WoRMS source attribution. | |
| statusError | No | Failed taxonomic-status read; evidence is unaffected, but whether the AphiaID is its accepted name is unknown. | |
| resultOffset | No | Zero-based starting position in the complete local sequence. | |
| synonymUnion | No | Synonym union window; present only with includeSynonyms. | |
| budgetLimited | No | Whether the byte budget ended this local page early. | |
| distributions | No | Whole matching rows in this segment, in source order. | |
| filteredCount | No | Rows passing every effective filter. | |
| oversizedItem | No | One indivisible scientific item exceeds the target; retained intact with forward progress. | |
| requiredBytes | No | Serialized paired-surface result bytes for an oversized item, excluding transport-added metadata. | |
| returnedCount | No | Whole scientific items returned on this segment. | |
| unfilteredCount | No | All recorded rows before filtering; with includeSynonyms, those of this window. | |
| nextResultOffset | No | Next local position; null when consumed. |