China SnapshotDocs
Get a key ↗
Open in AI ↗
Open in ChatGPTOpen in ClaudeView Markdown
Guides

Track an export-control topic

A worked collection-window query over the maintained export-controls topic, with the record's own new and revised labels.

Query the last 90 days#

This is a rolling first-collection window. It does not claim all publications released in that interval. The example makes one page request; follow next_cursor for the remaining matches.

python
import json
from datetime import datetime, timedelta, timezone
from urllib.parse import urlencode
from urllib.request import urlopen
today = datetime.now(timezone.utc).date()
query = urlencode({'dataset': 'documents', 'watch': 'export-controls',
                   'from': (today - timedelta(days=89)).isoformat(),
                   'to': today.isoformat(), 'limit': 20})
with urlopen('https://china-snapshot.com/api/datasets?' + query, timeout=30) as response:
    page = json.load(response)
assert isinstance(page['items'], list)
for item in page['items']:
    print(item['id'], item.get('change_type'), item['title'], item.get('source_url'))
print('More pages:', bool(page.get('next_cursor')))

Review relevance#

watch=export-controls is a reviewed, conservative list of English and Chinese title terms (export control, dual-use, 出口管制 and similar); every term names export control itself, so it misses documents whose title does not. Widen with q= passes when recall matters, screen the results and retain the exact query used. Check publisher and source document before treating a media report as a policy publication.

Read the record's labels#

change_typeSupported interpretation
newFirst collected by us, with no earlier publisher date to contradict it
newly_discoveredThe publisher date is more than two days before we first saw it
revisedA retained body with a different content hash was observed after first_seen; our observation, not the publisher's revision log

observation_count counts how often we collected the same URL: a repeat collection is not a new document.

Keep checking#

Poll what changed with dataset=documents&watch=export-controls&since=<last next_since>. Rolling out: the change feed, the document observation fields and revisions[] answer once database migration 043 is applied on a deployment. Before that, /api/changes and mode=changes answer HTTP 503 with code unavailable ("not yet enabled"), and list rows return the pending fields as null, named in unavailable_fields.

Search documentation