Skip to main content

Tutorial5 min

Search the archive

Find reports by the words in their title and Markdown body. Search takes the same filters and cursor as the feed, and returns the same page shape.
API reference
Endpoint
GET /reports/search
Auth
X-API-Key
Query
q, cursor, pageSize, filters
Returns
200 { data, pageSize, nextCursor }

Before you start​

  1. A Core API base URL

    Pick the environment you are building against. Base URLs has the details.

    • ProductionProvided at onboardingMutual TLS required
    • Sandboxhttps://staging-api.emergentriskinternational.com/api/v1Same contract as production
    • Localhttp://127.0.0.1:3001/api/v1apps/backend on your machine
  2. An API Key

    Organization-scoped, sent in the X-API-Key header and issued by ERI support. See Authentication.

  3. The feed tutorial

    Paging and filters work exactly as in Ingest the report feed. This guide covers what search adds.

  1. Step 1: Send a query​

    Put the search phrase in q, 1 to 200 characters. It matches whole words in the title and body, ignoring case and word endings: bulletins finds a report titled "Cyber Threat Bulletin".

    q reads the text only, not the tags. To match a region, topic or other tag, use the filters in step 3.

    Results come back newest first, like the feed, not ranked by relevance.

    No match is a 200 with an empty data array.

    Terminal
    export CORE_API_BASE_URL="http://127.0.0.1:3001/api/v1"
    export ERI_API_KEY="<raw API Key from bootstrap or ERI support>"
    curl -G "$CORE_API_BASE_URL/reports/search" \
    -H "X-API-Key: $ERI_API_KEY" \
    --data-urlencode "q=cyber threat"
    200 OK
    {
    "data": [
    {
    "id": "01a04100-0000-7000-8000-000000000004",
    "title": "Baltic Corridor - Cyber Threat Bulletin",
    "publicationDate": "2026-08-29T10:53:16.189Z",
    "region": "Europe",
    "reportType": "Rapid Reaction Brief",
    "regions": ["Europe"],
    "countries": ["Estonia", "Latvia", "Lithuania"],
    "topics": ["Cyberthreat"],
    "sectors": ["Maritime"]
    }
    ],
    "pageSize": 50,
    "nextCursor": null
    }
  2. Step 2: Refine the phrase​

    q understands a small search syntax:

    • Separate words must all appear: cyber threat.
    • Quotes keep words together and in order: "cyber threat".
    • or accepts either side: cyber or political.
    • A leading minus excludes a word: bulletin -baltic.
    curl -G "$CORE_API_BASE_URL/reports/search" \
    -H "X-API-Key: $ERI_API_KEY" \
    --data-urlencode 'q="supply chain" -china'
  3. Step 3: Combine with filters​

    Every feed filter works here too: contentType, region, country, topic and sector. They narrow the matches the same way, OR within a parameter and AND across them.

    To page, send nextCursor back as cursor, with the same q and filters on every request.

    curl -G "$CORE_API_BASE_URL/reports/search" \
    -H "X-API-Key: $ERI_API_KEY" \
    --data-urlencode "q=baltic corridor" \
    --data-urlencode "region=Europe"
  4. Step 4: Handle the response​

    Search answers with the feed's envelope and errors, plus a 400 when q is missing, empty or too long. Pick a status to see the exact body.

    200OK
    When
    The matching reports, newest first. No match is a 200 with an empty data array, not a 404.
    What to do
    Store the matches, then request the next page while nextCursor is not null.
    Response body
    {
    "data": [],
    "pageSize": 50,
    "nextCursor": null
    }

You can find any report​

Search and the feed share one page shape, so the same storage code handles both.