{
  "openapi": "3.1.0",
  "info": {
    "title": "ChronicaPulse API",
    "description": "Global genealogy and historical archive intelligence API. Full-text search across Chronicling America (1770\u20131963 US newspapers), Library of Congress, Trove (Australia), British Newspaper Archive, Europeana, and 30+ global archive collections. AI-synthesized person research, obituary search, immigration/passenger record analysis, military record discovery, historical business research, timeline generation, and place history. Serves genealogists, historians, journalists, legal researchers, and family history agents. Ancestry.com, MyHeritage, Findmypast, 23andMe, and FamilyTreeDNA affiliate links included. All endpoints support any language via ?lang=. Pricing: $0.05\u2013$0.15 USDC/call via x402 micropayment.",
    "version": "1.2.0",
    "contact": {
      "url": "https://chronicapulse.vercel.app"
    }
  },
  "servers": [
    {
      "url": "https://chronicapulse.vercel.app"
    }
  ],
  "paths": {
    "/api/chronica/search": {
      "get": {
        "summary": "Archive search",
        "description": "Full-text search across Chronicling America and global digitized newspaper archives",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Search query"
          },
          {
            "name": "year_start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year_end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Archive search results"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.05,
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Full-text archive search \u2014 start here; chain to /api/chronica/person for known-name research; pairs with /api/chronica/timeline for historical context"
      }
    },
    "/api/chronica/person": {
      "get": {
        "summary": "Person research",
        "description": "Find a person in historical newspaper archives \u2014 life events, family members, occupation, DNA recommendation",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year_start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year_end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Person research profile"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.12,
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Person-specific archive research \u2014 ancestry + DNA affiliate links included; chain to /api/chronica/immigration for immigrant ancestors"
      }
    },
    "/api/chronica/obituary": {
      "get": {
        "summary": "Obituary research",
        "description": "Extract genealogical data from obituaries and death notices \u2014 spouse, children, parents, pallbearers, burial",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Obituary research report"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.08,
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Obituary search \u2014 genealogy database affiliates auto-appended; chain to /api/chronica/person for full ancestor profile"
      }
    },
    "/api/chronica/event": {
      "get": {
        "summary": "Historical event coverage",
        "description": "How contemporary newspapers covered historical events \u2014 regional perspectives, genealogical connections",
        "parameters": [
          {
            "name": "event",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year_start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year_end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Historical event newspaper analysis"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.1,
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Event-based research \u2014 find all news coverage of a historical event; pairs with /api/chronica/timeline"
      }
    },
    "/api/chronica/place": {
      "get": {
        "summary": "Place history",
        "description": "Newspaper history of any town, city, or neighborhood \u2014 ethnic communities, migration patterns, local papers",
        "parameters": [
          {
            "name": "place",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year_start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year_end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Place history profile"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.08,
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Place history \u2014 pairs with /api/chronica/timeline; useful for property/title research agents"
      }
    },
    "/api/chronica/immigration": {
      "get": {
        "summary": "Immigration research",
        "description": "Ship manifests, passenger lists, ethnic press, naturalization \u2014 with name anglicization guidance",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "origin",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Country of origin"
          },
          {
            "name": "destination",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "US destination city"
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Approximate arrival year"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Immigration research report"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.1,
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Immigration and passenger record analysis \u2014 chain after /api/chronica/person; pairs with ImmigrationPulse for modern immigration context"
      }
    },
    "/api/chronica/military": {
      "get": {
        "summary": "Military service research",
        "description": "Draft notices, casualty lists, homecomings, decorations, unit history, NARA guidance",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conflict",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Civil War | WWI | WWII | Korean War | Vietnam"
          },
          {
            "name": "location",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Military service research report"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.1,
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Military service record research \u2014 chain with /api/chronica/person; NARA records cross-referenced"
      }
    },
    "/api/chronica/business": {
      "get": {
        "summary": "Business history",
        "description": "Historical newspaper coverage of companies \u2014 founding, labor history, employees, advertisements",
        "parameters": [
          {
            "name": "business",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "era",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Business history report"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.1,
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Historical business research \u2014 pairs with /api/chronica/place for local context; useful for corporate history research"
      }
    },
    "/api/chronica/timeline": {
      "get": {
        "summary": "Chronological timeline",
        "description": "Synthesize newspaper coverage into a dated chronological narrative for a person, place, or topic",
        "parameters": [
          {
            "name": "subject",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "person",
                "place",
                "topic"
              ]
            }
          },
          {
            "name": "year_start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year_end",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Chronological timeline"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.15,
        "x-agent-use-case": "on-demand",
        "x-agent-chaining": "Historical timeline generation \u2014 chain after any search to contextualize results; highest AI synthesis value"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "x402": {
        "type": "apiKey",
        "in": "header",
        "name": "PAYMENT-SIGNATURE",
        "description": "x402 micropayment signature. Send request without header to receive 402 with payment requirements."
      }
    }
  }
}