Dataset
API specification and integration code datasets for AI training
An API specification dataset is a company's internal and partner API contracts, such as OpenAPI documents, GraphQL schemas, protobuf files, WSDL and AsyncAPI definitions, delivered with their version history. It is joined to the connector, webhook handler and middleware code that calls those APIs and to the request and error logs from the integrations. SourceX sources these to a buyer's spec from established software companies, SaaS vendors and systems integrators, drawing on spec repositories, API gateways and iPaaS tools. Each dataset is de-identified and licensed for an agreed permitted use.
Dataset manifest
Sourced to your spec- What it is
- API contracts with version history, the integration code that calls them and logs of real calls
- Typical systems
- Spec repositories in Git, Apigee, Kong, MuleSoft Anypoint, Boomi, Workato, Postman workspaces
- Typical history
- Varies by supplier; spec history follows the repository, call logs follow gateway retention
- Modality
- Spec files and source code, with structured request and error log records
- Delivery formats
- Specs in native YAML, JSON, SDL, .proto or XML; code as files; logs and joins as JSONL
- Preparation
- Keys, tokens and signing secrets removed; hostnames and tenant IDs replaced; payload values tokenized
- Licensing
- Scoped per API or integration; a contract a third party wrote depends on that party's terms
- Availability
- Sourced to your spec; pairing of spec, code and logs depends on the supplier's systems
What a delivery contains
Fields vary by source system and are fixed per order. A typical delivery includes:
| Field | Type | What it holds |
|---|---|---|
| api_id | string | Pseudonymous, stable ID for one API, shared by its spec versions, callers and log records. |
| style | object | REST, GraphQL, gRPC, SOAP or event-driven, with the definition format: OpenAPI, SDL, .proto, WSDL or AsyncAPI. |
| audience | object | Internal, partner or public exposure, and whether the supplier or a partner wrote the contract. |
| spec_versions | array | Each committed version of the definition with its date, declared version string and raw file. |
| operations | array | One entry per operation, RPC or channel: operationId or method name, path, parameters, schemas and declared responses. |
| auth_scheme | object | Declared security scheme, such as OAuth flows and scopes, API key location or mutual TLS, with credentials removed. |
| contract_diff | array | Changes between consecutive versions, classed as additive, breaking, deprecation or documentation only. |
| callers | array | Units that call the API: connector module, webhook handler, middleware, iPaaS flow or generated client, flagged generated or handwritten. |
| call_sites | array | Where each operation is used in caller code, with the retry, timeout, pagination and idempotency handling around it. |
| request_log | array | Sampled calls with operation, status, latency, attempt number and tokenized request and response bodies where logged. |
| error_catalog | array | Status codes and error body shapes observed in the logs, each flagged as declared or undeclared in the spec. |
| drift_findings | array | Mismatches between spec, caller code and observed traffic: undeclared fields, wrong types, unlisted statuses, pagination quirks. |
| redaction | object | Secrets removed, hostnames replaced and payload values tokenized, with the scope of token consistency. |
Field names from the table above; values are masked placeholders.
Example record
{
"api_id": "api_7c21e4",
"style": { "kind": "rest", "format": "openapi" },
"audience": { "exposure": "internal", "contract_author": "supplier" },
"spec_versions": [
{ "rev": 14, "committed": "2023-03-02", "info_version": "2.3.0" },
{ "rev": 15, "committed": "2023-08-17", "info_version": "2.4.0", "file": "specs/shipments/openapi.yaml" }
],
"operations": [
{ "operation_id": "listShipments", "method": "GET", "path": "/v2/shipments",
"parameters": ["status", "updated_since", "page_token", "page_size"],
"declared_responses": ["200", "400", "401"] }
],
"auth_scheme": { "type": "oauth2", "flow": "clientCredentials", "scopes": ["shipments.read"], "credentials": "[REMOVED]" },
"contract_diff": [
{ "from_rev": 14, "to_rev": 15, "class": "breaking",
"change": "response field carrier_code moved from required to optional" }
],
"callers": [
{ "caller_id": "int_wms_sync", "kind": "connector", "language": "python", "generated": false,
"path": "integrations/wms_sync/client.py" }
],
"call_sites": [
{ "caller_id": "int_wms_sync", "operation_id": "listShipments", "line": 88,
"handling": { "pagination": "stops on empty items, not on missing page_token",
"retry": "backoff on 429 and 503, honors Retry-After",
"comment": "# last page still returns a token, see bug_3310" } }
],
"request_log": [
{ "t": "2023-09-04T02:14:09Z", "operation_id": "listShipments", "status": 429, "attempt": 1, "retry_after_s": 30 },
{ "t": "2023-09-04T02:14:40Z", "operation_id": "listShipments", "status": 200, "attempt": 2,
"latency_ms": 612, "items": 0, "page_token_present": true }
],
"error_catalog": [
{ "status": 429, "declared_in_spec": false, "body_shape": { "error": "string", "retry_after": "integer" } },
{ "status": 503, "declared_in_spec": false, "body_shape": "text/html from the gateway" }
],
"drift_findings": [
{ "kind": "undeclared_status", "detail": "429 and 503 observed, absent from responses" },
{ "kind": "pagination", "detail": "final page carries a page_token with zero items" }
],
"redaction": { "secrets_removed": ["client_secret", "authorization_header"], "hosts": "replaced", "payload_values": "tokenized" }
}Synthetic record for illustration. Field names, structure and format are agreed per order.
What AI teams use it for
Tool calling on enterprise-shaped APIs
Operations convert to tool definitions with the irregular names, thin descriptions, scopes and near-duplicates an agent meets inside a real company.
Writing integration code from a spec
Spec in, working connector out: the handwritten callers are reference answers that include retries, pagination loops and idempotency keys.
Detecting spec drift and breaking changes
Version diffs and drift findings train a model to review a contract change and to flag where a spec no longer matches traffic.
Recovering from undocumented errors
Logged errors that the spec never declared, paired with how the caller handled them, teach recovery that a clean contract cannot.
Held-out evaluation on unseen APIs
Private contracts that were never published test whether a model can use an unfamiliar tool surface without having seen its documentation.
Use-case guides: Coding agents, Enterprise and computer-use agents, Private evaluation sets
What makes this data valuable
Spec, caller and log for the same API
All three artifacts join on one API and operation ID and cover overlapping dates.
Version history per contract
Several committed versions per API, not a single current file, make breaking changes visible.
Definitions that parse
Specs validate in their own format with references and imports resolved inside the delivery.
Undeclared behavior on record
Observed statuses and fields are compared with the spec and the differences are listed, not smoothed away.
Handwritten code separated from generated
Generated clients and stubs restate the spec, so they are flagged and handwritten callers carry the signal.
Protocol variety
REST, SOAP, gRPC, GraphQL and event contracts from one estate reflect what an internal agent is given.
System export
API specification dataset
Where the contract and the calling code disagree
A specification is a statement of intent. An OpenAPI document lists the paths, schemas and responses its author thought to declare, and is often generated once from code annotations or written before the service existed. Integration code is written against what the service does. The engineer who built the connector found that the last page still returns a cursor, that the rate limiter answers 429 with a body the spec never mentions, that the gateway in front of the service returns an HTML error page where JSON was promised, and that a webhook can arrive twice or out of order. Each discovery survives as a branch, a retry rule, a deduplication check on the event ID or a comment.
Neither artifact shows the drift alone. The spec looks clean, and the code shows defensive handling without saying which part departs from the contract. Request logs settle it, because they record which statuses and fields occurred. The pairing only works when the three are dated: the spec version in force when the caller was committed and a log window from the same period. Without dates, an apparent mismatch may only be a caller written against an older version.
Formats drift in different places. A protobuf message identifies each field on the wire by its number. Renaming a field leaves the binary encoding intact but not the JSON and text encodings, which use names. Reusing a number makes stored messages ambiguous to decode, so the numbers of deleted fields should appear as reserved. A GraphQL schema can usually be read from the running server by introspection, so its shape seldom lies, but nullability does, and a query that partly fails typically returns an errors array beside its data under a 2xx HTTP status. WSDL with XSD pins message structure tightly, while fault messages are often left undeclared. Ask which formats are in scope and how drift was detected in each.
Why internal APIs are the realistic tool surface
Public spec directories and developer portals hold the APIs a company chose to turn into a product: designed for outsiders, documented, consistently named. Behind them sit the interfaces a company never publishes: the services that call each other, back-office endpoints and partner feeds. Ask a supplier to count its APIs by audience, and the internal list is typically the longest. These interfaces look different. Naming changes from team to team, one endpoint is overloaded through an action parameter, descriptions are empty, retired versions still take traffic, and REST services sit beside SOAP interfaces from an ERP, gRPC between newer services and event topics that may have no contract at all.
An agent deployed inside a company is handed that surface as its tools. Training on public, well-described APIs teaches a model that descriptions can be trusted and parameters explain themselves. Internal specs teach it to choose among near-duplicate operations, to read meaning from schemas and examples when the description is blank, and to stay inside the scopes it was granted. The integration code adds the order of calls that completes a business task, which a spec almost never states.
The same privacy that makes these specs useful makes preparation harder. Keys and tokens hide in spec examples, Postman environments, iPaaS connection settings and curl snippets pasted into descriptions. Server URLs expose internal hostnames. Partner APIs raise a rights question: the contract may belong to the partner or be covered by its developer terms, so check that those terms allow the specification to be shared, and ask for each API to be flagged as internal, partner or public.
What to check before licensing
- Validate every spec in the sample with a parser for its format, and count the files that fail or point to references and imports missing from the delivery.
- Pick three operations and trace each from the spec to a call site and to log records. Confirm the IDs join and the dates overlap.
- Search specs, examples, Postman environments, iPaaS connection settings and code for API keys, bearer tokens, client secrets, webhook signing secrets and credentials inside URLs. Confirm anything found live was rotated.
- Ask which APIs were written by a partner or sit under a partner's developer terms or NDA, and have counsel check that those terms allow the specification and its responses to be shared.
- Ask how spec history was kept: commits of the file, gateway revisions or only the current version. Count versions per API on the sample.
- Count log records by status code and ask what was sampled or filtered. Ask whether request and response bodies were logged or only route, status and latency.
- Ask for iPaaS flows in the platform's own export format, and check that partner-confidential endpoints and internal hostnames are removed or replaced.
Delivery No files move before a signed license. A listing or a request grants no files by itself.
How licensing works through SourceX
- 1
Define
Send the domain, modality, volume, format, timeline and permitted use you need.
- 2
Source
SourceX identifies businesses that hold matching data and are open to licensing it.
- 3
Qualify
Fit, rights and quality are checked, and you review samples before committing.
- 4
License
Scope, permitted use, exclusivity, price and obligations are agreed in writing.
- 5
Deliver
Approved data is prepared, de-identified where required and transferred securely.
Questions Acquisition Partners ask
How is this different from public OpenAPI collections?
It holds contracts that were never published, together with the code and logs that show how each API behaves. Public collections hold contracts that companies wrote for outside developers, and anyone assembling a training corpus can already collect them. Internal and partner contracts differ in naming, documentation quality and protocol mix, and they come with version history, calling code and call logs that a published spec file lacks.
Does the dataset include real request and response payloads?
It can, where the supplier logged them and they can be prepared for release. Many gateways record only method, route, status and latency, and full bodies exist only for some integrations or in debug logs. Where bodies are delivered, customer values are tokenized and secrets removed.
Which specification formats can be included?
Any machine-readable contract the supplier maintains. OpenAPI and older Swagger documents are common, alongside GraphQL schema files, protobuf definitions for gRPC, WSDL with XSD for SOAP services and AsyncAPI for event channels. Postman collections and gateway exports can stand in where no formal spec exists.
Can the specs be turned into tool definitions for function calling?
Mostly, yes. An operation maps to a tool name, a description and a JSON Schema for its parameters. The conversion is not mechanical: OpenAPI 3.0 schemas are an extended subset of JSON Schema with their own nullable keyword, large or deeply nested schemas may exceed what a tool format accepts, and SOAP and gRPC contracts need a mapping layer. Convert from the native files yourself so the choices stay under your control.
How are API keys and internal hostnames handled?
They are removed or replaced before delivery, and the method is recorded for each dataset. The places to cover are specs, examples, code, configuration and logs, and hostnames and tenant IDs should be replaced with consistent placeholders so joins still work. No scrubbing method is perfect, so run your own secret scanner over the sample.
Can partner or third-party API contracts be included?
Only where the supplier has the right to share them. A contract written by a partner, or documentation received under a developer agreement, may be confidential to that partner. Rights review looks at this for each dataset, and you should confirm with counsel that the relevant API terms cover your intended use.
Related datasets
- Proprietary codebases with full history
Complete private repositories with full version history, build files, tests and docs
- ERP and CRM customization code
Customer-written platform code with tenant metadata, deployment history and the specification behind each change
- Low-code and no-code app definitions
Exported app and automation definitions with data models, formulas, flow steps, connectors, saved versions and run logs
- Tool-call and API traces
Ordered tool and API calls with schemas, arguments, responses, errors, retries and the task result
- Software engineering histories (issues, PRs, reviews)
Issues linked to commits, pull requests, code review, CI runs, deploys and incidents
Evaluating this data for procurement?
Diligence packets are prepared per dataset. Rights, privacy processing and quality differ between datasets.
Request dataset diligenceTell us what your models need
Send your spec — domain, volume, format, timeline and permitted use — and SourceX will match it against partner data and come back with what can be licensed.
Updated 26 November 2026.