API Documentation

Last Updated: June 24, 2025

Introduction

Welcome to the Fragella API documentation. Our API provides programmatic access to a vast database of fragrance information, perfect for powering e-commerce sites, mobile apps, or personal projects. All API endpoints are available under the base URL: https://api.fragella.com/api/v1/.

Authentication

Authentication is handled via an API key. You must include your key in the x-api-key header of every request. Requests without a valid key will be rejected.

You can get your API key by creating an account and visiting your Developer Dashboard.

Endpoints

GET /fragrances

This is the primary endpoint for searching the fragrance database. The search is powered by a case-insensitive, fuzzy-matching algorithm, so an exact query is not required to get relevant results. If the limit parameter is not provided, a default of 10 results will be returned.

Request Parameters

Parameter Type Description
search string (required) The name of the fragrance or brand. Must be at least 3 characters long.
limit integer (optional) The number of results to return. Defaults to 10. Maximum value is 20.

Response Object

Each fragrance object returned by the API contains the following fields:

Field Type Description
NamestringThe full name of the fragrance.
BrandstringThe brand name of the fragrance (e.g., "Christian Dior", "Juicy Couture").
PricestringThe estimated retail price of the fragrance as a string.
Image URLstringA direct CDN link to an image of the fragrance bottle.
GenderstringThe target gender for the fragrance (e.g., "women", "men", "unisex").
LongevitystringA percentage-based score representing the perceived longevity of the scent.
SillagestringA percentage-based score representing the perceived sillage (projection) of the scent.
General Notesarray of stringsA simple list of the most prominent notes in the fragrance.
Main Accordsarray of stringsThe primary scent families or accords, ordered by prominence.
Main Accords PercentageobjectA key-value map of main accords to their percentage-based prominence scores.
NotesobjectAn object containing detailed notes categorized by 'Top', 'Middle', and 'Base'. Each note is an object containing its name and imageUrl.
Season Ranking array of objects Ordered list (best to worst) of seasons with a suitability score.
Each element looks like: { "name": "spring", "score": 2.384 }
Occasion Ranking array of objects Ordered list (best to worst) of occasions with a suitability score.
Each element looks like: { "name": "casual", "score": 2.98 }

GET /fragrances/match

Returns fragrances that satisfy all requested accords and notes. You can combine minimum accord percentages with specific top, middle, base, or general notes. Results are ranked by best overall fit. If limit is omitted, the top 10 matches are returned.

Request Parameters

ParameterTypeDescription
accordsstring (optional) Comma-separated list of accord:minPercent
Example: floral:90,citrus:60
topstring (optional) Comma-separated list of required top notes
middlestring (optional) Comma-separated list of required middle notes
basestring (optional) Comma-separated list of required base notes
generalstring (optional) Comma-separated list of notes that can appear anywhere
limitinteger (optional) Number of matches to return. Default 10, max 10.

GET /fragrances/similar

Finds fragrances that are most similar to a given scent. The API first performs a fuzzy search to find the best match for the provided name, then scores all other fragrances against it based on shared accords (primary) and notes (secondary).

Request Parameters

Parameter Type Description
name string (required) The name of the fragrance to use as a base for comparison.
limit integer (optional) Number of similar matches to return. Default 10, max 10.

Response Object

The response is a JSON object with two main keys:

Field Type Description
similar_tostringThe full name of the fragrance that was found and used for comparison.
similar_fragrancesarray of objectsAn array of the most similar fragrances, sorted by score. Each object contains Name and SimilarityScore.

Examples & Responses

Example 1: Searching for Multiple Results

A search for "Viva La Juicy" returns an array of all fragrances matching the term.


curl --request GET \
  --url 'https://api.fragella.com/api/v1/fragrances?search=Viva%20La%20Juicy' \
  --header 'x-api-key: [api-key]'
    

Sample Response: "Viva La Juicy"

[
    {
        "Name": "Viva La Juicy",
        "Brand": "Juicy Couture",
        "Image URL": "https://d2k6fvhyk5xgx.cloudfront.net/images/viva-la-juicy.jpg",
        "Gender": "women",
        "Price": "79.99",
        "Longevity": "56.8%",
        "Sillage": "51.5%",
        
        "Season Ranking": [
           { "name": "spring",  "score": 2.384 },
           { "name": "fall",    "score": 2.066 },
           { "name": "summer",  "score": 2.019 },
           { "name": "winter",  "score": 1.120 }
        ],
       "Occasion Ranking": [
         { "name": "casual",       "score": 2.980 },
         { "name": "night out",    "score": 1.418 },
         { "name": "professional", "score": 1.192 }
       ],

        "General Notes": ["honeysuckle", "vanilla", "caramel", "amber", "sandalwood", "mandarin orange"],
        "Main Accords": ["sweet", "white floral", "caramel", "fruity", "vanilla", "citrus", "woody", "lactonic", "amber", "powdery"],
        "Main Accords Percentage": {
            "sweet": "100%", "white floral": "94%", "caramel": "80%", "fruity": "73%", "vanilla": "66%", "citrus": "61%", "woody": "57%", "lactonic": "57%", "amber": "49%", "powdery": "49%"
        },
        "Notes": { /* ... notes object ... */ }
    },
    {
        "Name": "Viva La Juicy Rose",
        "Brand": "Juicy Couture",
        "Image URL": "https://d2k6fvhyk5xgx.cloudfront.net/images/viva-la-juicy-rose.jpg",
        "Gender": "women",
        "Price": "56.99",
        "Longevity": "55.6%",
        "Sillage": "50.5%",
        "Main Accords": ["rose", "floral", "fresh", "fruity", "citrus", "amber", "sweet", "white floral", "aquatic"],
        "Notes": { /* ... notes object ... */ }
    },
    {
        "Name": "Viva La Juicy Glace",
        "Brand": "Juicy Couture",
        "Image URL": "https://d2k6fvhyk5xgx.cloudfront.net/images/viva-la-juicy-glace.jpg",
        "Gender": "women",
        "Price": "61.99",
        "Longevity": "54.8%",
        "Sillage": "54.5%",
        "Season Ranking": [
           { "name": "spring",  "score": 2.384 },
           { "name": "fall",    "score": 2.066 },
           { "name": "summer",  "score": 2.019 },
           { "name": "winter",  "score": 1.120 }
        ],
       "Occasion Ranking": [
         { "name": "casual",       "score": 2.980 },
         { "name": "night out",    "score": 1.418 },
         { "name": "professional", "score": 1.192 }
       ],
        "Main Accords": ["sweet", "fruity", "vanilla", "fresh", "aquatic", "powdery", "white floral"],
        "Notes": { /* ... notes object ... */ }
    }
    /* ... more results */
]

Example 2: Limiting to a Single Result

Use the limit=1 parameter to get only the most relevant result.


# This request will return only the single most relevant result for "Sauvage"
curl --request GET \
  --url 'https://api.fragella.com/api/v1/fragrances?search=Sauvage&limit=1' \
  --header 'x-api-key: [api-key]'
    

Sample Response: "Sauvage" with limit=1

[
    {
        "Name": "Eau Sauvage",
        "Brand": "Christian Dior",
        "Image URL": "https://d2k6fvhyk5xgx.cloudfront.net/images/eau-sauvage.jpg",
        "Gender": "men",
        "Price": "152.99",
        "Longevity": "55.6%",
        "Sillage": "49.25%",
        "Season Ranking": [
           { "name": "spring",  "score": 2.384 },
           { "name": "fall",    "score": 2.066 },
           { "name": "summer",  "score": 2.019 },
           { "name": "winter",  "score": 1.120 }
        ],
       "Occasion Ranking": [
         { "name": "casual",       "score": 2.980 },
         { "name": "night out",    "score": 1.418 },
         { "name": "professional", "score": 1.192 }
       ],
        "General Notes": ["Hedione", "Galbanum", "Petitgrain", "Vetiver", "Pink Pepper"],
        "Main Accords": ["aromatic", "citrus", "fresh spicy", "woody", "earthy", "mossy", "green", "floral"],
        "Main Accords Percentage": {
            "aromatic": "100%", "citrus": "93%", "fresh spicy": "79%", "woody": "67%", "earthy": "56%", "mossy": "48%", "green": "47%", "floral": "44%"
        },
        "Notes": {
            "Top": [{"name": "Lemon", "imageUrl": "..."}, {"name": "Bergamot", "imageUrl": "..."}],
            "Middle": [{"name": "Jasmine", "imageUrl": "..."}, {"name": "Coriander", "imageUrl": "..."}],
            "Base": [{"name": "Oakmoss", "imageUrl": "..."}, {"name": "Vetiver", "imageUrl": "..."}]
        }
    }
]

Example 3: Accord + Note Matching

Find fragrances that are at least 100 % floral, 90 % fruity, and 80 % citrus, with specific top, middle, and base notes.


curl --request GET \
  --url 'https://api.fragella.com/api/v1/fragrances/match?accords=floral:100,fruity:90,citrus:80&top=Pear,Bitter%20Orange,Bergamot&middle=Freesia&base=Iso%20E%20Super&limit=3' \
  --header 'x-api-key: [api-key]'

Sample Response

[
  {
    "Name": "Versace Dylan Purple",
    "Brand": "Gianni Versace",
    "Image URL": "https://d2k6fvhyk5xgx.cloudfront.net/images/versace-dylan-purple.jpg",
    "Gender": "women",
    "Price": "114.99",
    "Longevity": "51.2%",
    "Sillage": "43.75%",
    "Season Ranking": [
           { "name": "spring",  "score": 2.384 },
           { "name": "fall",    "score": 2.066 },
           { "name": "summer",  "score": 2.019 },
           { "name": "winter",  "score": 1.120 }
        ],
    "Occasion Ranking": [
         { "name": "casual",       "score": 2.980 },
         { "name": "night out",    "score": 1.418 },
         { "name": "professional", "score": 1.192 }
       ],
    "General Notes": ["Pear","Bitter Orange","Bergamot","Freesia","Pomarose","Mahonial","Iso E Super","Ambroxan","Sylkolide","Virginia Cedar","Belambra tree"],
    "Main Accords": ["floral","fruity","citrus","amber","woody","musky","sweet","fresh","aquatic","fresh spicy"],
    "Main Accords Percentage": {
      "floral":"100%","fruity":"93%","citrus":"86%","amber":"77%","woody":"72%","musky":"72%","sweet":"68%","fresh":"61%","aquatic":"61%","fresh spicy":"47%"
    },
    "Notes": { /* ... */ }
  }
]

Example 4: Finding Similar Fragrances

Find the top 3 fragrances most similar to "Sauvage". The API finds the best match for "Sauvage" (which is "Dior Sauvage") and returns the results.


curl --request GET \
  --url 'https://api.fragella.com/api/v1/fragrances/similar?name=Sauvage&limit=3' \
  --header 'x-api-key: [api-key]'

Sample Response

{
  "similar_to": "Dior Sauvage",
  "similar_fragrances": [
    {
      "Name": "Prada Luna Rossa Carbon",
      "SimilarityScore": 0.8912
    },
    {
      "Name": "Versace Dylan Blue",
      "SimilarityScore": 0.7645
    },
    {
      "Name": "Armaf Ventana Pour Homme",
      "SimilarityScore": 0.7499
    }
  ]
}

Error Handling

The API uses conventional HTTP status codes to indicate the success or failure of a request.

Status Code Meaning Reason
200 OKSuccessThe request was successful.
400 Bad RequestInvalid ParameterA required parameter is missing or fails validation (e.g., the search query is less than 3 characters).
401 UnauthorizedAuthentication ErrorYour API key is missing from the x-api-key header.
403 ForbiddenAuthentication ErrorYour API key is invalid or incorrect.
404 Not FoundNot FoundNo fragrances were found matching your search query.
429 Too Many RequestsRate Limit ExceededYou have exceeded the request limit for your current subscription plan.
500 Internal Server ErrorServer ErrorSomething went wrong on our end. Please try again later.