Skip to content

adamgauthier/mercari-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mercari Client

This simple library simulates interactions with an open API for Mercari, which doesn't exist. It does so by scraping web pages using mercari-parser.

Setup

npm install git+https://github.com/louistio/mercari-client.git --save

Usage

You can retrieve info for an item with its id. The id is located after item/ in the url, for example in the url https://www.mercari.com/us/item/m000000/, the item id is m000000.

import { MercariClient } from 'mercari-client';

const client = new MercariClient();

const item = await client.getItem('m000000');

Resulting item will look like:

{
  "version": "2",
  "id": "...",
  "title": "...",
  "description": "...",
  "price": "...",
  "shipping": "...",
  "date": "...",
  "imageUrl": "https://(...).jpg",
  "seller": {
    "userId": "...",
    "username": "...",
    "profile": "https://(...)/"
  }
}

About

Simulate Mercari API interaction by scraping web pages

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published