Engineering guide

How to Build a Resume Parser (and When Not To)

We build and run a resume parser, so this guide is written from what actually takes the time. It covers how a parser works, three ways to build one, the problems you will hit, and when it makes more sense to use an API.

What a resume parser does

Every resume parser, however it is built, runs the same four stages:

  1. Text extraction. Get text out of PDF and DOCX files in the right reading order.
  2. Segmentation. Find the sections: contact details, experience, education, skills.
  3. Field extraction. Turn each section into fields: employer, title, start and end dates, degree, institution.
  4. Normalisation and validation. Put dates, skills and names into a consistent format and reject results that do not make sense.

The first stage is covered step by step in how to parse a resume in Python. This guide focuses on the rest.

Approach 1: rules and section headings

The simplest parser looks for known headings and groups the lines under each one. Here is a working version:

split_sections.py
import re

HEADINGS = {
    "experience": ["experience", "work experience", "employment", "work history"],
    "education": ["education", "academic background"],
    "skills": ["skills", "technical skills", "core competencies"],
    "certifications": ["certifications", "licenses"],
    "languages": ["languages"],
    "summary": ["summary", "profile", "about me"],
}

def split_sections(text: str) -> dict:
    """Group resume lines under the nearest known section heading."""
    sections, current = {"header": []}, "header"
    for line in text.splitlines():
        clean = re.sub(r"[^a-z ]", "", line.lower()).strip()
        match = next((name for name, words in HEADINGS.items() if clean in words), None)
        if match:
            current = match
            sections.setdefault(current, [])
        elif line.strip():
            sections[current].append(line.strip())
    return sections

for name, lines in split_sections(text).items():
    print(f"{name}: {lines[:2]}")

On a clean single-column resume it works well:

header: ['Maria Lopez', 'Senior Backend Engineer']
summary: ['Backend engineer with 7 years of experience building Python and Go services on AWS.']
experience: ['Senior Backend Engineer, Northwind Logistics (Mar 2021 - Present)', 'Leads the routing API team. Moved order processing to event-driven services on Kafka.']
education: ['B.S. Computer Science, University of California, Davis (2013 - 2017)']
certifications: ['AWS Certified Solutions Architect - Associate, Amazon Web Services, May 2022']
skills: ['Python, Go, PostgreSQL, Kubernetes, AWS, Kafka, Docker']
languages: ['English, Spanish']

It fails as soon as a resume uses a heading you did not list ("Where I've worked"), puts headings in a sidebar, or writes in another language. You still have to split each experience line into title, employer and dates, and every candidate formats those differently. Rules are fast and free to run, but the list of exceptions never ends.

Approach 2: a trained NLP model

The next step up is named-entity recognition: train a model (for example with spaCy) to tag spans of text as job title, company, date or degree. It copes with more variation than rules, but you need hundreds of hand-labelled resumes to train it, and it still depends on getting clean text in the right order from stage one.

Approach 3: a large language model

Today the most accurate approach is to send the extracted text to a large language model with a strict JSON schema and instructions for each field. It handles unfamiliar layouts and headings without new rules, and can normalise dates in the same step. This is the approach CV Parser Pro uses. The model call is the easy part; the work is around it:

  • Models sometimes return invalid JSON or invent values, so every response has to be validated and retried.
  • Cost and speed depend on resume length and model choice, and need watching at volume.
  • Model providers retire models, so you have to re-test and switch from time to time.

The problems that take the most time

Whichever approach you choose, these are the cases that eat the schedule:

  • Multi-column layouts. PDF text comes out row by row across both columns, mixing the sidebar into the job history unless you detect columns first.
  • Broken text. Words split across lines, ligatures, and invisible characters that break matching and databases.
  • Dates. "Mar 2021", "03/21", "2021 - Present", "Spring 2019", and ranges with no year at all.
  • Right-to-left scripts. Arabic and Hebrew resumes often come out of PDFs in reversed visual order.
  • Scanned resumes and photos. No text layer at all, so you need OCR before anything else works.
  • Files that are not resumes. Cover letters, screenshots and empty files need to be detected and rejected, not parsed into nonsense.

Build or buy?

BuildUse an API
Time to first resultDays for a prototypeMinutes
Real-world accuracyGrows with the time you investAvailable immediately; test on your own resumes
Ongoing workLayouts, model changes, monitoringNone on your side
Cost per resumeYour compute or model costs$0.02 to $0.06 with CV Parser Pro
Control over dataCompleteFiles are sent to the provider

Build if parsing is the product you sell, or if documents must never leave your servers. Otherwise an API gets you structured candidates now and lets you spend your time on what makes your product different.

Test a parser before you build one

Run your own resumes through the CV Parser Pro API. 10 free parses, no credit card.

See the resume parser API

Frequently Asked Questions

A prototype that extracts text and contact details takes a day or two. Reliable work history, education and skills across real-world resumes, with multi-column layouts, inconsistent dates and many languages, is a much longer project that also needs ongoing testing as resume styles change.

Yes, there are several open-source projects, most built on rules or NLP models such as spaCy. Check when each was last updated and test it on your own resumes before relying on it; accuracy varies a lot with resume layout.

Yes. Send the extracted text to a language model with a JSON schema and instructions. It handles varied layouts far better than rules, but you still need text extraction, validation of the output, retries on bad responses, and cost control per resume.

Build if parsing is core to your product, you need full control over the data, or you have very unusual documents. Buy if you need good results across ordinary resumes now and would rather spend engineering time on your own product.