/grepcon

Get the favicon of a website using a RESTapi

Primary LanguageJavaMIT LicenseMIT

grepcon


IntroductionGetting startedTroubleshooting

📚 Introduction

grepcon is a RESTapi to get the favicon from websites. This project was especially made for nura-pwa to eventually replace the unofficial google api which is currently used. The google api sadly doesn't work for many websites and therefore is not sutible for my usecase.

📝 Getting started

Using grepcon is fairly easy. Firstly, clone the repository and use Docker to build and run the application

$ docker-compose up

Afterwards you can access the api via following RESTapi

$ curl https://localhost:8080/api/v1/favicon/list?url{URL}?fallback={FALLBACK_URL}

After invoking the endpoint, an array with urls to the different favicons will be returned.

Example:

[
    "https://www.google.com/favicon.ico"
]

Get Image as Response

You can also get an image as an response. This is especially useful for saving images in a serviceworker or prevent cors errors.

$ curl https://localhost:8080/api/v1/favicon?url={URL}?fallback={FALLBACK_URL}

Current Limitations

  • Currently grepcon is not checking for resolution
  • URLs are not always corrected