Query and monitor the Mercado Libre marketplace directly from Emacs.
mercado-libre.el is an Emacs package that allows you to:
- Search for items on Mercado Libre
- Monitor searches for new listings
- Display results in a nicely formatted buffer with images
- Track which listings you’ve already seen
This package requires authentication credentials from Mercado Libre’s API:
- Register as a developer on the Mercado Libre Developers site
- Create an application to get your client ID and client secret
- Store your credentials in
mercado-libre-client-idandmercado-libre-client-key.
mercado-libre-get-credentials returns the pair from the app-id and app-key fields of the item mercadolibre.com/benthamite in a 1Password Automation vault, read with auth-source-extras-op-get from auth-source-extras.el.
Clone this repository to your Emacs load path and add this to your init.el file:
(require 'mercado-libre)If you use the elpaca package manager, add this your init.el file:
;; with vc
(use-package mercado-libre
:vc (:url "https://github.com/benthamite/mercado-libre"))
;; with elpaca
(use-package mercado-libre
:ensure (:host github :repo "benthamite/mercado-libre"))
;; with straight
(use-package mercado-libre
:straight (:host github :repo "benthamite/mercado-libre"))
;; with quelpa
(use-package mercado-libre
:quelpa (mercado-libre :fetcher github :repo "benthamite/mercado-libre"))You can customize various aspects of the package:
;; Set your API credentials
(setq mercado-libre-client-id "YOUR_CLIENT_ID"
mercado-libre-client-secret "YOUR_CLIENT_SECRET")
;; Location of the listings database
(setq mercado-libre-listings-db-file "~/path/to/listings-db.el")
;; Number of results displayed
(setq mercado-libre-initial-results-limit 20) ; For first-time runs
(setq mercado-libre-new-results-limit 30) ; For subsequent checksThe main command is mercado-libre-monitor:
M-x mercado-libre-monitor RET search-query RETWith a prefix argument (C-u), you can specify the condition (used/new/all):
C-u M-x mercado-libre-monitor RET search-query RET used RETWith a double prefix (C-u C-u), you can also specify how many items to display:
C-u C-u M-x mercado-libre-monitor RET search-query RET used RET 30 RETTo select from previously saved search queries:
M-x mercado-libre-show-searches RET- The first time you run a search, the package builds a database of all existing listings.
- On subsequent runs, it only shows items that have appeared since your last check.
- Results are displayed in a nicely formatted Org mode buffer with images.
This package is licensed under the GNU General Public License v3.0 or later.
Contributions are welcome. Please open an issue or PR on the GitHub repository.