Skip to contentSkip to filters

Search by meaning

Turn a research question into a topic, rank the catalogue by meaning and topic links, and read the results in one batch.

The examples read the key from $WW_API_KEY; the Quickstart shows how to create one.

Steps

  1. 1

    Resolve the topic by name. Each node's id is topic:<slug>.

    curl --fail-with-body -X POST "https://world-wide.org/api/v1/discovery/graph" -H "Authorization: Bearer $WW_API_KEY" -H "Content-Type: application/json" \
      -d '{"operation":"resolve","kind":"topic","query":"working memory","limit":3}'
    Show the response
    {
      "operation": "resolve",
      "status": "ok",
      "nodes": [
        {
          "kind": "topic",
          "id": "topic:working-memory",
          "name": "working memory",
          "url": "https://world-wide.org/topics/working-memory",
          "sourceUrl": null,
          "updatedAt": "2026-11-20T12:40:01Z",
          "checkedAt": null,
          "count": 133,
          "match": "name",
          "score": null
        },
        {
          "kind": "topic",
          "id": "topic:working-memory-capacity",
          "name": "working memory capacity",
          "url": "https://world-wide.org/topics/working-memory-capacity",
          "sourceUrl": null,
          "updatedAt": "2026-10-29T00:40:04Z",
          "checkedAt": null,
          "count": 2,
          "match": "name",
          "score": null
        }
      ],
      "edges": [],
      "total": 19,
      "nextPage": 2,
      "truncated": false,
      "partial": null,
      "facets": null
    }
  2. 2

    Send the slug after topic: (working-memory) in topics to Scientific discovery search, with the question as query. hybrid ranks by words, meaning and topic links; facets counts every match by type before paging. For the next page, send the same body with page one higher while hasMore is true.

    curl --fail-with-body -X POST "https://world-wide.org/api/v1/discovery/search" -H "Authorization: Bearer $WW_API_KEY" -H "Content-Type: application/json" \
      -d '{"query":"How does sleep support working memory?","mode":"hybrid","topics":["working-memory"],"types":["seminar","podcast"],"facets":["types"],"limit":5}'
    Show the response
    {
      "items": [
        {
          "id": "seminar:019b891c-b981-74dc-8f5c-87b1e1ec2c21",
          "type": "seminar",
          "title": "Astrocyte signalling in sleep",
          "url": "https://world-wide.org/seminar/astrocyte-signalling-in-sleep-k3m9x2p7",
          "date": "2027-03-10",
          "endDate": null,
          "startsAt": "2027-03-10T16:00:00Z",
          "deadline": null,
          "organization": "Example Sleep Seminar Series",
          "people": [
            "A. Speaker"
          ],
          "location": "Online",
          "fields": [
            "neuro"
          ],
          "upcoming": true,
          "recorded": false,
          "imageUrl": null,
          "snippet": "How astrocytes regulate sleep pressure across the night.",
          "source": {
            "url": null,
            "checkedAt": null,
            "updatedAt": "2026-11-28T00:46:06Z"
          },
          "availability": {
            "status": "upcoming",
            "basis": "event_dates",
            "certain": true
          },
          "ranking": {
            "lexical": 1.1875,
            "semantic": 0.7065,
            "graph": true
          }
        }
      ],
      "total": 1241,
      "facets": {
        "types": [
          {
            "count": 1203,
            "value": "seminar"
          },
          {
            "count": 38,
            "value": "podcast"
          }
        ]
      },
      "facetTotals": {
        "types": 2
      },
      "mode": "hybrid",
      "page": 1,
      "limit": 5,
      "hasMore": true,
      "coverage": {
        "eligible": 5613,
        "withEmbedding": 5613
      },
      "partial": null
    }
  3. 3

    Read up to 32 results at once with batch. requests says for each id whether it was found and which id it resolved to.

    curl --fail-with-body -X POST "https://world-wide.org/api/v1/discovery/collections" -H "Authorization: Bearer $WW_API_KEY" -H "Content-Type: application/json" \
      -d '{"operation":"batch","ids":["seminar:019b891c-b981-74dc-8f5c-87b1e1ec2c21","podcast:019b891c-b981-74dc-8f5c-87b1e1ec2f01"]}'

If it fails

  • Check partial and coverage before quoting counts: if the query could not be embedded, an automatic search answers with keyword matches and sets partial.
  • 422 with similarTo and mode: "semantic": that item has no embedding; use hybrid.
  • 503 SEARCH_UNAVAILABLE: back off and retry, or send mode: "lexical".