Landrace.Wiki:API
More actions
Landrace.wiki publishes its accession data and the rest of its structured data through a public, read-only HTTP API. Reading needs no account or API key. Responses come back as JSON. The data is stored as Semantic MediaWiki properties: a query selects any set of accessions by category and property and returns the fields it asks for.
This page describes the endpoints, the accession properties and their types, the coordinates, the licence and how to cite the data.
Endpoints
Base URL: https://landrace.wiki/api.php
Semantic queries
The Semantic MediaWiki API answers queries over the property store. Two forms take the same conditions.
action=ask takes a whole query in one parameter, written as it would be on Special:Ask:
https://landrace.wiki/api.php?action=ask &query=[[Category:Accessions]][[Has country::Cambodia]]|?Has descriptive name|?Has collection date|limit=50 &format=json
action=askargs splits conditions, printouts and parameters into separate fields, each pipe-delimited:
https://landrace.wiki/api.php?action=askargs &conditions=Category:Accessions|Has country::Cambodia &printouts=Has descriptive name|Has collection date ¶meters=limit=50 &format=json
Several conditions in one query are combined with AND. A condition of the form [[Has coordinates::+]] selects the pages that have any value for the property. Spaces and special characters in a URL are percent-encoded as usual (%20 for a space, %3A%3A for ::).
A query returns as many rows as its limit allows. When more rows match, the response carries query-continue-offset. Repeating the query with offset set to that value returns the next rows.
MediaWiki action API
The standard MediaWiki action API runs at the same base URL. action=query returns page text, revisions and category members; action=parse returns rendered output. Category members, for example:
https://landrace.wiki/api.php?action=query&list=categorymembers &cmtitle=Category:Accessions&cmlimit=max&format=json
Automated access
Scripts and harvesters read the data through api.php. Requests for ordinary pages and special pages pass through a network security service that may ask a browser to complete a short automatic check, which automated clients cannot do; the Privacy policy describes that service. The site runs on shared hosting. Clients are expected to:
- send a descriptive
User-Agentheader naming the client and giving a contact address - make one request at a time, a few seconds apart
- cache responses
- write to privacy@landrace.wiki before any regular or large harvest
Traffic that loads the server heavily may be slowed or blocked without notice.
Response format
An ask or askargs response holds the matching pages under query.results, keyed by page title. Each entry has a printouts object that maps each requested property to an array of values, since any property can hold more than one value. query.meta gives the count and the query time.
Values keep their type:
- Page: an object naming the target page (
fulltext,fullurl), so a place or a collector is returned as a link to its page - Text: a string
- Number: a number
- Quantity: a value with its unit; elevation is in metres
- Date: an object with
timestampandraw. A date stored to the year or the month keeps that precision inraw - Geographic coordinates: an object with
latandlonin decimal degrees - URL: a string
Accession properties
Every accession page is in Category:Accessions, which holds 1691 pages. The tables list each property the accession template stores. The type and the number of accessions with a value are read from the property store whenever this page is rendered, so they match the live data. A purged page shows the current figures. Special:Properties lists every property on the wiki with its type and use count. Special:Browse shows every value stored on one page.
Identity and names
| Property | Type | Accessions with a value |
|---|---|---|
Has accession ID |
Page | 1691 |
Has descriptive name |
Text | 1691 |
Has classification |
Text | 1688 |
Has accession type |
Text | 954 |
Has selection type |
Text | 183 |
Has local name |
Text | 401 |
Has pronunciation |
Text | 307 |
Has vernacular translation |
Text | 211 |
Has synonyms |
Text | 55 |
Has image |
Text | 466 |
Has image caption |
Page | 468 |
Place
| Property | Type | Accessions with a value |
|---|---|---|
Has country |
Page | 1689 |
Has province |
Page | 1375 |
Has admin 2 |
Page | 552 |
Has admin 2 label |
Text | 140 |
Has admin 3 |
Page | 263 |
Has admin 3 label |
Text | 74 |
Has admin 4 |
Page | 178 |
Has admin 4 label |
Text | 72 |
Has locality |
Page | 1181 |
Has coordinates |
Geographic coordinates | 1132 |
Has coordinate uncertainty |
Quantity | 635 |
Has georeference basis |
Text | 761 |
Has elevation |
Quantity | 539 |
Has aspect |
Text | 119 |
Has gene pool |
Page | 25 |
Has regional complex |
Page | 26 |
Has growing region |
Page | 741 |
Has growing area |
Page | 629 |
Has appellation |
Page | 242 |
Has field |
Page | 34 |
Collection and provenance
| Property | Type | Accessions with a value |
|---|---|---|
Has collection method |
Text | 1689 |
Has sourcing type |
Text | 1662 |
Has autochtonous |
Text | 604 |
Has collection date |
Date | 1139 |
Has sample harvest date |
Date | 466 |
Has collector |
Page | 1125 |
Has farmer name |
Text | 79 |
Has expedition ID |
Page | 409 |
Has ethnic group |
Page | 13 |
Has seed sourcing |
Text | 270 |
Preserved specimens
| Property | Type | Accessions with a value |
|---|---|---|
Has specimen repository |
Text | 643 |
Has catalogue number |
Text | 641 |
Has occurrence ID |
URL | 565 |
Has collector number |
Text | 511 |
Has scientific name |
Text | 719 |
Has identified by |
Text | 223 |
Seed lots
| Property | Type | Accessions with a value |
|---|---|---|
Has seed quantity |
Number | 58 |
Has seed weight |
Quantity | 1 |
Has seed viability |
Text | 33 |
Has seed storage location |
Text | 1046 |
Plant description
| Property | Type | Accessions with a value |
|---|---|---|
Has pollination type |
Text | 347 |
Has sexual characteristics |
Text | 411 |
Has photoperiod response |
Text | 525 |
Has minimum flowering time |
Quantity | 448 |
Has maximum flowering time |
Quantity | 444 |
Has minimum height |
Quantity | 324 |
Has maximum height |
Quantity | 348 |
Has growth pattern |
Text | 272 |
Has branching |
Text | 108 |
Has leaf shape |
Text | 392 |
Has leaflet count |
Number | 146 |
Has serration |
Text | 74 |
Has leaf color |
Text | 262 |
Has stem color |
Text | 119 |
Has stigma color |
Text | 90 |
Has flower structure |
Text | 0 |
Has chemotype |
Text | 3 |
Has terpene profile |
Text | 1 |
Has aroma |
Text | 268 |
Has effects |
Text | 164 |
Population, cultivation and use
| Property | Type | Accessions with a value |
|---|---|---|
Has population estimate |
Number | 135 |
Has male female ratio |
Number | 285 |
Has population hermaphroditism |
Quantity | 281 |
Has culling |
Text | 324 |
Has perceived introgression level |
Text | 433 |
Has cultivation status |
Text | 590 |
Has cultivation scale |
Text | 366 |
Has cultivation system type |
Text | 478 |
Has planting method |
Text | 209 |
Has observed soil type |
Text | 0 |
Has soil pH |
Number | 0 |
Has cycle 1 earliest planting |
Text | 290 |
Has cycle 1 latest planting |
Text | 290 |
Has cycle 1 harvest start |
Text | 345 |
Has cycle 1 harvest end |
Text | 343 |
Has cycle 2 earliest planting |
Text | 65 |
Has cycle 2 latest planting |
Text | 65 |
Has cycle 2 harvest start |
Text | 65 |
Has cycle 2 harvest end |
Text | 65 |
Has primary purpose |
Text | 516 |
Has processing method |
Page | 314 |
Has processing notes |
Text | 184 |
Has legal enforcement threats |
Text | 398 |
Has eradication date |
Date | 1 |
Relationships between accessions
| Property | Type | Accessions with a value |
|---|---|---|
Has parent accession |
Page | 40 |
Has related accession |
Page | 138 |
Has same population accessions |
Page | 21 |
Has mother plant ID |
Page | 0 |
Has father plant ID |
Page | 0 |
Has regional corroboration |
Page | 430 |
Has population corroboration |
Page | 35 |
Has identity confirmation |
Page | 29 |
Notes on particular properties
Has collection dateis the date of collection, stored to the precision the source gives (year, month or day).Has sample harvest dateis a year. For a seed lot grown out from an earlier collection it is the year of that grow-out, not the date of the original collection.Has elevationis in metres.Has occurrence IDis a link to the holding institution's record of the specimen, or to its record on GBIF. It is not always the identifier the institution itself publishes for the specimen.Has catalogue numbersometimes holds the numbers of several sheets of one gathering in one value.Has admin 2 label,Has admin 3 labelandHas admin 4 labelname the kind of administrative unit at that level in the country concerned, such as District, Subdistrict or Tehsil.
Preserved specimens and Darwin Core
Herbarium sheets and other preserved specimens are accessions like any other. They carry Has collection method = Herbarium specimen. Seed lots carry Seeds. A query for the specimens alone:
https://landrace.wiki/api.php?action=ask &query=[[Category:Accessions]][[Has collection method::Herbarium specimen]]|?Has specimen repository|?Has catalogue number|?Has scientific name|limit=50 &format=json
The nearest Darwin Core terms:
| Property or value | Darwin Core |
|---|---|
Has collection method = Herbarium specimen |
basisOfRecord = PreservedSpecimen
|
Has collection method = Seeds |
basisOfRecord = LivingSpecimen
|
Has specimen repository |
the holding institution, published under institutionCode in the holder's own code
|
Has catalogue number |
catalogNumber
|
Has collector number |
recordNumber (the number, without the collector's name)
|
Has scientific name |
scientificName, as determined on the sheet
|
Has identified by |
identifiedBy
|
Has occurrence ID |
a link to the same specimen elsewhere (associatedOccurrences), not this accession's occurrenceID
|
Has collection date |
eventDate
|
Has elevation |
minimumElevationInMeters and maximumElevationInMeters
|
Links to other repositories
An accession that is also held or sequenced elsewhere links to that record through {{External accession}}. Each link is stored as a subobject of the accession page with seven properties: Has external repository (Page), Has external identifier (Text), Has external URL (URL), Has external accession type (Text), Has external relation (Text), Has external accession date (Date) and Has external note (Text). A query returns one row per link, with the accession page as -Has subobject:
https://landrace.wiki/api.php?action=ask &query=[[Has external repository::+]]|?Has external repository|?Has external identifier|?Has external URL|?-Has subobject=Accession|limit=100 &format=json
Metadata embedded in accession pages
Each accession page carries a Schema.org Dataset block in JSON-LD in its HTML head. It gives the accession ID as identifier, the page address, the licence, a list of keywords, spatialCoverage (the place and, where the accession has coordinates, a GeoCoordinates point) and temporalCoverage (the year of collection). The block names Landrace.wiki as its creator and publisher. Where an accession records the institution or seed bank that holds the material, that holder appears as provider, by name only. Where it records a collector who is a named person, that person appears as contributor.
Coordinates
The Privacy policy states:
GPS coordinates stored on accession pages and published on maps are deliberately obfuscated by approximately 500 m. Precise coordinates are never published.
Has coordinates therefore returns the obfuscated point. Points on herbarium specimens and on some seed lots are placed from the specimen label or from the source that documents the lot. Such a point may mark a settlement or a district, not a collection site. Where an accession carries them, Has coordinate uncertainty gives the uncertainty of its point and Has georeference basis what the point was placed from. A reuser who reprojects, aggregates or maps the points should carry that uncertainty forward and not treat the values as precise.
Licence
Text on Landrace.wiki is released under the Creative Commons Attribution-ShareAlike 4.0 International licence (CC BY-SA 4.0). The copyright page extends it to the data:
The same licence applies to the structured data exposed via the wiki's API and to the Schema.org metadata embedded in page output.
A dataset built from the API carries the licence's conditions: it credits Landrace.wiki, links to the licence and is shared under CC BY-SA 4.0 or a compatible licence. Two kinds of material fall outside it:
- Files (photographs, scans and other media) carry their own licences, given on each file page.
- Data republished from external scientific or institutional sources keeps the terms those sources set. Some herbaria publish their specimen records under a non-commercial licence.
The copyright page also sets out the limits that farmer privacy places on reuse: attempts to reverse the coordinate obfuscation or to combine the data with other sources to identify a grower are not uses the project sanctions.
How to cite
Accession pages change as sources are added, so a citation names the revision used. The permanent link in each page's tools menu gives the revision's address.
A single accession:
- Landrace.wiki contributors. "Adrianov 239 (1926)". Landrace.wiki, revision 23420. https://landrace.wiki/index.php?oldid=23420. Accessed 15 October 2026. CC BY-SA 4.0.
Data retrieved through the API:
- Landrace.wiki contributors. Landrace.wiki accession data, retrieved through the Semantic MediaWiki API on 15 October 2026. Query: [[Category:Accessions]][[Has country::Cambodia]]. https://landrace.wiki/api.php. CC BY-SA 4.0.
A citation of retrieved data gives the query and the retrieval date, since the result changes as the wiki grows.
Downloads
Bulk downloads of the accession data are not yet published. Until they are, the API is the route to the full data set.
Changes
Properties are occasionally renamed, merged or retyped. A query names its properties, so a client that depends on one should check its type here or on Special:Properties after a failure. Changes to the endpoints described here are recorded on this page.
See also
- Landrace.Wiki:About
- Landrace.Wiki:Privacy policy
- Landrace Wiki:Copyrights
- Special:Properties: every property, with its type and use count
- Special:Ask: the query form in the browser
- Semantic MediaWiki API documentation
- MediaWiki action API documentation