Navigate Chilean civil registry records on FamilySearch for the Cerpa/Pérez family line. Use when searching Chilean births, marriages, deaths, downloading FamilySearch images via DGS locators, enhancing scanned register pages, or reading handwritten index entries from Chanco or other Maule-region circunscripciones.
FamilySearch requires a bearer token extracted from a logged-in browser session. Never use environment variables — the token is pasted inline in each script.
Token source: familysearch.org → DevTools → Network → any XHR →
copy "Authorization: Bearer <token>" value (after "Bearer ").
Tokens expire every ~30 minutes. When a 401 is returned, ask Tony to refresh the token from the browser.
| Endpoint | Purpose |
|---|---|
CATALOG_SEARCH_URL = familysearch.org/service/search/catalog/v3/search | Search the catalog by surname, place, subject |
RECORDS_SEARCH_URL = |
familysearch.org/service/search/hr/v2/personas| Search indexed historical records (GedcomX) |
DEEPZOOM_URL = sg30p0.familysearch.org/service/records/storage/deepzoomcloud/dz/v1 | Download images by DGS locator or ARK |
WAYPOINT_URL = familysearch.org/platform/records/waypoints | Navigate film structure (waypoints → children) |
All requests require headers:
headers = {
"Authorization": f"Bearer {TOKEN}",
"User-Agent": "<Chrome UA string>",
"Accept": "application/json", # or "image/jpeg" for images
"Referer": "https://www.familysearch.org/",
"Accept-Language": "en",
}
FamilySearch uses Imperva WAF. Aggressive requests trigger 403 blocks.
| Context | Minimum delay |
|---|---|
| API queries (catalog, records) | 1.5 s between requests |
| Image downloads | 2.0 s between requests |
| After 403/429 | 30 s backoff, max 3 retries |
Always use time.sleep between requests. For bulk downloads, randomize
request order to avoid sequential-scan detection.
DGS (Digital Genealogical System) numbers identify microfilm groups. Each page within a DGS has a predictable locator: