Written and maintained by CASRAI Editorial Board
Published · Last updated
On this page
STIX and TAXII are the two OASIS standards that let organisations exchange cyber threat intelligence in machine-readable form. STIX (Structured Threat Information Expression) is the JSON language that describes the intelligence, such as indicators, malware, threat actors and the relationships between them. TAXII (Trusted Automated eXchange of Intelligence Information) is the application-layer protocol, a RESTful HTTPS API, that moves that content between a TAXII server and a TAXII client. Both are published as OASIS Standards at version 2.1 (10 June 2021). They matter to researchers because shared threat data often arrives in this format.
What STIX and TAXII are used for in research
The TAXII 2.1 specification describes TAXII as a protocol for the communication of cyber threat information in a simple and scalable manner. STIX supplies the vocabulary; TAXII supplies the plumbing. A researcher who studies malware campaigns, builds detection datasets or evaluates sharing communities usually meets the pair in one of three ways: pulling a feed from a TAXII server, publishing a collection of findings to one, or reading STIX files exported from a platform such as MISP.
For the underlying discipline, see the CASRAI guide to threat intelligence. STIX is the format in which many of its outputs are expressed; for example, ATT&CK-style behaviour is represented with the STIX Attack Pattern object, and sharing rules such as the Traffic Light Protocol are represented in STIX as a TLP marking object type. Public indicator feeds such as URLhaus publish the same kind of indicator data that a STIX Indicator object is designed to carry.
How STIX models intelligence
The STIX 2.1 specification describes the language as a graph: objects are the nodes and relationships are the edges. It defines 18 STIX Domain Objects (SDOs) in its overview list: Attack Pattern, Campaign, Course of Action, Grouping, Identity, Indicator, Infrastructure, Intrusion Set, Location, Malware, Malware Analysis, Note, Observed Data, Opinion, Report, Threat Actor, Tool and Vulnerability. Section 4 of the specification also defines an Incident object. Each corresponds to a concept commonly used in cyber threat intelligence (CTI).
The edges come from two STIX Relationship Objects (SROs). The generic Relationship object links two objects; the specification notes that relationships are not restricted to the listed types and can be created between any objects using the related-to type or user-defined names. The Sighting object records that an entity has “seen” an SDO, such as an indicator, and exists as a separate SRO because it carries extra properties such as a count. STIX also uses ID references for embedded relationships, for example created_by_ref pointing to an Identity.
Every STIX object carries the common properties type, spec_version, id, created and modified. The specification says spec_version must be 2.1 for objects defined by STIX 2.1, and that all objects sharing an id are versions of the same object. An Indicator additionally requires a pattern written in the STIX Patterning Language, which conforming implementations must support.
A STIX Bundle is simply a container for arbitrary STIX objects. The specification states that a bundle has no semantic meaning and that objects in the same bundle are not considered related by virtue of sharing it. It is transient, so implementations should not assume other systems will keep it as a persistent object.
How TAXII organises sharing
TAXII defines two sharing models. Collections are request-response repositories: a producer hosts a set of CTI that consumers request. Channels are publish-subscribe, letting producers push data to many consumers. The 2.1 specification reserves the keywords for Channels but does not define Channel services, so in practice a 2.1 integration means working with Collections. Collections and Channels are grouped into API Roots, which let a single server divide content and access control by trust group; one server can host a separate API Root for each sharing group.
How to install or access it
There is nothing to install to read the standards: both are open documents on the OASIS docs server (links under Sources). To work with the formats in code, OASIS maintains two open-source Python libraries under its CTI technical committee, both BSD-3-Clause licensed:
- taxii2-client (repository cti-taxii-client) is a minimal client for TAXII 2.x servers, used as a Python library only; the project documents no command-line client. Install it with
pip install taxii2-client. - stix2 (repository cti-python-stix2) is a Python library for creating and parsing STIX 2 content. Install it with
pip install stix2; the project lists Python 3.6 or later as its requirement.
To consume data you also need a TAXII server URL and, usually, credentials from its operator. The TAXII 2.1 specification requires servers to accept HTTPS requests over TLS 1.2 (TLS 1.3 or higher is recommended) and recommends support for HTTP Basic authentication, so most feeds you can reach require an account issued by the publisher.
Step-by-step: pull objects from a TAXII 2.1 server
The steps below follow the usage documented in the taxii2-client README. Replace the example URL and credentials with the ones your feed operator gave you.
- Install the client:
pip install taxii2-client. - Connect to the discovery endpoint. The client imports the latest supported TAXII version by default; to name 2.1 explicitly use the v21 module:
from taxii2client.v21 import Server server = Server('https://example.com/taxii2/', user='user_id', password='user_password') print(server.title)The Server object lazily loads and caches the title, description, contact, default API root and the list of API roots.
- Pick an API root and a collection:
api_root = server.api_roots[0] collection = api_root.collections[0]An ApiRoot exposes title, description, max_content_length and collections; a Collection exposes its own metadata.
- Fetch objects:
collection.get_objects(). - Page through large collections:
from taxii2client.v21 import as_pages for bundle in as_pages(collection.get_objects, per_request=50): ...The as_pages helper requests the data in chunks of the size you set with per_request.
- Publish (only if your account is allowed to write):
collection.add_objects(stix_bundle), where the argument is the STIX content you built, for example with the stix2 library.
Underneath, these calls map to the endpoint table in the data table below, which lists the TAXII 2.1 endpoints with their HTTP methods and purposes, taken from the specification.
Output and how to read it
TAXII 2.1 requests and responses use the media type application/taxii+json, optionally with the version=2.1 parameter, and the specification requires clients to put at least one TAXII media range in the Accept header. The specification’s change list notes that 2.1 replaced the STIX Bundle with a TAXII Envelope as the response wrapper for object lists, so the content you pull is the Envelope’s payload of STIX objects rather than a single bundle file.
To make sense of what you retrieve, read in this order:
- type tells you which kind of object it is (indicator, malware, relationship and so on).
- created, modified and id let you de-duplicate: objects with the same id are versions of one object, so keep the latest modified value.
- Indicator pattern holds the detection logic in STIX Patterning; the indicator also carries a time window for when it is valid or useful.
- Relationship and Sighting objects connect indicators to the malware, tools, attack patterns, campaigns, intrusion sets and threat actors they relate to, so load them together with the objects they reference.
- Markings such as a TLP marking tell you sharing limits before you redistribute or publish the data.
Filtering is done on the server through URL parameters. The Objects endpoint accepts added_after (a single timestamp; without it the server returns the oldest matching objects first) and match filters such as match[type], match[id] and match[spec_version]. Without a spec_version filter the server returns only the latest specification version of each object.
Troubleshooting
The request is rejected or returns nothing useful
Check the Accept header first. The TAXII specification says every request must include a media range with at least one TAXII media range, and servers answer with the matching Content-Type. The taxii2-client library sets this for you, so header errors usually come from hand-written requests.
Connection or authentication fails
Servers must accept HTTPS using TLS 1.2 or higher, so plain HTTP URLs will not work against a conforming server, and a server that implements HTTP Basic authentication expects the user and password you pass to Server(). The credentials come from the feed operator, not from the standard.
A publish request does not return the stored objects
Adding objects to a collection is the POST to the objects endpoint, and the server reports the outcome through a status resource at {api-root}/status/{status-id}/. The specification advises that once a status shows complete, clients should not poll that status ID again, and a server returns 404 for a status ID that is no longer available.
You get only part of a large collection
Responses are paged. Use the as_pages helper from the client, or the next and limit mechanics of the protocol, and check the API root’s maximum content length when your own requests are large.
Objects look outdated or duplicated
Use added_after to ask only for objects added since your last pull, and de-duplicate on id plus modified, as described above.
Free alternatives and companions
STIX and TAXII are open standards, and the OASIS libraries are free to use under the BSD-3-Clause licence. Which tool you need depends on the job:
| Tool | Role | Source |
|---|---|---|
| taxii2-client | Python client for TAXII 2.x: discovery, API roots, collections, get and add objects, manifests, status | OASIS cti-taxii-client repository |
| stix2 | Python library for creating and working with STIX 2 content | OASIS cti-python-stix2 repository and docs |
| MISP | Threat-intelligence sharing platform covered in a separate CASRAI guide | See the MISP guide |
| CISA Automated Indicator Sharing (AIS) | No-cost, real-time exchange of machine-readable indicators; participants need a STIX/TAXII capability, either an open-source TAXII 2.1 client or a commercial one | CISA AIS page |
CISA describes AIS as a no-cost capability and encourages sharing through a bidirectional AIS TAXII connection. It is a concrete example of a real programme that consumes both standards, and the open-source client route it names is the same kind of library described above. Check the CISA page for current programme and legal status before relying on it.
Frequently asked questions
What is the difference between STIX and TAXII?
STIX is the data language: JSON objects that describe threat intelligence and its relationships. TAXII is the transport: a RESTful API for exchanging that content over HTTPS. You can use STIX without TAXII (for example by exchanging files), but TAXII 2.1 is built to carry STIX content.
Which version should I use?
Both STIX 2.1 and TAXII 2.1 are OASIS Standards dated 10 June 2021 and are designed to be used together. The taxii2-client library supports 2.x servers, and its v21 module targets 2.1.
Does TAXII support publish-subscribe?
The 2.1 specification reserves the keywords for Channels, the publish-subscribe model, but does not define Channel services. Collections, the request-response model, are what 2.1 servers implement.
Is a bundle the same as a TAXII response?
No. A STIX bundle is a container with no semantic meaning. TAXII 2.1 responses for object lists use a TAXII Envelope in place of the STIX Bundle used in earlier versions.
Can I share STIX data I downloaded?
Check the markings. STIX supports a TLP marking object, and the sharing rules of the originating community apply; see the Traffic Light Protocol guide.
Where does it fit with MITRE ATT&CK?
STIX is the format used to represent attack patterns and relationships; for the framework itself, read the MITRE ATT&CK guide.
Sources
- OASIS, STIX Version 2.1, OASIS Standard, 10 June 2021: docs.oasis-open.org/cti/stix/v2.1/os/stix-v2.1-os.html (read 2026-11-14).
- OASIS, TAXII Version 2.1, OASIS Standard, 10 June 2021: docs.oasis-open.org/cti/taxii/v2.1/os/taxii-v2.1-os.html (read 2026-11-14).
- OASIS cti-taxii-client README: github.com/oasis-open/cti-taxii-client (read 2026-11-14).
- OASIS cti-python-stix2: github.com/oasis-open/cti-python-stix2; documentation at stix2.readthedocs.io (read 2026-11-14).
- CISA, Automated Indicator Sharing (AIS): cisa.gov (read 2026-11-14).
Data: TAXII 2.1 API endpoints and what each does
Compiled from the OASIS TAXII Version 2.1 Standard (10 June 2021): the endpoints a client calls, their HTTP methods and the resource each returns or changes. Paths are relative to the discovery URL or API root.
Period covered: 2021.
| Endpoint | HTTP method | Path | Purpose |
|---|---|---|---|
| Discovery | GET | /taxii2/ | Lists the API roots a server offers |
| API Root | GET | {api-root}/ | Returns the API root title, supported versions and maximum content length |
| Collections | GET | {api-root}/collections/ | Lists the collections available in the API root |
| Collection | GET | {api-root}/collections/{id}/ | Returns the metadata of one collection |
| Objects | GET, POST | {api-root}/collections/{id}/objects/ | Retrieves objects from, or adds objects to, a collection |
| Object | GET, DELETE | {api-root}/collections/{id}/objects/{object-id}/ | Retrieves or deletes a single object |
| Manifest | GET | {api-root}/collections/{id}/manifest/ | Returns metadata about the objects in a collection |
| Status | GET | {api-root}/status/{status-id}/ | Reports the outcome of an add-objects request |
Sources
- TAXII Version 2.1, OASIS Standard (accessed 2026-11-14)
Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.







