> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# AML 数据集新鲜度 API

> 通过 Didit 查看制裁、PEP、警告和负面新闻数据集按来源类别的更新时效，作为 AML 监控的审计证据。



AML 数据集新鲜度 API 提示词
        将提示词复制到剪贴板



      
      

\<pre>

\`Read how current Didit's AML screening datasets are, so I can attach it to an audit of ongoing AML monitoring.

Endpoint:
GET https://verification.didit.me/v3/aml/dataset-freshness/

Authentication:
Use the x-api-key header with my Didit API key. A scoped key needs sessions: read. A key limited to some workflows or to approved sessions can't call this endpoint.

Goal:
\- Get, per AML source family (sanctions, pep, warnings, adverse_media), the most recent dataset update and the staleness bound, and store it next to the AML screening history I hand to an auditor.

Behavior:
\- Platform-wide: no session in the path, no customer data in the answer, the same answer for every application.
\- Always 200. When no reading exists, dataset_freshness is null and availability says why: "not_configured" (dataset dates are not collected in this environment) or "not_yet_collected" (collection is set up, no reading yet).
\- Dates are never estimated. A family whose datasets reported no date is absent from sources. A family where only some datasets reported a date has oldest_updated_at: null.
\- captured_at is when the dates were read. Readings are taken while ongoing monitoring runs, not on each call.

Example call:
curl -X GET "https://verification.didit.me/v3/aml/dataset-freshness/" \
-H "x-api-key: YOUR_API_KEY"

What to read from the response:
\- availability - "available", "not_configured" or "not_yet_collected". Check it before reading dataset_freshness.
\- dataset_freshness.captured_at - when the reading was taken.
\- dataset_freshness.sources.<family>.last_updated_at - the most recent update in that family.
\- dataset_freshness.sources.<family>.oldest_updated_at - every dataset in the family is at least this current; null when some dates are missing.
\- dataset_freshness.sources.<family>.dataset_count and dated_dataset_count - how many datasets the family has and how many reported a date.
\- dataset_freshness.catalog_version - the data source's own catalog version, when reported.

Failure modes:
\- 401 - the API key has expired.
\- 403 - missing key (a wrong, revoked or expired key gets 401) ({"detail": "You do not have permission to perform this action."}), a scoped key without sessions: read, a key limited to workflows or approved sessions, or a request from outside the key's IP list.
\- 429 - more than 600 GET requests per minute with this key; wait Retry-After seconds.

Side effects: none. Not billed.

For the full integration shape, see /integration/integration-prompt.`

\</pre>



      
      

粘贴到

使用此端点可查看持续监控筛查时所依据的名单版本。请将其与[证明监控已运行](https://docs.didit.me/zh/core-technology/aml-screening/continuous-monitoring-aml-screening.md#证明监控已运行)中描述的按主体筛查历史配合使用：历史记录显示每个主体的筛查时间，此端点则显示这些筛查所依据的数据集有多新。> [!NOTE]
>
> 缺失的日期会报告为缺失，绝不会替换为替代值。请先检查 `availability`：当它不是 `available` 时，`dataset_freshness` 为 `null`，没有可读取的内容。## 相关内容- [持续 AML 监控](https://docs.didit.me/zh/core-technology/aml-screening/continuous-monitoring-aml-screening.md)
- [AML 筛查 API](https://docs.didit.me/zh/standalone-apis/aml-screening.md)
- [API 密钥与范围限定的访问](https://docs.didit.me/zh/console/api-keys.md)


## OpenAPI

````yaml zh/openapi-25.json GET /v3/aml/dataset-freshness/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: 身份证件验证 API。使用 x-api-key 请求头进行身份验证。
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/aml/dataset-freshness/:
    get:
      tags:
        - Standalone APIs
      summary: 获取 AML 数据集的新鲜程度
      description: >-
        按来源类别（`sanctions`、`pep`、`warnings`、`adverse_media`）报告 AML
        筛查背后的数据集时效性，作为[持续 AML
        监控](https://docs.didit.me/zh/core-technology/aml-screening/continuous-monitoring-aml-screening#证明监控已运行)的审计证据。该响应是全平台范围的：路径中没有会话，请求体中没有客户数据，对每个应用返回相同的答案。


        对于接受的密钥始终返回 `200`。请先检查 `availability`：当其不是 `available`
        时，`dataset_freshness` 为 `null`。日期绝不会预估：数据集未报告日期的类别不会出现在 `sources`
        中，而仅有部分数据集报告了日期的类别其 `oldest_updated_at:
        null`。读数是在持续监控运行期间采集的，而不是在每次调用时采集；`captured_at` 说明了采集时间。


        受限 API 密钥需要 `sessions: read` 权限；仅限于某些工作流或仅限于已通过的会话的密钥无法调用此
        endpoint。不收取任何费用。
      operationId: get_aml_dataset_freshness
      parameters: []
      responses:
        '200':
          description: 最新的数据集新鲜度读数，如果无法获取，则为带有原因的 `null`。
          content:
            application/json:
              schema:
                type: object
                required:
                  - dataset_freshness
                  - availability
                properties:
                  dataset_freshness:
                    allOf:
                      - $ref: '#/components/schemas/AMLDatasetFreshness'
                    nullable: true
                    description: 最新读数，当 `availability` 不是 `available` 时为 `null`。
                  availability:
                    type: string
                    enum:
                      - available
                      - not_configured
                      - not_yet_collected
                    description: >-
                      `available` 表示存在读数；`not_configured`
                      表示在此环境中未收集数据集日期；`not_yet_collected` 表示已配置收集但尚无读数。
              examples:
                Available:
                  value:
                    dataset_freshness:
                      captured_at: '2026-10-17T06:00:12.345678+00:00'
                      provider: aml_data_source
                      catalog_version: 20261017054500-abc
                      sources:
                        sanctions:
                          last_updated_at: '2026-10-17T04:10:00+00:00'
                          oldest_updated_at: '2026-10-15T22:30:00+00:00'
                          dataset_count: 48
                          dated_dataset_count: 48
                        pep:
                          last_updated_at: '2026-10-16T23:05:00+00:00'
                          oldest_updated_at: null
                          dataset_count: 12
                          dated_dataset_count: 11
                    availability: available
                Not collected yet:
                  value:
                    dataset_freshness: null
                    availability: not_yet_collected
        '401':
          description: API 密钥已过期。仅创建时设置了到期日期的密钥才会过期；超过该日期后，使用它的每次请求都会返回 `401`。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Expired key:
                  value:
                    detail: This API key has expired.
        '403':
          description: 请求不被允许。缺失密钥将返回常规错误信息；错误、已撤销或已过期的密钥将收到 `401`。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Missing or invalid key:
                  value:
                    detail: You do not have permission to perform this action.
                Scoped key without sessions read:
                  value:
                    detail: This API key has no read access to sessions.
                Key limited to workflows or approved sessions:
                  value:
                    detail: >-
                      This API key only reaches sessions inside its workflow or
                      status limits, so it can't use this endpoint.
                Outside the key's IP list:
                  value:
                    detail: This API key can't be used from this IP address.
        '429':
          description: 使用此 API 密钥的 GET 请求每分钟超过 600 次。请等待 `Retry-After` 中指定的秒数，然后再重试。
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              examples:
                Throttled:
                  value:
                    detail: >-
                      GET request rate limit exceeded. You can make up to 600
                      requests per minute.
          headers:
            Retry-After:
              description: 距离当前一分钟窗口重置的秒数。
              schema:
                type: integer
                example: 23
            X-RateLimit-Limit:
              description: 在此预算中每分钟允许的请求数。
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: 当前时间窗口内剩余的请求数。
              schema:
                type: integer
            X-RateLimit-Reset:
              description: 窗口重置的 Unix 时间。
              schema:
                type: integer
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X GET
            'https://verification.didit.me/v3/aml/dataset-freshness/' \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.aml.retrieve_dataset_freshness()
            print(result)
        - lang: javascript
          label: Node.js
          source: |-
            import Didit from "@didit-protocol/sdk-node";

            // Reads DIDIT_API_KEY.
            const didit = new Didit();

            const result = await didit.aml.retrieveDatasetFreshness();
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.AML.RetrieveDatasetFreshness(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: |-
            import me.didit.Didit;

            // Reads DIDIT_API_KEY.
            Didit client = new Didit();

            var result = client.aml().retrieveDatasetFreshness();
            System.out.println(result);
        - lang: php
          label: PHP
          source: |-
            <?php

            require 'vendor/autoload.php';

            use Didit\DiditClient;

            // Reads DIDIT_API_KEY.
            $didit = new DiditClient();

            $result = $didit->aml->retrieveDatasetFreshness();
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Reads DIDIT_API_KEY.
            didit = Didit::Client.new

            result = didit.aml.retrieve_dataset_freshness
            puts result.to_h
        - lang: csharp
          label: .NET
          source: |-
            using System;
            using System.Text.Json;
            using Didit;

            // Reads DIDIT_API_KEY.
            using var client = new DiditClient();

            var result = await client.Aml.RetrieveDatasetFreshnessAsync();
            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    AMLDatasetFreshness:
      type: object
      description: 筛查运行时 AML 数据集的新鲜度。日期绝非估算值。
      required:
        - captured_at
        - provider
        - catalog_version
        - sources
      properties:
        captured_at:
          type: string
          format: date-time
          description: Didit 读取此新鲜度所依据的数据集目录的时间。
        provider:
          type: string
          description: AML 数据源的不透明标识符。请将其视为不透明字符串；请勿基于其进行分支判断。
          example: aml_data_source
        catalog_version:
          type: string
          nullable: true
          description: 数据集目录的版本标识符（如果源报告了该标识符）。
        sources:
          type: object
          description: 各类数据集的新鲜度。若某个类别的所有数据集均未报告更新日期，则该类别会被省略，而不是填充为 `null`。
          properties:
            sanctions:
              $ref: '#/components/schemas/AMLDatasetSourceFreshness'
            pep:
              $ref: '#/components/schemas/AMLDatasetSourceFreshness'
            warnings:
              $ref: '#/components/schemas/AMLDatasetSourceFreshness'
            adverse_media:
              $ref: '#/components/schemas/AMLDatasetSourceFreshness'
    AMLDatasetSourceFreshness:
      type: object
      description: 某类 AML 数据集的新鲜度。
      required:
        - last_updated_at
        - oldest_updated_at
        - dataset_count
        - dated_dataset_count
      properties:
        last_updated_at:
          type: string
          format: date-time
          description: 该系列中任何数据集的最新更新。
        oldest_updated_at:
          type: string
          format: date-time
          nullable: true
          description: 时效性界限：该组中的每个数据集都至少达到此时效性。当该组中至少有一个数据集未报告更新日期时为 `null`，因为此时界限未知。
        dataset_count:
          type: integer
          description: 该系列中的数据集数量。
        dated_dataset_count:
          type: integer
          description: 报告了更新日期的此类数据集数量。
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        您的应用 API 密钥，可在 Business Console 的“开发者 -> API
        密钥”中获取。主密钥拥有完整访问权限。指定名称的密钥可设置作用域：针对每个资源设为无权限、只读或读写，限定于特定工作流或已通过的会话、限定于
        IP 地址列表，以及设置到期日期。401 表示密钥错误、已撤销或已过期；403 表示未发送密钥、密钥无权访问该资源或操作，或请求来自其 IP
        列表之外的地址；在会话路由上返回 404 表示该会话不在该密钥允许的工作流或状态范围内。没有媒体访问权限的密钥获取到的图片、视频和 PDF
        URL 将为 null；没有会话写入权限的密钥获取到的会话链接和 token 将为 null。请参阅
        https://docs.didit.me/console/api-keys。

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.