Giter VIP home page Giter VIP logo

marketplace-api's Introduction

Marketplace API

An easy-to-use Facebook Marketplace API, that functions without the need to log into a Facebook account. Wraps the Facebook GraphQL API, allowing for quick and easy retrieval of Facebook Marketplace listings and other relevant Marketplace data.

Responses

All endpoints will return a JSON response in the following format:

{
    "status": String,
    "error": {
        "source": String,
        "message": String
    },
    "data": Array
}

status: Indicates whether a request was a success or failure. Successful requests will have a status of "Success" and failed requests will have a status of "Failure".

error: A request error (will be empty if no error exists).

  • error.source: Indicates the party responsible for an error. Server-side Facebook errors will have a source of "Facebook" and errors caused by the user will have a source of "User".
  • error.message: A detailed description of the request error.

data: A list of JSON objects representing the information an endpoint retrieved (will be empty if an error exists).

Endpoints

  • /locations
    Response:
    Locations which are exact, or close matches, to the search query provided. Latitude and longitude coordinates for a location are required to find Marketplace listings in a targeted area.

    Example:

    {
        "status": "Success",
        "error": {},
        "data": {
            "locations": [
                {
                    "name": "Houston, Texas",
                    "latitude": "29.7602",
                    "longitude": "-95.3694"
                },
                {
                    "name": "Downtown Houston, TX",
                    "latitude": "29.758767",
                    "longitude": "-95.361523"
                },
                {
                    "name": "Houston, Mississippi",
                    "latitude": "33.8981",
                    "longitude": "-89.0017"
                },
                {
                    "name": "Houston, Alaska",
                    "latitude": "61.6083",
                    "longitude": "-149.774"
                }
            ]
        }
    }

    Required Parameters:

    {
        // A location in which to find the latitude and longitude coordinates
        "locationQuery": String
    }

  • /search
    Response:
    Listings which are exact, or close matches, to the listing query and optional filter(s) provided.

    Example (number of pages/listings displayed and listing's primary photo URL have been removed to shorten this example):

    {
        "status": "Success",
        "error": {}, 
        "data": {
            "listingPages": [
                {
                    "listings": [
                        {
                            "id": "4720490308074106",
                            "name": "Small sectional couch", 
                            "currentPrice": "$150",
                            "previousPrice": "",
                            "saleIsPending": "false",
                            "primaryPhotoURL": "Removed to shorten example",
                            "sellerName": "Cory Yount",
                            "sellerLocation": "Scottsdale, Arizona",
                            "sellerType": "User"
                        },
                        {
                            "id": "296832592544544",
                            "name": "Sectional sofa couch",
                            "currentPrice": "$400",
                            "previousPrice": "",
                            "saleIsPending": "false",
                            "primaryPhotoURL": "Removed to shorten example",
                            "sellerName": "Alexis Brown",
                            "sellerLocation": "Scottsdale, Arizona",
                            "sellerType": "User"
                        },
                        {
                            "id": "261980506019699",
                            "name": "Living spaces couch",
                            "currentPrice": "$600",
                            "previousPrice": "",
                            "saleIsPending": "false",
                            "primaryPhotoURL": "Removed to shorten example",
                            "sellerName": "Chelsea Markley",
                            "sellerLocation": "Scottsdale, Arizona",
                            "sellerType": "User"
                        },
                        {
                            "id": "683280016149318",
                            "name": "Beige couch",
                            "currentPrice": "$100",
                            "previousPrice": "",
                            "saleIsPending": "false",
                            "primaryPhotoURL": "Removed to shorten example",
                            "sellerName": "Sarah Wilke",
                            "sellerLocation": "Phoenix, Arizona",
                            "sellerType": "User"
                        },
                        {
                            "id": "545545826911162",
                            "name": "BRAND NEW gray L shaped couch with reversible chaise!",
                            "currentPrice": "$450",
                            "previousPrice": "$480",
                            "saleIsPending": "false",
                            "primaryPhotoURL": "Removed to shorten example",
                            "sellerName": "Jamie Clark Hopkins",
                            "sellerLocation": "Paradise Valley, Arizona",
                            "sellerType": "User"
                        },
                        {
                            "id": "321297783315616",
                            "name": "Leather Couch Set",
                            "currentPrice": "$150",
                            "previousPrice": "",
                            "saleIsPending": "false",
                            "primaryPhotoURL": "Removed to shorten example",
                            "sellerName": "Samantha Crosner",
                            "sellerLocation": "Scottsdale, Arizona",
                            "sellerType": "User"
                        }
                    ]
                }
            ]
        }
    }

    Required Parameters:

    {
        // The latitude coordinate of the search location
        "locationLatitude": String,
        // The longitude coordinate of the search location
        "locationLongitude": String,
        // Keywords for which listings to retrieve
        "listingQuery": String
    } 

marketplace-api's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.