AI Image Search Implementation Guide

Our real estate APIs enable advanced image search capabilities using AI to enhance the search experience. When searching images, the results are not limited by the search criteria but are sorted by relevance, ensuring the most relevant listings appear first. Each listing is assigned a relevance score, indicating how closely it matches the image inputs.

Important Note



When using image search, the results are not restricted by the image search criteria. For instance, if you search through 500 listings, you will still receive all 500 listings in the response. The key benefit is that these listings will be sorted by relevance, with the most relevant listing appearing first. Each listing will have a score indicating its relevance to the image inputs, helping you quickly identify the best matches. By not limiting the results based on image inputs, we ensure that no potential listings are hidden from the buyer, saving them time and providing the most relevant options without excluding any inventory.

Using the API



To perform an image search, you will need to make a POST request to https://api.repliers.io/listings instead of a GET request. This is because the image inputs are provided in the body of the request in JSON format.

Request Structure





{
    "imageSearchItems": [
        {
            "type": "text",
            "value": "wine cellar",
            "boost": 1
        }
    ]
}


Example: Searching for listings with a wine cellar.



{
    "imageSearchItems": [
        {
            "type": "image",
            "url": "https://domain.com/swimmingpool-image-url.jpg",
            "boost": 1
        }
    ]
}


Example: Searching for listings with features similar to the provided swimming pool image.

Combining Multiple Inputs



You can provide multiple image inputs, both text-based and image-based, in a single request.

Multiple Text-based Inputs


{
    "imageSearchItems": [
        {
            "type": "text",
            "value": "wine cellar",
            "boost": 1
        },
        {
            "type": "text",
            "value": "white kitchen",
            "boost": 1
        },
        {
            "type": "text",
            "value": "sauna",
            "boost": 1
        }
    ]
}


Example: Searching for listings with a wine cellar, white kitchen, and sauna.

Combining Text-based and Image-based Inputs


{
    "imageSearchItems": [
        {
            "type": "text",
            "value": "wine cellar",
            "boost": 1
        },
        {
            "type": "text",
            "value": "white kitchen",
            "boost": 1
        },
        {
            "type": "image",
            "url": "https://domain.com/swimmingpool-image-url.jpg",
            "boost": 1
        }
    ]
}


Example: Searching for listings with a wine cellar, white kitchen, and features similar to the provided swimming pool image.

Boost Values



The boost value allows you to specify the importance of each input relative to the others. For instance, if a white kitchen is more important than the other features, you can assign it a higher boost value.

{
    "imageSearchItems": [
        {
            "type": "text",
            "value": "wine cellar",
            "boost": 1
        },
        {
            "type": "text",
            "value": "white kitchen",
            "boost": 10
        },
        {
            "type": "image",
            "url": "https://domain.com/swimmingpool-image-url.jpg",
            "boost": 1
        }
    ]
}


Example: Prioritizing white kitchen with a boost value of 10.

Combining with Other Criteria



Image inputs can be combined with other search criteria, such as property type, minimum bedrooms, and location. The image search will be performed only on listings that match the specified criteria.

Example Request with Additional Criteria


POST https://api.repliers.io/listings?city=New York&propertyType=Detached&minBeds=4

{
    "imageSearchItems": [
        {
            "type": "text",
            "value": "wine cellar",
            "boost": 1
        },
        {
            "type": "text",
            "value": "white kitchen",
            "boost": 10
        },
        {
            "type": "image",
            "url": "https://domain.com/swimmingpool-image-url.jpg",
            "boost": 1
        }
    ]
}


This request searches for detached properties with at least 4 bedrooms in New York, prioritizing listings with features similar to a white kitchen, wine cellar, and swimming pool.

Image Reordering



As an added benefit, we automatically reorder the images array so that the most relevant images based on the user's inputs are moved to the top. This ensures that the first images the user sees when scrolling through a listing are the most relevant, providing instant visual feedback to their image inputs.

AI Image Search Scoring Details



When using our AI Image Search feature, each listing in the response includes a score that indicates the listing's relevance concerning the input images provided (imageSearchItems).

Here’s a sample of how the score might appear in a response:

{...
    "updatedOn": "2024-07-10T11:52:52.000Z",
    "score": 0.949419,
    "images": [
        "IMG-C9031294_14.jpg"
    ]...
}

Understanding the Score:



Single Input Image:


For a search using one input image, the highest possible score (perfect match) is 1.0.

Multiple Input Images:


If you provide multiple images, the perfect score increases proportionally. For example:

Two input images: A perfect score is 2.0.
Three input images: A perfect score is 3.0.
And so on.

What the Score Represents:


The score is a numerical representation of how well a listing matches the provided input images. The closer the score is to the perfect score (1.0 per input image), the more relevant the listing is to the images you used in your search. This scoring system helps prioritize listings that best match your criteria, saving time and improving search relevance.

Example:


If you perform a search using three images, and a particular listing has a score of 2.85, this indicates a high degree of relevance to the input images, as the score is close to the perfect score of 3.0. This scoring mechanism is designed to enhance your experience by providing a clear, quantifiable measure of relevance.

Benefits of AI Image Search



Enhanced Search Relevancy: Saves users time by providing highly relevant search results.
Strong Personalization Feature: Allows for a tailored search experience based on user preferences.
Cutting-edge Technology: Utilizes advanced AI and vector technology for superior search performance.


Conclusion



Our AI Image Search feature enhances the search experience by providing highly relevant and personalized results. By leveraging advanced AI technology, users can save time and find the best listings that match their preferences.

For further assistance or inquiries, please contact our support team.

Updated on: 16/07/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!