Generate search links for a many genealogy websites.
// Generate a search link for FamilySearch
var url = gensearch('familysearch', {
givenName: "Joe William",
familyName: "Clark"
});
// Some options can be changed. Here we modify the birth year range
var url = gensearch('familysearch', data, {
birthRange: 5
});
// Or we can set the configuration option once and have it apply to all future searches.
gensearch.config('familysearch', {
birthRange: 5
});
// We can also set options for multiple sites at once
gensearch.config({
familysearch: {
birthRange: 5
},
archives: {
deathRange: 10
}
});
Via the CDN unpkg:
<script src="//unpkg.com/gensearch@latest/dist/gensearch.min.js"></script>
npm install gensearch
var genSearch = require('gensearch');
givenName
familyName
birthPlace
birthDate
deathPlace
deathDate
marriagePlace
marriageDate
fatherGivenName
fatherFamilyName
motherGivenName
motherFamilyName
spouseGivenName
spouseFamilyName
- americanancestors
- ancestry
- archives
- billiongraves
- chroniclingamerica
- familysearch
- findagrave
- findmypast.co.uk
- findmypast.com
- fold3
- genealogieonline
- genealogybank
- geneanet.en
- gengophers
- geni
- mocavo
- myheritage
- nla trove
- newspapers
- openarchives
- usgenweb
- werelate
- wikitree
- worldvitalrecords
http://www.americanancestors.org/
var url = gensearch('americanancestors', data);
var url = gensearch('ancestry', data, [options]);
option | default | notes |
---|---|---|
db |
Search within a specific database. This value equates to the 'db' parameter value used by Ancestry. |
var url = gensearch('archives', data);
option | default |
---|---|
birthRange |
2 |
deathRange |
2 |
var url = gensearch('billiongraves', data, [options]);
option | default |
---|---|
yearRange |
2 |
http://chroniclingamerica.loc.gov/
var url = gensearch('chroniclingamerica', data);
var url = gensearch('familysearch', data, [options]);
option | default | notes |
---|---|---|
birthRange |
2 | |
deathRange |
2 | |
marriageRange |
2 | |
collectionId |
Only search within a specific collection. |
var url = gensearch('findagrave', data);
var url = gensearch('findmypast.co.uk', data, [options]);
option | default | notes |
---|---|---|
event |
Type of event to search for. Valid values are birth , death , and other . The otherDate and otherPlace options are used when event is other . |
|
birthRange |
2 | |
deathRange |
2 | |
otherRange |
2 | |
otherDate |
Only used when event is other . |
|
otherPlace |
Only used when event is other . |
var url = gensearch('findmypast.com', data, [options]);
option | default | notes |
---|---|---|
event |
Type of event to search for. Valid values are birth , death , and other . The otherDate and otherPlace options are used when event is other . |
|
birthRange |
2 | |
deathRange |
2 | |
otherRange |
2 | |
otherDate |
Only used when event is other . |
|
otherPlace |
Only used when event is other . |
var url = gensearch('fold3', data);
Only givenName
and familyName
are used for Fold3 searches.
http://genealogieonline.nl/en/
var url = gensearch('genealogieonline', data, [options]);
option | default |
---|---|
birthRange |
5 |
deathRange |
5 |
var url = gensearch('genealogybank', data, [options]);
option | default | notes |
---|---|---|
lifespan |
90 | If either a birthDate or deathDate exists, but not both, then this value is used to approximate the missing year. For example, if the birthDate is 2 Feb 1766 and no deathDate is given then we would add lifespan to the birth year to get an approximate death year of 1856 . |
datePadding |
5 | This value is substracted from the calculated birth year and added to the calculated death year. |
var url = gensearch('geneanet.en', data, [options]);
option | default | notes |
---|---|---|
place |
birth |
Determines whether the birth or death place is used for searching. Values: birth or death . |
var url = gensearch('gengophers', data);
var url = gensearch('geni', data);
Only givenName
and familyName
are used for Geni searches.
var url = gensearch('google', data);
var url = gensearch('mocavo', data);
var url = gensearch('myheritage', data);
var url = gensearch('newspapers', data, [options]);
option | default | notes |
---|---|---|
lifespan |
90 | If either a birthDate or deathDate exists, but not both, then this value is used to approximate the missing year. For example, if the birthDate is 2 Feb 1766 and no deathDate is given then we would add lifespan to the birth year to get an approximate death year of 1856 . |
datePadding |
5 | This value is substracted from the calculated birth year and added to the calculated death year. |
var url = gensearch('nlatrove', data);
var url = gensearch('openarchives', data);
Only givenName
and familyName
are used for Open Archive searches.
var url = gensearch('usgenweb', data);
var url = gensearch('werelate', data, [options]);
option | default |
---|---|
birthRange |
2 |
deathRange |
2 |
var url = gensearch('wikitree', data);
var url = gensearch('worldvitalrecords', data, [options]);
option | default |
---|---|
dateRange |
2 |
git clone https://github.com/rootsdev/gen-search.git
cd gen-search
npm install
- Create the site file in the src/sites directory. Look at archives.js for a simple example or familysearch.js for a more complex example.
- Add the new site to the src/search.js site list, in alphabetical order please.
- Add a test file in the test/sites directory. Look at any of the other site test files for an example.
- Run tests with
npm test
. Thegensearch.js
file will be automatically built with browserify before the tests are run. - Document the new site in the README file, in alphabetical order please. Be sure to add a link in the site list just before the site specific docs.
- Commit and submit a pull request.