Public REST API • v1

Build with the AS-Mart API

Integrate products, categories, collections, blogs, combined widgets, and more than 2,000 public buying guides into ASP.NET Core applications, affiliate websites, dashboards, and partner platforms.

HTTPS + JSON Version 1 Optional API key Maximum count 50 Interactive Swagger
API

Overview

The AS-Mart API provides public product and content data from AS-Mart. Other websites can use it to show featured products, latest products, popular items, deals, top-rated products, category products, collections, related products, and blog posts.

Only active products are returned. Use buyUrl for tracked outbound clicks and productUrl for the AS-Mart product detail page.

JSON Responses

All endpoints return clean JSON for websites and apps.

Rate Limited

Public endpoints are protected by rate limiting.

Affiliate Ready

Use buyUrl to keep tracking and redirects controlled.

API Versioning

New integrations should use version 1 endpoints beginning with /api/v1.

Legacy routes beginning directly with /api remain available for compatibility but are deprecated.
GET https://as-mart.com/api/v1/products/featured?count=6
Versioned responses include X-API-Version: 1. Legacy responses include deprecation headers. Existing clients can migrate one endpoint at a time without changing their API key.

Base URLs

Use the following versioned base URLs for all new integrations:

https://as-mart.com/api/v1/products

Other public resources:

https://as-mart.com/api/v1/categories
https://as-mart.com/api/v1/collections
https://as-mart.com/api/v1/blogs
https://as-mart.com/api/v1/widgets
https://as-mart.com/api/v1/seopages

Authentication

Anonymous public requests can be sent without credentials. Production integrations should include an API key in the X-API-Key request header for higher, account-specific limits and lifecycle management.

Public request

No header is required. Public traffic uses the shared public rate-limit policy.

API-key request

Send X-API-Key: YOUR_API_KEY with every request.

cURL with API key

curl --request GET \
  --url "https://as-mart.com/api/v1/products/featured?count=6" \
  --header "Accept: application/json" \
  --header "X-API-Key: YOUR_API_KEY"
Keep API keys on the server. Do not expose production keys in public JavaScript, Git repositories, screenshots, or client-side configuration.

Product API Endpoints

Use these endpoints to show AS-Mart products on external websites.

MethodEndpointResourceFunctionality
GET/api/v1/products/featured?count=12ProductsFeatured products selected by admin.
GET/api/v1/products/latest?count=12ProductsLatest active products.
GET/api/v1/products/popular?count=12ProductsPopular products based on clicks and ratings.
GET/api/v1/products/deals?count=12DealsProducts marked as Deal of the Day.
GET/api/v1/products/top-rated?count=12RatingHighest-rated products.
GET/api/v1/products/random?count=6WidgetsRandom active products for rotating widgets and ads.
GET/api/v1/products/search?q=watch&count=12SearchSearch by title, brand, or short description.
GET/api/v1/products/category/{categorySlug}?count=12CategoryProducts from a specific category slug.
GET/api/v1/products/brand/{brand}?count=12BrandProducts from a specific brand.
GET/api/v1/products/price-range?min=10&max=100&count=12FilterProducts within a price range.
GET/api/v1/products/related/{slug}?count=12RelatedRelated products using product categories.
GET/api/v1/products/collection/{collectionSlug}?count=12CollectionProducts from a public collection.
GET/api/v1/products/home-widget?count=8WidgetReturns featured, deals, popular, and latest products in one response.
GET/api/v1/products/promote/{slug}AdSingle product for advertising/promotion.
GET/api/v1/products/{slug}SingleSingle active product by SEO slug.
The count parameter defaults to 12 and maximum allowed value is 50.

Category API

MethodEndpointResourceFunctionality
GET/api/v1/categoriesCategoriesReturns all public categories with product counts.
GET/api/v1/products/category/{categorySlug}?count=12ProductsReturns products for a specific category.

Collection API

MethodEndpointResourceFunctionality
GET/api/v1/collectionsCollectionsReturns all public collections with product counts.
GET/api/v1/products/collection/{collectionSlug}?count=12ProductsReturns products from a selected collection.

Blog API

MethodEndpointResourceFunctionality
GET/api/v1/blogs/latest?count=6BlogsReturns latest AS-Mart blog posts for external websites.

Combined Widget API

Use the combined endpoint when a page needs several AS-Mart resources at once. It reduces HTTP round trips and is recommended for dashboards, landing pages, and external home-page integrations.

MethodEndpointResourceFunctionality
GET/api/v1/widgets/home?productCount=8&blogCount=6&categoryCount=12&collectionCount=8&guideCount=8CombinedReturns product groups, latest blogs, categories, collections, latest SEO guides, and generation time in one response.
Use this endpoint when the consumer needs several sections on one page. For a single resource, use the dedicated endpoint.

SEO Pages API

Use these endpoints to consume public AS-Mart SEO guide pages. These are useful for guide widgets, AI search, sitemap tools, category pages, search tools, and external content integrations.

MethodEndpointResourceFunctionality
GET /api/v1/seopages?page=1&pageSize=20 List Returns paginated published SEO pages.
GET /api/v1/seopages/{slug} Single Returns one published SEO page with intro, body, and FAQ JSON.
GET /api/v1/seopages/latest?count=20 Latest Returns newest published SEO pages.
GET /api/v1/seopages/random?count=10 Widget Returns random SEO pages for widgets or rotating links.
GET /api/v1/seopages/search?q=laptop&page=1&pageSize=20 Search Searches title, slug, H1, keyword, and meta description.
GET /api/v1/seopages/filter?category=laptops&brand=Apple&template=best_of Filter Filters SEO pages by category, brand, template, price range, sort mode, and keyword.
GET /api/v1/seopages/category/{categorySlug}?count=20 Category Returns SEO pages from a selected category.
GET /api/v1/seopages/categories Categories Returns SEO page categories with page counts.
GET /api/v1/seopages/related/{slug}?count=10 Related Returns related SEO pages from the same category.
GET /api/v1/seopages/home-widget?count=8 Widget Returns latest pages, random pages, and popular SEO categories.
GET /api/v1/seopages/stats Stats Returns total SEO pages, published pages, category count, and last updated date.
GET /api/v1/seopages/sitemap Sitemap Returns public SEO page URLs and update dates for crawlers and external sitemap tools.
GET /api/v1/seopages/templates Templates Returns available SEO page template keys.
GET /api/v1/seopages/template/{template}?count=20 Template Returns SEO pages from a selected template key.
GET /api/v1/seopages/brands Brands Returns available SEO page brands.
GET /api/v1/seopages/brand/{brand}?count=20 Brand Returns SEO pages for a selected brand.
GET /api/v1/seopages/ai?q=best laptop&count=10 AI Returns AI-friendly SEO search results with title, summary, URL, category, and keyword.
SEO Pages API only returns published pages where Status = 1.

Response Models

Product Response

FieldTypeDescription
idintProduct ID.
titlestringProduct title.
slugstringSEO slug.
shortDescriptionstringShort product summary.
brandstringBrand name.
pricedecimalSale price.
listPricedecimalOriginal/list price.
currencystringCurrency code.
FieldTypeDescription
ratingdecimalProduct rating.
ratingCountintTotal ratings.
mainImageUrlstringMain image URL.
productUrlstringAS-Mart product page.
buyUrlstringTracked buy redirect.
isFeaturedboolFeatured flag.
isDealOfTheDayboolDeal flag.
categoriesarrayCategory names.

HTTP Status and Error Responses

API errors use standard HTTP status codes. JSON error responses may include success, error, message, traceId, and validation errors.

200

OK

The request succeeded.

400

Bad Request

A parameter failed validation.

401

Unauthorized

The API key is invalid, disabled, expired, or revoked.

404

Not Found

The requested route or resource does not exist.

429

Too Many Requests

The rate limit or monthly quota was exceeded.

500

Server Error

An unexpected server-side failure occurred.

Standard error example

{
  "success": false,
  "error": "invalid_api_key",
  "message": "The supplied API key is invalid, expired, disabled, or revoked.",
  "traceId": "00-0123456789abcdef-0123456789abcdef-00",
  "errors": null,
  "data": null
}

Rate Limits & API Key

AS-Mart public APIs are rate limited to keep the service fast, stable, and protected from abuse. You can use public endpoints without an API key, but API key access is recommended for websites, apps, dashboards, partner platforms, and production integrations.

Public Access

60 requests per minute

No API key required. Best for testing, demos, and light usage.

API Key Access

Higher limits available

Use an API key for trusted websites, ASP.NET Core apps, affiliate blogs, widgets, and production integrations.

Need more than 60 requests per minute? Create an API key first, then contact the AS-Mart admin with your website URL and expected usage. Approved integrations can receive higher limits such as 300, 500, 1000+ requests per minute.

When the rate limit is exceeded, the API returns:

429 Too Many Requests

Product JSON Response

[
                          {
                            "id": 101,
                            "title": "Example Product Title",
                            "slug": "example-product-title",
                            "shortDescription": "Short product description here.",
                            "brand": "Example Brand",
                            "price": 49.99,
                            "listPrice": 69.99,
                            "currency": "USD",
                            "rating": 4.6,
                            "ratingCount": 1240,
                            "mainImageUrl": "https://example.com/product.jpg",
                            "productUrl": "https://as-mart.com/product/example-product-title",
                            "buyUrl": "https://as-mart.com/product/go/101",
                            "isFeatured": true,
                            "isDealOfTheDay": false,
                            "clickCount": 250,
                            "categories": ["Electronics", "Smart Devices"]
                          }
                        ]

Home Widget Response

{
                          "featured": [],
                          "deals": [],
                          "popular": [],
                          "latest": []
                        }

JavaScript Fetch Example

fetch("https://as-mart.com/api/v1/products/home-widget?count=6")
  .then(response => response.json())
  .then(data => {
      console.log(data.featured);
      console.log(data.deals);
      console.log(data.popular);
      console.log(data.latest);
  })
  .catch(error => {
      console.error("API Error:", error);
  });

ASP.NET Core HttpClient Example

public class AsMartApiService
{
    private readonly HttpClient _httpClient;

    public AsMartApiService(HttpClient httpClient)
    {
        _httpClient = httpClient;
    }

    public async Task<ProductHomeWidgetApiDto> GetHomeWidgetAsync()
    {
        var result = await _httpClient.GetFromJsonAsync<ProductHomeWidgetApiDto>(
            "https://as-mart.com/api/v1/products/home-widget?count=8");

        return result ?? new ProductHomeWidgetApiDto();
    }
}

ASP.NET Core with API Key

builder.Services.AddHttpClient<AsMartApiService>(client =>
{
    client.BaseAddress = new Uri("https://as-mart.com/");
    client.DefaultRequestHeaders.Accept.ParseAdd("application/json");
    client.DefaultRequestHeaders.Add("X-API-Key", configuration["AsMartApi:ApiKey"]);
});

SEO Guide Filter Example

const url = new URL("https://as-mart.com/api/v1/seopages/filter");
url.searchParams.set("category", "laptops");
url.searchParams.set("brand", "Apple");
url.searchParams.set("template", "best_of");
url.searchParams.set("page", "1");
url.searchParams.set("pageSize", "20");

const response = await fetch(url, {
  headers: {
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY"
  }
});

const result = await response.json();