Documentation/REST API

REST API

The REST API exposes two data sets over the same key and base URL. The Intelligence API returns context-rich STIX 2.1 bundles. The IOC API returns lean, active indicators for blocklists and automation.

Base URL: https://api.threatlandscape.io/rest/v1

Authentication

Send your API key in the apikey header:

curl 'https://api.threatlandscape.io/rest/v1/stix_bundles?limit=1' \
  -H "apikey: YOUR_THREATLANDSCAPE_API_KEY"

Bearer authentication is also accepted:

-H "Authorization: Bearer YOUR_THREATLANDSCAPE_API_KEY"

Keep the key server-side. Do not ship it in browser code, commit it to a repository or write it to logs.

Quickstart: Intelligence API

Fetch the 10 most recent threat bundles with a focused set of fields:

curl 'https://api.threatlandscape.io/rest/v1/stix_bundles?select=bundle_id,source_type,threat_actors,malware_names,api_created_at&order=api_created_at.desc&limit=10' \
  -H "apikey: YOUR_THREATLANDSCAPE_API_KEY"

Endpoints

EndpointReturns
GET /stix_bundlesFull STIX 2.1 bundles with actors, malware, campaigns, CVEs, TTPs, indicators and relationships.
GET /actionable_iocsFull IOC history, deduplicated by value, including active and expired indicators.
GET /iocs_ipv4Currently active IPv4 indicators only.
GET /iocs_domainCurrently active domain indicators only.
GET /iocs_urlCurrently active URL indicators only.
GET /iocs_sha256Currently active SHA-256 indicators only.

Per-type IOC endpoints also exist for ipv6, md5 and sha1.

Quickstart: IOC API

# 20 most recently added indicators
curl 'https://api.threatlandscape.io/rest/v1/actionable_iocs?select=ioc_value,ioc_type,valid_until,created_at&order=seq_id.desc&limit=20' \
  -H "apikey: YOUR_THREATLANDSCAPE_API_KEY"

# All active malicious domains
curl 'https://api.threatlandscape.io/rest/v1/iocs_domain?select=ioc,valid_until&order=valid_until.desc' \
  -H "apikey: YOUR_THREATLANDSCAPE_API_KEY"

Filtering

The REST API uses PostgREST filter syntax. Scalar filters use operators such as eq,gte and in. Array columns use cs to mean “contains”.

# Darknet bundles
curl 'https://api.threatlandscape.io/rest/v1/stix_bundles?select=bundle_id,source_type,threat_actors&source_type=eq.darknet' \
  -H "apikey: YOUR_THREATLANDSCAPE_API_KEY"

# Bundles mentioning APT29
curl --get 'https://api.threatlandscape.io/rest/v1/stix_bundles' \
  -H "apikey: YOUR_THREATLANDSCAPE_API_KEY" \
  -d "select=bundle_id,threat_actors,malware_names,sectors" \
  -d "threat_actors=cs.{APT29}"

# Bundles referencing a CVE
curl --get 'https://api.threatlandscape.io/rest/v1/stix_bundles' \
  -H "apikey: YOUR_THREATLANDSCAPE_API_KEY" \
  -d "select=bundle_id,vulnerabilities,threat_actors,attack_patterns" \
  -d "vulnerabilities=cs.{CVE-2024-12345}"

Pagination

Use limit and offset, or the Range header. For stable pagination, order by seq_id.

# First page
curl 'https://api.threatlandscape.io/rest/v1/stix_bundles?select=bundle_id,seq_id&order=seq_id.desc&limit=10&offset=0' \
  -H "apikey: YOUR_THREATLANDSCAPE_API_KEY"

# Next page
curl 'https://api.threatlandscape.io/rest/v1/stix_bundles?select=bundle_id,seq_id&order=seq_id.desc&limit=10&offset=10' \
  -H "apikey: YOUR_THREATLANDSCAPE_API_KEY"

Incremental IOC sync

Use seq_id as a watermark. Save the highest value from each run and pass it as the starting point next time.

curl 'https://api.threatlandscape.io/rest/v1/actionable_iocs?seq_id=gt.12345&select=ioc_value,ioc_type,valid_until,seq_id&order=seq_id.asc' \
  -H "apikey: YOUR_THREATLANDSCAPE_API_KEY"

STIX output

stix_bundle contains the full STIX 2.1 bundle. The primary report object is first in objects, and object_refs links every actor, malware family, indicator, vulnerability and relationship in the bundle.

Full reference

Read the complete REST API reference on GitHub →

Related guides