RenzoDocs

Search

Full-text search and typeahead suggestions over published articles.

View as Markdown

Search finds published articles by words. Best match comes first, and a recent article ranks above an older match of the same quality. Suggestions match titles as a visitor types, for a search box, and fill any room left with articles that match in the text. Anyone may call both, no token needed.

Endpoints

OperationWhat it doesAuth
GET/api/v1/searchFull-text search, best match first. Cursor-paginated.None
GET/api/v1/search/suggestionsA short list of articles whose title matches what was typed, then articles that match in the text.None

Example: search for inflation

curl "$BASE/api/v1/search?q=inflation&type=news&limit=1"
Response
{
  "items": [
    {
      "id": "f43679d3-0ab5-5f68-8bda-f0a4c5560594",
      "slug": "fed-holds-rates-steady-as-inflation-cools",
      "title": "Fed holds rates steady as inflation cools",
      "type": "news",
      "status": "published",
      "access_level": "public",
      "locale": "en",
      "requested_locale": "en",
      "hero_image_url": "https://cdn.renzo-digital.com/articles/fed-holds-rates.jpg",
      "seo_description": "The Fed kept rates unchanged and signalled patience.",
      "byline": { "name": "Hafizah Rina", "url": "https://www.linkedin.com/in/hafizah-rina-43a1531a4" },
      "is_editors_pick": false,
      "is_scheduled": false,
      "symbols": [
        {
          "id": "63d60d4b-cbbd-510b-8352-cdb4ac4859ae",
          "slug": "us500-index",
          "ticker": "US500",
          "display_name": "US 500 Index",
          "exchange": "INDEX",
          "asset_class": "index",
          "is_active": true,
          "role": "primary"
        }
      ],
      "published_at": "2026-11-04T13:30:00Z",
      "created_at": "2026-11-04T13:30:00Z",
      "updated_at": "2026-11-04T13:30:00Z"
    }
  ],
  "next_cursor": "eyJrIjoiMjAyNi0xMS0wNFQxMzozMDowMFoifQ",
  "has_more": true,
  "limit": 1
}

Rows are the same as in Articles. To read the body, call GET /api/v1/articles/{slug}.

Rules and edge cases

  • Order. Relevance comes first, with a boost for recent articles: the boost halves for every 30 days of age. A strong match in an old article can still rank above a weak match in a new one. The score uses the publish time, so the order stays the same between page requests.
  • Currency pairs. A pair such as XAU/USD matches xau, usd and xauusd.
  • Start of a word. Each word of 2 or more characters also matches as the start of a word, so au finds AUD/CAD and infla finds "inflation". A quoted phrase or a -word exclusion turns this off and keeps the search exact.
  • Empty query. An empty or missing q returns no results, with 200 and an empty items list.
  • Long query. A q over 200 characters is cut to 200. It does not fail.
  • Filters. type (news, opinion or editorial), locale and exact_locale work as in Articles. Without a translation in locale, you get English, unless exact_locale=true.
  • Symbol filter. symbol takes a symbol slug, for example symbol=eur-usd. Results keep only articles tagged with that symbol, as primary or mentioned. It narrows a query: with an empty q you still get no results. To list every article about a symbol, use GET /api/v1/symbols/{slug}/articles. An unknown or retired slug answers 404 symbol_not_found.
  • Date filter. published_after takes an ISO-8601 UTC time, for example 2026-11-01T00:00:00Z. Results keep only articles published at or after it. It works with every other filter. A time with no zone counts as UTC. A time in the future, or a value that is not a time, answers 422 validation_failed. A cursor belongs to the filters you sent it with.
  • Paging. limit defaults to 20 and may not pass 100. Pass next_cursor back as cursor. See Pagination.
  • No gate on rows. Premium articles show in results. The gate applies when you read one.

Example: suggest articles as a visitor types

curl "$BASE/api/v1/search/suggestions?q=infla&locale=en&exact_locale=true&limit=6"
Response
{
  "items": [
    {
      "id": "f43679d3-0ab5-5f68-8bda-f0a4c5560594",
      "slug": "inflation-cools-for-a-third-month",
      "title": "Inflation cools for a third month",
      "type": "news",
      "status": "published",
      "access_level": "public",
      "locale": "en",
      "requested_locale": "en",
      "seo_description": "Prices rose less than expected in October.",
      "byline": { "name": "Hafizah Rina", "url": "https://www.linkedin.com/in/hafizah-rina-43a1531a4" },
      "is_editors_pick": false,
      "is_scheduled": false,
      "symbols": [],
      "published_at": "2026-11-04T13:30:00Z",
      "created_at": "2026-11-04T13:30:00Z",
      "updated_at": "2026-11-04T13:30:00Z"
    }
  ]
}

Rows are the same as in search. There is no cursor: the visitor types more instead.

Suggestion rules

  • Match. A title matches when it holds every word of q, also as part of a word. infla finds "Inflation cools".
  • Order. Titles that start with q come first, then titles with a word that starts with it, then the newest.
  • Text fill. When fewer titles match than limit, articles that match q in full-text search (title, description or body) fill the rest, newest first. They always come after the title matches, and an article is never listed twice. gold can list an article whose title does not hold the word.
  • Short query. A q needs at least one word of 3 or more characters, in any script. Without one, you get 200 and an empty items list.
  • Long query. A q over 200 characters is cut to 200. Only its first 8 words count.
  • Slow query. A suggestion that takes too long gives 200 and an empty items list, not an error.
  • Filters. locale and exact_locale work as in search.
  • Size. limit is 1 to 10. It defaults to 6.
  • Caching. Answers carry an ETag. Send it back as If-None-Match to get 304 when nothing changed.

Errors

CodeStatusWhen
symbol_not_found404No active symbol has the symbol slug.
invalid_cursor400The cursor is damaged or belongs to another search.

Sign-in and request errors, such as token_expired and validation_failed, can come from any call. See Errors.

Reference

On this page