Back to Blog

What Is Data Extraction? From Unstructured Sources to Structured Data

July 31, 2026·
What Is Data Extraction? From Unstructured Sources to Structured Data

1. Definition of Data Extraction

Data extraction is the process of retrieving specific fields or records from a source and preparing them for use somewhere else, such as another file, a database, or an application. The source can already be highly organized, such as a database table, or largely unorganized, such as a scanned letter. What makes an activity "data extraction" is the goal: pulling out the particular pieces of information that matter for a given purpose, rather than working with the source as a whole.

2. Structured, Semi-Structured, and Unstructured Sources

These three categories describe how much organization a source already has before extraction begins. Structured data follows a predefined, consistent model, typically arranged in rows and columns, as in a relational database or a spreadsheet.10 Unstructured data has no predefined model imposed on it; it is often text-heavy, and can also include images, audio, or video with no inherent field-and-record layout.10 Semi-structured data sits between the two: formats such as JSON or XML have an overall organizing structure, expressed through tags or nested elements, without enforcing a single fixed schema the way a database table does.10 The amount of work extraction requires generally tracks this scale: pulling a column out of a structured table is comparatively direct, while pulling a specific fact out of unstructured text or an image requires more interpretation of the source before any value can be identified at all.

3. The Extraction Workflow

Across source types, extraction tends to follow the same general sequence: a source is identified, the relevant content is extracted from it, the result is validated, transformed into a consistent shape, enriched with metadata, and finally exported or stored.

Source Identification Extraction Validation Transformation Metadata Export or storage

Not every extraction task needs every stage in equal measure. Pulling a column from a database table barely touches identification, since the fields are already named and typed, while extracting a name and a date from a scanned letter depends heavily on it, since nothing is labeled until the extraction step figures out what each piece of text represents.

4. Identifying Fields and Records

Before anything can be extracted, the fields and records that matter have to be identified within the source. In a structured table this is close to automatic, since the schema already names each column. In a semi-structured file, identification means recognizing the relevant tags or keys among potentially many. In an unstructured document, identification is the hardest step: a system has to recognize that a particular block of text is, for example, an invoice date or a customer name, based on layout, position, or surrounding words, rather than any built-in label. Document-processing platforms describe this as detecting a document's structural elements, such as paragraphs, tables, and headings, as a precursor to pulling specific values out of them.3

5. Validation and Normalization

Once candidate values are identified, validation checks whether they look correct: whether a date is a real date, whether a required field is present, whether a value falls inside an expected range. Normalization then brings differently formatted values into one consistent shape, such as writing every date the same way or standardizing how a country name is spelled, so that records extracted from different documents or pages can be compared and combined without special-casing each source's original formatting.

6. Transformation and Metadata

Transformation reshapes validated, normalized values into whatever structure the destination expects, such as renaming fields to match a target database schema or combining several extracted values into one derived field. Metadata enrichment adds information about the extraction itself, or about the source, alongside the extracted values, such as which document a record came from, when it was extracted, or a confidence score for an automatically identified field. Layout-aware document processing tools generate this kind of contextual metadata directly, attaching information such as a chunk's position in the source document or its surrounding heading so that an extracted piece of content keeps its context even when it is later handled separately from the rest of the document.4

7. Export and Storage

The final step moves extracted, transformed records into wherever they are needed next: a file such as CSV or JSON, a database table, or directly into another application through its own import mechanism or API. Which target is appropriate depends entirely on how the data will be used afterward, whether that is a one-time analysis, an ongoing pipeline, or populating an existing system of record.

8. Web Pages and Web Applications

Extracting data from a web page means identifying elements within the page's Document Object Model and reading their content or attributes, then converting that into structured records. Because a web page is built to be read by people, not to expose a documented data contract, this kind of extraction is functionally close to web scraping, covered as its own topic elsewhere; the distinction in this article's terms is that "extraction" describes the broader activity, while "scraping" describes the specific technique used when the source, like a web page, was not built as a machine-readable feed.9

9. Emails and Message Data

Emails and chat or message exports combine structured metadata, such as sender, recipient, and timestamp, with a largely unstructured message body. Extracting useful data from this kind of source typically means keeping the structured metadata as-is while applying text-processing techniques to the body, for example to pull out a mentioned date, an attached file reference, or a specific requested piece of information buried in free-form text.

10. PDFs and Documents

PDF and other document formats can range from a text layer that is already selectable and machine-readable to a page that is effectively just an image. Where a genuine text layer exists, extraction can read it directly and then apply the same field-and-record identification used for any other semi-structured source. Layout-analysis tools built for this purpose identify a document's structural elements, such as titles, paragraphs, tables, and page headers or footers, as part of turning the document into something a program can query field by field.3,4,5

11. Scanned Material and OCR

When a document exists only as an image, whether a scanned page or a photograph, there is no text layer to read directly, so extraction depends on Optical Character Recognition, or OCR: technology that converts images of text into machine-readable text.6 Once OCR has produced text, the same kind of field identification, validation, and normalization used for other unstructured sources can be applied to it. Because OCR is itself estimating text from pixels, its output can contain recognition errors that later validation steps need to account for, particularly on low-quality scans or unusual fonts.

12. Reports and Legacy Systems

Older systems sometimes only expose data through generated reports meant for printing or on-screen reading, or through terminal-style interfaces with no modern export option. Extracting from these sources often means treating a generated report the same way as any other semi-structured or unstructured document: identifying fixed positions or repeating patterns in the output and reading values out of them, since there is no documented API standing between the extraction process and the underlying system.

13. Images, Audio, and Multimedia

Beyond text, extraction can target information embedded in images, audio, or video, such as an object detected in a photo, spoken words transcribed from audio, or a timestamped scene in a video. These forms of extraction rely on different underlying techniques, such as image recognition or speech-to-text, but they follow the same broader pattern as text-based extraction: identifying meaningful content within an unstructured source and converting it into structured, queryable fields.

14. Data Extraction versus Web Scraping

Data extraction is the general activity of retrieving selected data from a source. Web scraping is one specific method of data extraction, used specifically when the source is a web page not built as a documented data feed.9 Data extraction also covers cases with no web page involved at all, such as pulling fields out of a PDF, a scanned document, or a structured database export, none of which are web scraping.

15. Data Extraction versus ETL

ETL, short for Extract, Transform, Load, is a broader data-pipeline pattern in which data is pulled from a source, reshaped, and loaded into a target system such as a data warehouse.7 Data extraction corresponds to the first stage of that pattern. The distinction is one of scope: data extraction focuses on getting the right fields and records out of a source, while ETL describes the full pipeline around that step, including the transformation logic and the destination the data is ultimately loaded into.

16. Data Extraction versus Information Extraction

Information extraction is a specific field within natural language processing focused on automatically pulling structured information, such as names, dates, and relationships between entities, out of unstructured or semi-structured text.8 It is a technique data extraction can use when the source is text-heavy and the goal is to identify specific facts within it, rather than a separate activity. Data extraction is the broader umbrella term that also covers non-text sources and cases where no natural-language interpretation is required at all, such as reading a value directly out of a structured field.

17. Data Extraction versus OCR

OCR converts an image containing text into machine-readable text.6 It solves a narrower problem than data extraction: turning pixels into text, without necessarily identifying which parts of that text correspond to which fields. Data extraction from a scanned document typically uses OCR as an early step, then applies further identification, validation, and transformation to the resulting text to produce structured records.

18. Data Extraction versus Analysis

Data extraction produces structured records; data analysis works with those records afterward to answer a question, find a pattern, or support a decision. The two are sequential rather than interchangeable: analysis generally assumes the input data is already in a usable, structured form, which is exactly what the extraction stage is responsible for producing. Data that has not been extracted and validated properly can produce misleading analysis regardless of how sound the analytical method applied to it is.

19. Comparison Table

Primary goal Typical input Typical output Scope
Data extraction Retrieve specific fields or records from a source Structured, semi-structured, or unstructured sources Structured records Broad; covers the other rows as specific methods
Web scraping Retrieve data from a web page not built as a data feed HTML or a rendered web page Structured records Narrow; one method of data extraction
ETL Move and reshape data into a target system Data already identified from one or more sources Data loaded into a warehouse or target system Broad pipeline; extraction is its first stage
Information extraction Identify structured facts within text Unstructured or semi-structured text Named entities, relationships, structured facts Narrow; a text-focused technique data extraction can use
OCR Convert an image of text into machine-readable text A scanned or photographed page Plain text Narrow; a preprocessing step before further extraction
Data analysis Answer a question or find a pattern in data Structured records Findings, metrics, or a decision Downstream of extraction, not a form of it

Limitations

This article describes data extraction as a general concept and does not report the internal behavior, accuracy, or output of any specific commercial product; where a specific platform's documentation is cited, it is cited for the general concept it illustrates, such as document layout analysis or OCR, not as an endorsement or a benchmark of that platform against others. Terminology in this field is not perfectly standardized across the industry, and some organizations use these terms with different boundaries than the ones drawn here.

Last reviewed: 31 July 2026.

References

  1. Google Cloud, "Document AI overview".
  2. Google Cloud, "Extraction overview".
  3. Google Cloud, "Process documents with the layout parser".
  4. Microsoft Learn, "Document elements, Content Understanding".
  5. Microsoft Learn, "Document layout analysis, Document Intelligence".
  6. IBM, "What Is Optical Character Recognition (OCR)?".
  7. Microsoft Learn, "Extract, transform, load (ETL)", Azure Architecture Center.
  8. Singh, S., "Natural Language Processing for Information Extraction", arXiv:1807.02383.
  9. Open Data Handbook, "Scraping".
  10. National Institute of Standards and Technology, NIST Special Publication 1500-1r2, NIST Big Data Interoperability Framework.
  11. Ferrara, E., De Meo, P., Fiumara, G. and Baumgartner, R., "Web Data Extraction, Applications and Techniques: A Survey", arXiv:1207.0246.

Disclosure: Mastros develops browser-based data-export software. This article is intended as a general technical reference and was prepared using the independent sources cited above.