mlab IOC Extraction API

Pull indicators out of raw text, with optional SMS threat scoring.

GitHub OpenAPI

Operations 1

POST /api/v1/scan/ioc Extract IOCs from text #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mlab-sh:mlab-sh-ioc-extraction-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mlab-sh-ioc-extraction-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: mlab.sh IOC Extraction API
  version: 1.0.0
  description: 'The **mlab.sh** REST API lets you launch domain security scans, look up IP, crypto, hash, URL, email, phone and MAC intelligence, extract IOCs from raw text, analyze files and scripts, triage indicator lists, run RedKit audits, schedule scans, work on cases and inspect SSL certificates programmatically.


    All endpoints are authenticated with an API key sent in the `Authorization` header. Generate a key from **Organization → Settings → API keys** on mlab.sh. A key belongs to the organization and carries permissions chosen when it is created (`scan.lookup`, `scan.domain`, `scan.file`, `scan.batch`, `redkit`, `watchdog.read`, `watchdog.write`, `cases.read`, `cases.write`, `tags.read`, `tags.write`, `webhooks.manage`, or full access). A call outside the key''s permissions returns **403** naming the missing permission; organization and account settings are never reachable with a key. `webhooks.manage` is the one exception and is **never part of full access**: it must be ticked by name (a full-access key can hold it too). It lets a key register signed webhook endpoints and list or delete only the ones it registered itself.


    **Working through an AI agent?** Prefer the Model Context Protocol server at `https://mlab.sh/mcp` (Streamable HTTP, OAuth 2.0 or an `mcp_` token). It exposes 48 tools covering most of what is below plus CVE search, threat-actor attribution, SBOM scanning, cases and workspace memory, cluster and Proxmox inspection and offline indicator lookups that consume no scan quota, so it is a wider surface than this REST API rather than a wrapper over it. See https://doc.mlab.sh/docs/mlab.sh/integrations/mcp and https://mlab.sh/llms.txt.


    **Permissions.** Each operation lists the API key permission it needs (`x-api-key-permission`). Keys created before 2026-10-01 were migrated to full access.


    **Expiry.** A key is created with a lifetime (90 days by default; 30, 180, 365 days or never). An expired key is answered **401**, like an unknown one. The expiry date shows in Organization → Settings → API keys.


    **Quota headers.** Every call that spends scan quota answers with `X-RateLimit-Limit` (the plan''s limit for that scan type), `X-RateLimit-Remaining` (what is left after this call), `X-RateLimit-Resource` (the scan type) and `X-RateLimit-Window` (86400: quotas count a rolling 24 hours, so there is no fixed reset time). Unlimited plans send none.'
  contact:
    name: mlab.sh support
    email: contact@cyberdream.io
    url: https://mlab.sh
  license:
    name: Proprietary
  x-source-of-truth: html/openapi.json in the mlab.sh app repository, served at https://mlab.sh/openapi.json. The docs repository generates openapi.yaml from it with scripts/sync-openapi.mjs.
servers:
- url: https://mlab.sh
  description: Production
security:
- ApiKeyAuth: []
tags:
- name: IOC Extraction
  description: Pull indicators out of raw text, with optional SMS threat scoring.
paths:
  /api/v1/scan/ioc:
    post:
      tags:
      - IOC Extraction
      summary: Extract IOCs from text
      operationId: extractIocs
      description: 'Pulls every indicator (IPs, domains, URLs, emails, hashes, crypto addresses, CVEs...) out of up to 1 MB of raw text, grouped by kind, each with its mlab analysis link. At most 500 are returned; `truncated` says when the list was cut.


        **Defanged text is read as written by people.** `hxxp://`, `hxxps://`, `[.]`, `(.)`, `[dot]`, `[:]`, `[at]` and `fxp://` are refanged before extraction, so `hxxp://evil[.]example[.]net/x` comes back as the URL `http://evil.example.net/x`. What mlab''s own exports defang reads back as itself.


        **SMS threat scoring.** `risk=true` (or `fast`) adds a `risk` block from a fully offline scorer, fast enough for a filtering app''s blocking path. `risk=deep` also unmasks shortened links and checks raw-IP hosts, which makes outbound requests: keep it off the blocking path.


        **API key permission:** `scan.lookup`.'
      parameters:
      - name: risk
        in: query
        required: false
        description: 'Add SMS threat scoring: `true`/`fast` (offline) or `deep` (network).'
        schema:
          type: string
          example: 'true'
          enum:
          - 'true'
          - fast
          - deep
      - name: country
        in: query
        required: false
        description: Keyword and brand pack for the scorer. `pays` is accepted as an alias.
        schema:
          type: string
          example: fr
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - text
              properties:
                text:
                  type: string
                  maxLength: 1048576
      responses:
        '200':
          description: Indicators grouped by kind.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  iocs:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: object
                        properties:
                          value:
                            type: string
                          link:
                            type: string
                  ioc_total:
                    type: integer
                  truncated:
                    type: boolean
                  risk:
                    type: object
                    description: Only with `risk`.
                    properties:
                      score:
                        type: integer
                        minimum: 0
                        maximum: 100
                      band:
                        type: string
                        enum:
                        - clean
                        - suspect
                        - high
                        - critical
                      action:
                        type: string
                        enum:
                        - allow
                        - quarantine
                        - drop
                      reasons:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                            weight:
                              type: integer
                            label:
                              type: string
                      mode:
                        type: string
                        enum:
                        - fast
                        - deep
                      country:
                        type: string
                      deep:
                        type: array
                        items:
                          type: object
                        description: Per-URL resolution, `deep` only.
              example:
                status: ok
                ioc_total: 1
                truncated: false
                iocs:
                  url:
                  - value: https://colis-livraison.top/suivi
                    link: https://mlab.sh/url?q=https://colis-livraison.top/suivi
                risk:
                  score: 85
                  band: critical
                  action: drop
                  mode: fast
                  country: fr
                  reasons:
                  - code: parcel_lure
                    weight: 30
                    label: Parcel delivery lure
        '400':
          description: Missing or malformed input. The body carries the reason.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      x-api-key-permission: scan.lookup
components:
  responses:
    Unauthorized:
      description: Invalid or missing API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            status: error
            message: Invalid or missing API key.
    Forbidden:
      description: The API key lacks the permission this endpoint needs, or the endpoint is not open to API keys (organization and account settings never are).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: This API key does not have the 'cases.write' permission (Write cases). An owner or admin can add it in the organization settings.
  schemas:
    Error:
      type: object
      properties:
        status:
          type: string
          example: error
        message:
          type: string
          example: Description of what went wrong.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Your API key, prefixed with `token `. Example: `Authorization: token mlab_your_api_key_here`. Each key only reaches the endpoints its permissions allow.

        '