The missing «20 Minuten» Search Function

Written on

More than a year ago, on April 30, 2020 to be precise, 20 Minuten, the most widely read daily newspaper in Switzerland1, launched its new website. Due to the COVID-19 pandemic, dozens of articles were written on this topic at that time and in the following months.

Like probably many others, my media consumption of news articles increased rapidly during this time. What soon became apparent, however, was that some of the articles were difficult to find again after they disappeared from the front page.

In addition, there was no search function after the relaunch. Thus, it was not possible to simply search for articles.

According to a statement of 20 Minuten from May 14, 2020, it was still being examined whether the search function should be reintroduced.

Fast forward to today

The pandemic is not yet over, new variants of the Coronavirus such as Delta or Lambda are making the rounds and the number of cases is rising again worldwide.

But even today, 15 months after the relaunch, there is still no way to search for articles on the 20 Minuten website.

From one who set out to find news articles

For those who are familiar with the Swiss media landscape, it is known that 20 Minuten belongs to the Tamedia Group, or TX Group AG for short. Same as Berner Zeitung, Der Bund, Tages Anzeiger and so on. You can find a complete overview of all their brands on their website .

So, interestingly enough, shortly before 20 Minuten, the daily newspaper Berner Zeitung also relaunched their website. In contrast to 20 Minuten, the new website of the Berner Zeitung had a search function.

Reverse-Engineering 20 Minuten and Berner Zeitung

If you take a closer look at the source code of 20 Minuten and Berner Zeitung, the first thing you notice is that both were built with Next.js. However, it is far more interesting to see where the content comes from. It is noticeable that both get their contents from the same API:

https://feed-prod.unitycms.io

Nonetheless, the two sites differ by the so-called tenantId.

https://feed-prod.unitycms.io/{tenantId}/
By far, I was able to identify the following tenants.
Tenant ID
Der Bund 1
Tages-Anzeiger 2
Berner Zeitung 3
Le Matin 4
Basler Zeitung 5
20 Minuten 6
20 minutes 7
Berner Oberländer 8
Thuner Tagblatt 9
Langenthaler Tagblatt 10
Zürichsee-Zeitung 11
Der Landbote 12
Zürcher Unterländer 13
Tribune de Genève 14
24 heures 15

How does the search work?

Now that I do know the TenantId’s for both, 20 Minuten and Berner Zeitung, I could focus on how the search works for the Berner Zeitung.

To do this, I went to the search page of the Berner Zeitung and looked at the network traffic with the Chrome DevTools.

Chrome DevTools network Monitor Chrome DevTools Network Monitor

Bingo, exactly what I was looking for.

https://feed-prod.unitycms.io/3/search?q=Bern&start=1&count=20

Based on all the information gathered so far, it should now be possible to replace the tenantId number 3 with the number 6 and we should get the search results of 20 Minuten right? So let’s try out!

https://feed-prod.unitycms.io/6/search?q=Bern&start=1&count=20

Hooray, the search results for 20 minutes.

{
  "totalHits": 71958,
  "took": 0.034209029,
  "content": [
    {
      "type": "articles",
      "content": {
        "paywall": {
          "docType": "article"
        },
        "published": "2021-07-08T02:45:31.000Z",
        "updated": "2021-07-08T02:45:31.000Z",
        "mainCategoryFullUrlPath": "bern",
        "urlSlug": "sie-sagten-mir-meine-anrufe-wuerden-ihnen-auf-den-sack-gehen",
        "url": "/story/sie-sagten-mir-meine-anrufe-wuerden-ihnen-auf-den-sack-gehen-995984314515",
        "openInNewWindow": false,
        "readingTime": 180,
        "settings": {
          "premium": false,
          "breakingNews": false,
          "live": false,
          "opinion": false,
          "contest": false,
          "sponsored": false,
          "ratingEnabled": false,
          "feedbackEnabled": true,
          "commentingEnabled": true,
          "commentRisk": "low",
          "sharingEnabled": true,
          "likesEnabled": true,
          "newsletterSubscribingEnabled": true,
          "adsEnabled": true,
          "renderedInWebView": false,
          "videoInContent": false,
          "allowRobots": true,
          "visibleInNewestContent": true,
          "publicationDateExposed": true,
          "authorBiographyDisplayed": true
        },
        "authors": [
          {
            "type": "user",
            "info": "",
            "name": "Simon Ulrich",
            "prolitterisId": "883717"
          }
        ],
        "titleHeader": "Mann wählt Notruf wegen Tifosi-Feier",
        "title": "«Sie sagten mir, meine Anrufe gingen ihnen auf den Sack»",
        "lead": "Nach dem EM-Halbfinal am Dienstag gingen bei den Alarmzentralen zahlreiche Lärmklagen ein. Einem Mitarbeitenden im Kanton Bern haute es darob offenbar den Nuggi raus.",
        "useEmbedUrl": false,
        "image": {
          "id": "Cj1i6zKRKdTBiuJaVJlXiJ",
          "name": "Feiernde Italien-Fans an der Langstrasse, hier nach dem Sieg gegen Österreich. ",
          "slugifiedName": "feiernde-italien-fans-an-der-langstrasse-hier-nach-dem-sieg-gegen-oesterreich",
          "promcolor": "#414843",
          "variants": {
            "1200px": {
              "src": "https://cdn.unitycms.io/image/ocroped/1200,1200,1000,1000,0,0/fbSlPvERB1U/Cj1i6zKRKdTBiuJaVJlXiJ.jpg",
              "mediaType": "image/jpeg",
              "maxWidth": 1200,
              "maxHeight": 1200,
              "aspectRatio": 1.5003663003663004,
              "width": 1200,
              "height": 799,
              "focusPoint": {
                "x": 0.5,
                "y": 0.5
              }
            },
            "1600px": {
              "src": "https://cdn.unitycms.io/image/ocroped/1600,1600,1000,1000,0,0/GQFyYPYo3WI/Cj1i6zKRKdTBiuJaVJlXiJ.jpg",
              "mediaType": "image/jpeg",
              "maxWidth": 1600,
              "maxHeight": 1600,
              "aspectRatio": 1.5003663003663004,
              "width": 1600,
              "height": 1066,
              "focusPoint": {
                "x": 0.5,
                "y": 0.5
              }
            },
            "2000px": {
              "src": "https://cdn.unitycms.io/image/ocroped/2001,2000,1000,1000,0,0/-3DTh-G1Tx8/Cj1i6zKRKdTBiuJaVJlXiJ.jpg",
              "mediaType": "image/jpeg",
              "maxWidth": 2001,
              "maxHeight": 2000,
              "aspectRatio": 1.5003663003663004,
              "width": 2001,
              "height": 1333,
              "focusPoint": {
                "x": 0.5,
                "y": 0.5
              }
            },
            "400px": {
              "src": "https://cdn.unitycms.io/image/ocroped/400,400,1000,1000,0,0/FS2liQUBsCE/Cj1i6zKRKdTBiuJaVJlXiJ.jpg",
              "mediaType": "image/jpeg",
              "maxWidth": 400,
              "maxHeight": 400,
              "aspectRatio": 1.5003663003663004,
              "width": 400,
              "height": 266,
              "focusPoint": {
                "x": 0.5,
                "y": 0.5
              }
            },
            "800px": {
              "src": "https://cdn.unitycms.io/image/ocroped/800,800,1000,1000,0,0/tt-RhIuCotU/Cj1i6zKRKdTBiuJaVJlXiJ.jpg",
              "mediaType": "image/jpeg",
              "maxWidth": 800,
              "maxHeight": 800,
              "aspectRatio": 1.5003663003663004,
              "width": 800,
              "height": 533,
              "focusPoint": {
                "x": 0.5,
                "y": 0.5
              }
            },
            "big": {
              "src": "https://cdn.unitycms.io/image/ocroped/1200,1200,1000,1000,0,0/fbSlPvERB1U/Cj1i6zKRKdTBiuJaVJlXiJ.jpg",
              "mediaType": "image/jpeg",
              "maxWidth": 1200,
              "maxHeight": 1200,
              "aspectRatio": 1.5003663003663004,
              "width": 1200,
              "height": 799,
              "focusPoint": {
                "x": 0.5,
                "y": 0.5
              }
            },
            "small": {
              "src": "https://cdn.unitycms.io/image/ocroped/400,400,1000,1000,0,0/FS2liQUBsCE/Cj1i6zKRKdTBiuJaVJlXiJ.jpg",
              "mediaType": "image/jpeg",
              "maxWidth": 400,
              "maxHeight": 400,
              "aspectRatio": 1.5003663003663004,
              "width": 400,
              "height": 266,
              "focusPoint": {
                "x": 0.5,
                "y": 0.5
              }
            }
          }
        },
        "kickword": {},
        "styles": {
          "name": "Default"
        }
      },
      "mainType": "metadata",
      "publishStatus": "published",
      "id": 995984314515,
      "feed": "https://feed-prod.unitycms.io/6/content/995984314515",
      "sortID": 0
    },
    ...
  ],
  "nextpage": "https://feed-prod.unitycms.io/6/search?q=Bern&start=21"
}

Fantastic, now what?

Well, what if someone who has all this knowledge, would just for fun, build a website where anyone can search articles from 20 Minuten.

May I introduce to you: ”20 sekunden - Die fehlende 20 Minuten Suchfunktion”, oh and yes btw. the site is in German, because all articles on 20 Minuten are written in German.

20sec.hauri.dev Printescreen of 20sec.hauri.dev

Try it out on 20sec.hauri.dev or if you are more interested into source code, check out the GitHub repo: https://github.com/mhauri/20sec

Disclaimer

I am not affiliated, associated, authorized, endorsed, or in any way officially connected with TX Group or any of its subsidiaries or affiliates. The official website for TX Group AG can be found at https://tx.group/. The names 20 Minuten and TX Group AG and all associated names, brands, emblems and images are registered trademarks of their respective owners.

I did all this out of curiosity and maybe also because I was a bit annoyed that there is still no search function on the website.

Please do not sue me, thanks!

Changelog

July 25, 2021: Added the missing tenants (11, 12 and 13) to the list.