Marriage Certificate OCR

Marriage Certificate
OCR API

Automatically extract structured data from Brazilian marriage certificates (certidões de casamento) with AI-powered OCR. Get both spouses, the marriage and the registry office as JSON in seconds.

Extracted Fields

Every field the API returns, with its key in the JSON answer and the label the official certificate model prints for it. The spouses come in the order the certificate prints them.

Document documento

What the certificate is: its type, title and form.

  • tipoThe document type: always Certidão de Casamento.
  • títuloOn the certificate: CERTIDÃO DE CASAMENTOThe title printed at the top of the certificate, as printed. It tells a religious marriage with civil effect, a transcription or an inteiro teor from a plain certificate.
  • formaThe form of the certificate, from its title: breve relato (the summary every model prints) or inteiro teor (the whole text of the registration).

Registration registro

Where the marriage is registered.

  • matrículaOn the certificate: MatrículaThe registration number (matrícula): 32 digits in nine groups. Empty on a certificate issued before 2010, which has none.
  • livroBook (livro) of the registration: as printed on older certificates, where it can carry letters, else taken from the matrícula.
  • folhaPage (folha) of the registration: as printed on older certificates, else taken from the matrícula.
  • termoEntry (termo) of the registration: as printed on older certificates, else taken from the matrícula.

Spouse 1 cônjuge_1

The spouse printed first on the certificate (the order as printed; no gender implied).

  • nome_completoOn the certificate: Nome atual dos cônjugesThe spouse's name in the certificate's names field; in a layout without one, the name the text gives the spouse. On a certificate issued before 2025 this can be the name before the marriage: nome_atual says when the certificate declares the current name.
  • nome_atualOn the certificate: Nome atual dos cônjugesThe spouse's current name, only when the certificate declares it as such, which the model in force since 2025 does. Empty on older certificates: a current name is never deduced.
  • cpfOn the certificate: Número do CPFCPF number (Brazilian tax ID). Format: XXX.XXX.XXX-XX. Certificates issued before 2018 do not print it.
  • nome_habilitaçãoOn the certificate: Nome no momento da habilitaçãoThe name when the marriage was licensed (habilitação), as printed; older certificates call it the single name (nome de solteiro).
  • nome_após_casamentoOn the certificate: Nome que passou a utilizarThe name taken with the marriage, as printed. Empty when the certificate prints none for this spouse: before 2025, only the spouse who changed name has one.
  • data_nascimento.diaOn the certificate: Data de nascimento: diaDay of birth, in numerals.
  • data_nascimento.mêsOn the certificate: Data de nascimento: mêsMonth of birth, in numerals.
  • data_nascimento.anoOn the certificate: Data de nascimento: anoYear of birth, in numerals.
  • nacionalidadeOn the certificate: NacionalidadeNationality, as printed.
  • estado_civilOn the certificate: Estado civilMarital status when the marriage was licensed, as printed. It is not the current marital situation, which is never deduced.
  • estado_civil_códigoestado_civil as a code: solteiro, divorciado, viúvo or outro. Empty when the certificate prints no marital status.
  • município_naturalidadeOn the certificate: Município da naturalidadeMunicipality of birth; the country, for someone born abroad.
  • uf_naturalidadeOn the certificate: UFState of birth, in two letters; EX for someone born abroad.
  • genitoresOn the certificate: Genitor(es)The parents' names, separated by ; .
  • profissãoProfession, as printed. Certificates issued before 2010 and an inteiro teor print it.
  • domicílioDomicile and residence, as printed. Certificates issued before 2010 and an inteiro teor print it.

Spouse 2 cônjuge_2

The spouse printed second on the certificate (the order as printed; no gender implied).

  • nome_completoOn the certificate: Nome atual dos cônjugesThe spouse's name in the certificate's names field; in a layout without one, the name the text gives the spouse. On a certificate issued before 2025 this can be the name before the marriage: nome_atual says when the certificate declares the current name.
  • nome_atualOn the certificate: Nome atual dos cônjugesThe spouse's current name, only when the certificate declares it as such, which the model in force since 2025 does. Empty on older certificates: a current name is never deduced.
  • cpfOn the certificate: Número do CPFCPF number (Brazilian tax ID). Format: XXX.XXX.XXX-XX. Certificates issued before 2018 do not print it.
  • nome_habilitaçãoOn the certificate: Nome no momento da habilitaçãoThe name when the marriage was licensed (habilitação), as printed; older certificates call it the single name (nome de solteiro).
  • nome_após_casamentoOn the certificate: Nome que passou a utilizarThe name taken with the marriage, as printed. Empty when the certificate prints none for this spouse: before 2025, only the spouse who changed name has one.
  • data_nascimento.diaOn the certificate: Data de nascimento: diaDay of birth, in numerals.
  • data_nascimento.mêsOn the certificate: Data de nascimento: mêsMonth of birth, in numerals.
  • data_nascimento.anoOn the certificate: Data de nascimento: anoYear of birth, in numerals.
  • nacionalidadeOn the certificate: NacionalidadeNationality, as printed.
  • estado_civilOn the certificate: Estado civilMarital status when the marriage was licensed, as printed. It is not the current marital situation, which is never deduced.
  • estado_civil_códigoestado_civil as a code: solteiro, divorciado, viúvo or outro. Empty when the certificate prints no marital status.
  • município_naturalidadeOn the certificate: Município da naturalidadeMunicipality of birth; the country, for someone born abroad.
  • uf_naturalidadeOn the certificate: UFState of birth, in two letters; EX for someone born abroad.
  • genitoresOn the certificate: Genitor(es)The parents' names, separated by ; .
  • profissãoProfession, as printed. Certificates issued before 2010 and an inteiro teor print it.
  • domicílioDomicile and residence, as printed. Certificates issued before 2010 and an inteiro teor print it.

Marriage casamento

The marriage: its kind, its dates, its celebration and the property regime.

  • tipoThe kind of marriage, from the title, the book and the matrícula: civil, religioso com efeito civil or conversão de união estável. Empty when nothing on the certificate tells.
  • data_celebração.texto_completoOn the certificate: Data da celebração do casamento ou, se for o caso de conversão da união estável, data do registro: por extensoThe date in words, only when the certificate prints it in words.
  • data_celebração.diaOn the certificate: Data da celebração do casamento ou, se for o caso de conversão da união estável, data do registro: diaDay, in numerals.
  • data_celebração.mêsOn the certificate: Data da celebração do casamento ou, se for o caso de conversão da união estável, data do registro: mêsMonth, in numerals.
  • data_celebração.anoOn the certificate: Data da celebração do casamento ou, se for o caso de conversão da união estável, data do registro: anoYear, in numerals.
  • local_celebraçãoPlace of the celebration, as printed. Certificates issued before 2010 print it.
  • celebranteWho celebrated the marriage, with the title printed. Certificates issued before 2010 print it.
  • documentos_apresentadosThe documents presented for the marriage, as printed. Certificates issued before 2010 print them.
  • regime_bensOn the certificate: Regime de bensThe property regime as printed, with the data of the prenuptial agreement (pacto antenupcial) when the certificate prints it.
  • regime_bens_códigoregime_bens as a code: comunhão parcial, comunhão universal, separação convencional, separação obrigatória, participação final nos aquestos or outro. Empty when the certificate prints no regime.
  • data_registro.texto_completoOn the certificate: Data de registro do casamento: por extensoThe date in words, only when the certificate prints it in words.
  • data_registro.diaOn the certificate: Data de registro do casamento: diaDay, in numerals.
  • data_registro.mêsOn the certificate: Data de registro do casamento: mêsMonth, in numerals.
  • data_registro.anoOn the certificate: Data de registro do casamento: anoYear, in numerals.

Observations observações

What the registry added to the registration, and any printed data with no field of its own.

  • averbações_anotaçõesOn the certificate: Anotações/AverbaçõesThe text of the amendments and annotations (averbações and anotações), as printed: a divorce, a change of regime, a rectification.
  • anotações_cadastroOn the certificate: Anotações voluntárias de cadastroRegistry data printed at the request of the parties, such as document numbers, as printed. Certificates issued from 2018 print it.
  • outras_informaçõesAny data the certificate prints that has no field of its own, as printed, so nothing printed is dropped. Never a heading, a field label or boilerplate.

Whole text inteiro_teor

The registration's whole text, for an inteiro teor.

  • textoOn the certificate: Texto do registro digitadoThe whole text of the registration, as printed, when the certificate is an inteiro teor. An inteiro teor is read when it fits one page: a request takes one image. Only the first page of a PDF is read. Empty for a breve relato.

Registry office cartório

The registry office that issued the certificate.

  • nomeOn the certificate: Oficial de Registro Civil de Pessoas NaturaisThe registry office's name, as printed.
  • cnsOn the certificate: CNS nºThe office's national code (CNS): as printed, else the first six digits of the matrícula.
  • municípioOn the certificate: CidadeThe office's municipality.
  • ufOn the certificate: UFThe office's state, in two letters.
  • endereçoOn the certificate: Rua, nº, complemento, CEPThe office's address, as printed.
  • telefoneThe office's telephone, as printed.
  • emailThe office's e-mail, as printed.

Authentication autenticação

What makes the certificate checkable: the seal, who signed and when it was issued.

  • selo_digitalOn the certificate: QR CodeThe digital seal or verification code, where the state has one.
  • consulta_autenticidadeWhere the certificate says its authenticity can be checked, as printed.
  • oficial_registroOn the certificate: Nome do OficialThe registrar's printed name.
  • assinanteOn the certificate: Nome do Oficial/EscreventeWho signed the certificate, as printed beside the signature: the registrar, a substitute or a clerk.
  • cargo_assinanteOn the certificate: CargoThe signer's role, as printed.
  • data_emissãoOn the certificate: Cidade – UF, dataDate the certificate was issued. Format: DD/MM/YYYY.
  • número_papelThe serial number of the certificate's security paper.

One request, every field

Send a marriage certificate image and get structured JSON back. Each certificate read costs 1.5 credits on the standard engines.

Request

#!/usr/bin/env bash
# Extract the hosted sample marriage certificate (fictitious data).
# Needs DOCSOCR_API_KEY in the environment; create a key in the panel.
set -euo pipefail

REQUEST_ID="marriage-$(date +%s)-$RANDOM" # one id per document

# The API answers within 90 s
curl -sS --max-time 120 https://api.docsocr.com/api/v1/documents/marriage-certificate \
  -H "Authorization: Bearer $DOCSOCR_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<EOF
{
  "imageType": "url",
  "imageUrl": "https://docsocr.com/samples/certidao-casamento-exemplo.jpg",
  "requestId": "$REQUEST_ID"
}
EOF

Response

201 Created
{
  "success": true,
  "processingTimeMs": 7107,
  "data": {
    "documento": {
      "tipo": "Certidão de Casamento",
      "título": "CERTIDÃO DE CASAMENTO",
      "forma": "breve relato"
    },
    "registro": {
      "matrícula": "123456 01 55 2025 2 00034 045 0009876 12",
      "livro": "34",
      "folha": "45",
      "termo": "9876"
    },
    "cônjuge_1": {
      "nome_completo": "RAFAEL COSTA TESTE",
      "nome_atual": "RAFAEL COSTA TESTE",
      "cpf": "123.456.789-09",
      "nome_habilitação": "RAFAEL COSTA TESTE",
      "nome_após_casamento": "RAFAEL COSTA TESTE",
      "data_nascimento": {
        "dia": "12",
        "mês": "05",
        "ano": "1994"
      },
      "nacionalidade": "BRASILEIRA",
      "estado_civil": "SOLTEIRO",
      "estado_civil_código": "solteiro",
      "município_naturalidade": "RECIFE",
      "uf_naturalidade": "PE",
      "genitores": "JOSÉ COSTA TESTE; MARIA COSTA TESTE",
      "profissão": "",
      "domicílio": ""
    },
    "cônjuge_2": {
      "nome_completo": "JULIANA MENDES COSTA TESTE",
      "nome_atual": "JULIANA MENDES COSTA TESTE",
      "cpf": "987.654.321-00",
      "nome_habilitação": "JULIANA MENDES TESTE",
      "nome_após_casamento": "JULIANA MENDES COSTA TESTE",
      "data_nascimento": {
        "dia": "03",
        "mês": "09",
        "ano": "1996"
      },
      "nacionalidade": "BRASILEIRA",
      "estado_civil": "SOLTEIRA",
      "estado_civil_código": "solteiro",
      "município_naturalidade": "OLINDA",
      "uf_naturalidade": "PE",
      "genitores": "PAULO MENDES TESTE; ANA MENDES TESTE",
      "profissão": "",
      "domicílio": ""
    },
    "casamento": {
      "tipo": "civil",
      "data_celebração": {
        "texto_completo": "VINTE E DOIS DE MARÇO DE DOIS MIL E VINTE E CINCO",
        "dia": "22",
        "mês": "03",
        "ano": "2025"
      },
      "local_celebração": "",
      "celebrante": "",
      "documentos_apresentados": "",
      "regime_bens": "COMUNHÃO PARCIAL DE BENS",
      "regime_bens_código": "comunhão parcial",
      "data_registro": {
        "texto_completo": "VINTE E DOIS DE MARÇO DE DOIS MIL E VINTE E CINCO",
        "dia": "22",
        "mês": "03",
        "ano": "2025"
      }
    },
    "observações": {
      "averbações_anotações": "",
      "anotações_cadastro": "",
      "outras_informações": ""
    },
    "inteiro_teor": {
      "texto": ""
    },
    "cartório": {
      "nome": "CARTÓRIO DO 1º OFÍCIO DE REGISTRO CIVIL DE RECIFE - PE",
      "cns": "123456",
      "município": "RECIFE",
      "uf": "PE",
      "endereço": "RUA DO EXEMPLO, 100, BOA VISTA, CEP 50000-000",
      "telefone": "",
      "email": ""
    },
    "autenticação": {
      "selo_digital": "",
      "consulta_autenticidade": "",
      "oficial_registro": "PEDRO EXEMPLO",
      "assinante": "MARIANA EXEMPLO",
      "cargo_assinante": "ESCREVENTE",
      "data_emissão": "25/03/2025",
      "número_papel": ""
    }
  },
  "engine": "large",
  "creditsCharged": 1.5
}

Quality & Reliability

Extraction built for your system

1344–2048 px
Image standard, where extraction reads best
3
AI engines with automatic fallback
0
Images stored after extraction
JSON
Fields with the certificate's official label

How It Works

Extract marriage certificate data in 3 simple steps

1

Create your API key

Sign up for free and generate an API key from the admin dashboard.

2

Send the certificate image

Make a POST request to the marriage certificate's endpoint with the image URL or base64-encoded image data.

3

Get structured JSON

Receive all extracted fields as clean, structured JSON ready for your application.

Frequently Asked Questions

Common questions about marriage certificate OCR

What file formats and sizes are accepted?

We accept PDF*, JPG, PNG, WebP and GIF files, up to 10 MB per document. You can send files via URL or Base64-encoded content in the API request. Our image standard is 1344 to 2048 px on the long side (for an A4 scan, about 120 to 175 DPI), where extraction reads best: an image outside it is refused at no charge, or resized on our side at the resize's price when the request sets resizeImage: true, which adds a little time to the answer. *Only the first page of a PDF is read.

Which marriage certificate models does the API read?

The certificate models issued from before 2010 to 2024, of civil marriages and religious marriages with civil effect, a divorce averbação included. The answer has the fields of all of these models: a field the certificate does not print comes back empty.

What about certificates in inteiro teor?

A certificate in inteiro teor is read when it fits one page: the registration's whole text comes in inteiro_teor.texto, and the answer's fields are filled from it.

How does the API tell the two spouses apart?

By the order the certificate prints them in: cônjuge_1 is the first and cônjuge_2 the second, with no gender assumed.

How accurate is the extraction?

Accuracy depends on the image quality and the document's condition: that is why our standard takes images of 1344 to 2048 px on the long side, where extraction reads best. If one AI engine fails on a document, another processes it automatically. We recommend testing with your own documents.

Is my data secure?

Yes. DocsOCR is 100% compliant with LGPD (Brazilian data protection law), GDPR, and CCPA. Document images are processed in real time and are not stored after extraction. Communication uses TLS 1.2 or 1.3, and stored data is encrypted at rest.

Start extracting marriage certificate data

Free credits included. No credit card required.