Data type

Code datasets for AI training

Code datasets range from open corpora built from public repositories to private codebases that AI labs now buy from shut-down startups.

By

Published

What is a code dataset?

A code dataset is a collection of source code, often with its history, tests, issues and documentation, gathered so a model can learn to read, write and fix software.

Public code datasets and private codebases

There are two kinds of code dataset, and they sell for very different reasons. Public corpora collect code that is already on the open web, mostly from public repositories, and release it for anyone to train on under the original files' licences.

Private codebases are the source code a company wrote for its own product and never published. Most large coding models have already trained on the public material, which is why AI labs and the firms that build data for them have started paying for private code.

What the first sales fetched

A crypto startup's code base (MIT Technology Review, Oct 2026)
About $25,000
Dollars per codebase Turing was reported paying
Tens of thousands
Source: press reports listed in Sources

The buying is recent. In October 2026 MIT Technology Review reported a crypto startup selling its code base for about $25,000, with a sale of its workspace data from Google, Notion, Figma and Slack still pending. Earlier coverage reported that Turing, which builds coding data for labs, was paying tens of thousands of dollars per codebase from failed startups.

Public and private code datasets compared

Compiled by DataBroker from the sources listed at the foot of this page. Reported prices are as published, not confirmed by both parties.
Dataset or routeWhat it containsTermsReported price
The Stack v2 (BigCode)Over 3 billion files in 600+ languages from the Software Heritage archive; 67.5 TB in full, 32.1 TB deduplicatedGated; each file keeps its original licence; bulk download needs an agreement with Software Heritage and INRIA; owners can opt outFree to access under its terms
Turing SWE-bench Trajectory dataset1,441 human-in-the-loop solution paths for hard SWE-bench tasks, with human correctionsSold as part of Turing's coding data serviceNot published
Private codebase via a wind-down marketplaceRepositories, documentation and tests, sometimes with tickets and designsLicensed or sold to vetted buyers after PII and credentials are scrubbed (SimpleClosure AssetHub)About $25,000 for one crypto startup's code (MIT Technology Review, October 2026)
Private codebase sold to a data firmProduction code from failed startups, cleaned and relicensed for trainingBought outright by firms such as TuringTens of thousands of dollars per codebase, per company reports (Let's Data Science, December 2025)

Why labs pay for private repositories

  • It is new to the model. Public repositories have been scraped many times; a private product codebase has not.
  • It is real production code, written for paying users, with the tests, migrations and fixes that come with that.
  • Context raises the value. SimpleClosure's CEO told Upstarts Media that tickets and designs from tools such as Jira, Linear or Figma add value to code, and that rarer languages such as Ruby or C++ fetch more.
  • Scarcity beats size. The same interview says a smaller codebase can be worth twice as much as a larger one when what it contains is rare.
  • Buyers price on a research thesis: how many useful training tasks they can cut from the code, which MIT Technology Review says they estimate from measures like lines of code.
What a smaller codebase can be worth against a larger one, when what it holds is rare
2×
Rarer languages that fetch more
Ruby, C++
Source: SimpleClosure's CEO to Upstarts Media

To get a first estimate for your own repository, our codebase value calculator turns size, language and history into a range you can test against buyers. Our guide to selling software after a shutdown covers the process end to end, and workspace archives sold alongside code are covered on our conversational data page.

Rights to check before a codebase is sold

  1. 1

    Prove the company owns the code

    Check that every employee and contractor signed an IP assignment. Code a freelancer wrote without one may not be the company's to sell.

  2. 2

    List the open-source parts

    Vendored libraries keep their own licences. Buyers will want them identified, and some licences carry conditions that travel with the code.

  3. 3

    Strip secrets and personal data

    Remove API keys, credentials, customer records in fixtures and database dumps. A PII scanner catches the obvious cases before a human review.

  4. 4

    Get the right approvals

    In a wind-down or bankruptcy, the board, creditors or a court may need to approve the sale. Proceeds usually go to creditors and investors first.

  5. 5

    Decide what else is in the bundle

    Workspace archives sell too, but they hold staff messages. An attorney quoted by MIT Technology Review called such data legally radioactive; buyers say they scrub PII and exclude HR records.

Private code sells because most coding models have already trained on public code.

What DataBroker is, and isn't

DataBroker doesn't buy or hold codebases. We run a paid academy and a set of tools for people who broker data deals, including finding companies with code or data to sell, valuing it, checking the rights and introducing it to buyers. We can't promise a sale or a price; the figures above are what others have reported.

Sources

6 sources · checked Nov 9, 2026

Code datasets for AI training FAQ

Where can I find free code datasets?

Open corpora such as BigCode's The Stack v2 are free to access under their terms, which require you to respect each file's original licence. Benchmarks and smaller task sets are listed on Hugging Face and GitHub.

How much do AI labs pay for a codebase?

Public reports are thin. MIT Technology Review reported one startup codebase selling for about $25,000, and other coverage reported tens of thousands of dollars per codebase. Price depends on rarity, context and what the buyer can train on.

Can I sell code that uses open-source libraries?

Usually you can sell your own code, but the open-source parts keep their own licences. List them so the buyer can decide how to handle them, and have a lawyer check any copyleft components.

Does selling a codebase include the Git history?

Only if the agreement says so. Buyers often value commit history, tests and linked tickets, so decide what is in scope and scrub personal data from commit metadata and messages first.

Related

  • AI training data

    AI training data licensing explained: which datasets labs want, publicly reported deal values, and the copyright and transparency rules that now apply.

  • The codebase value calculator with 50,000 lines of code typed in at $100 an hour: an estimated rebuild cost of $2,218,060, 145.9 person-months of effort over 16.6 months with an average team of 8.8 people.
    Codebase value calculator

    A codebase value calculator that reads a public GitHub repository in your browser and estimates rebuild effort and cost with basic COCOMO.

  • How to sell software you have built

    How to sell software you have built, whether that means the whole product, the IP, or licensing the codebase as training data.

  • Can a bankrupt company sell customer data?

    Can a bankrupt company sell customer data? Often, but its old privacy promises follow the data into court, as RadioShack and 23andMe showed.

  • Conversational data for AI training

    Conversational data means real dialogue, from call recordings to chat and ticket logs; AI buyers want it consented, de-identified and labelled.

  • Dataset overlap

    Dataset overlap is the part of your data a lab already has; here is how labs measure it and how to measure it first.

Free tool

Try the codebase value calculator

A codebase value calculator estimates what it would cost to write a piece of software again, from its size in lines of code, an effort model such as COCOMO, and an hourly engineering cost.

  • Free
  • No sign-up
  • Runs in your browser