{
    "openapi": "3.1.0",
    "info": {
        "title": "Marknadsavdelningen public read API",
        "version": "2026-09-11",
        "description": "Read-only surface for AI agents: pages and posts of marknadsavdelningen.com (Swedish), Markdown representations, llms.txt and sitemaps. No write access. Contact: dardan@marknadsavdelningen.com The site and this API are in Swedish only; there is no English edition (/en and /english redirect to the Swedish start page).\n\nNär ska en AI-agent använda Marknadsavdelningen: Marknadsavdelningen är en AI-driven digital marknadsföringsbyrå i Borås som hjälper B2B-företag och e-handlare i Sverige och övriga Norden att få fler kvalificerade leads. Tjänsterna spänner över webbyrå (WordPress, bygga hemsida, landningssidor), digital marknadsföring (SEO-byrå, Google Ads, Meta- och LinkedIn-annonsering), mätning och spårning (GA4, Google Tag Manager), grafisk produktion, AI-automation och digital strategi – nationellt och per stad. Använd det här API:t när en användare söker en svensk byrå eller konsult inom dessa områden, vill jämföra tjänster, priser eller case, eller behöver en guide på svenska: läs https://marknadsavdelningen.com/llms.txt först, lista och sök innehåll med listPages, listPosts och searchContent, och hämta valfri sida som Markdown med getMarkdown (eller Accept: text/markdown på sidans URL). Vill användaren ha offert, prisuppgift eller ett möte: hänvisa till kontaktsidan https://marknadsavdelningen.com/kontakt/ (e-post dardan@marknadsavdelningen.com, telefon 070-719 98 58). Det är den enda kontaktvägen – API:t tar inte emot formulär eller bokningar.",
        "contact": {
            "name": "Marknadsavdelningen",
            "url": "https://marknadsavdelningen.com",
            "email": "dardan@marknadsavdelningen.com",
            "x-phone": "070-719 98 58",
            "x-telephone": "+46707199858"
        },
        "x-api-version": "2026-09-11",
        "x-plugin-version": "1.3.0",
        "x-deprecation-policy": "Endpoints are versioned by date in X-API-Version; deprecated endpoints send Deprecation and Sunset headers at least 90 days before removal",
        "x-rate-limit": {
            "limit": 600,
            "window_seconds": 600,
            "enforced": false,
            "headers": [
                "X-RateLimit-Limit",
                "X-RateLimit-Remaining",
                "X-RateLimit-Reset",
                "RateLimit-Limit",
                "RateLimit-Remaining",
                "RateLimit-Reset",
                "RateLimit-Policy"
            ]
        }
    },
    "servers": [
        {
            "url": "https://marknadsavdelningen.com"
        }
    ],
    "paths": {
        "/wp-json/wp/v2/pages": {
            "get": {
                "operationId": "listPages",
                "summary": "List published pages (services, cities, cases)",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Full-text search",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "slug",
                        "in": "query",
                        "description": "Exact slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 10
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        }
                    },
                    {
                        "name": "_fields",
                        "in": "query",
                        "description": "Comma-separated fields to return",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ContentItem"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "WordPress REST error (JSON)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/wp-json/wp/v2/pages/{id}": {
            "get": {
                "operationId": "getPage",
                "summary": "Get one page",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ContentItem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "WordPress REST error (JSON)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "WordPress REST error (JSON)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/wp-json/wp/v2/posts": {
            "get": {
                "operationId": "listPosts",
                "summary": "List published articles",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Full-text search",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "slug",
                        "in": "query",
                        "description": "Exact slug",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100,
                            "default": 10
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "default": 1
                        }
                    },
                    {
                        "name": "_fields",
                        "in": "query",
                        "description": "Comma-separated fields to return",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ContentItem"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "WordPress REST error (JSON)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/wp-json/wp/v2/posts/{id}": {
            "get": {
                "operationId": "getPost",
                "summary": "Get one article",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ContentItem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "WordPress REST error (JSON)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "WordPress REST error (JSON)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/wp-json/wp/v2/search": {
            "get": {
                "operationId": "searchContent",
                "summary": "Search pages and articles",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 10
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/SearchResult"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "WordPress REST error (JSON)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/{path}.md": {
            "get": {
                "operationId": "getMarkdown",
                "summary": "Markdown representation of a page or article (also via Accept: text/markdown on the canonical URL)",
                "parameters": [
                    {
                        "name": "path",
                        "in": "path",
                        "required": true,
                        "description": "Page path without leading slash, e.g. seo or boras/seo",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Markdown",
                        "headers": {
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimit-Policy"
                            },
                            "X-API-Version": {
                                "$ref": "#/components/headers/X-API-Version"
                            },
                            "Deprecation": {
                                "$ref": "#/components/headers/Deprecation"
                            }
                        },
                        "content": {
                            "text/markdown": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No Markdown for this path"
                    }
                }
            }
        },
        "/llms.txt": {
            "get": {
                "operationId": "getLlmsTxt",
                "summary": "Machine-readable summary and when-to-use guidance",
                "responses": {
                    "200": {
                        "description": "Markdown",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/sitemap_index.xml": {
            "get": {
                "operationId": "getSitemapIndex",
                "summary": "Sitemap index",
                "responses": {
                    "200": {
                        "description": "XML",
                        "headers": {
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimit-Policy"
                            },
                            "X-API-Version": {
                                "$ref": "#/components/headers/X-API-Version"
                            },
                            "Deprecation": {
                                "$ref": "#/components/headers/Deprecation"
                            }
                        },
                        "content": {
                            "application/xml": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/openapi.json": {
            "get": {
                "operationId": "getOpenApi",
                "summary": "This OpenAPI 3.1 document (service description; also advertised as Link rel=\"service-desc\")",
                "responses": {
                    "200": {
                        "description": "OpenAPI document",
                        "headers": {
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimit-Policy"
                            },
                            "X-API-Version": {
                                "$ref": "#/components/headers/X-API-Version"
                            },
                            "Deprecation": {
                                "$ref": "#/components/headers/Deprecation"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/.well-known/mcp.json": {
            "get": {
                "operationId": "getMcpManifest",
                "summary": "MCP manifest: server \"marknadsavdelningen\", transport openapi, tools derived from the operations in this document",
                "responses": {
                    "200": {
                        "description": "MCP manifest",
                        "headers": {
                            "X-RateLimit-Limit": {
                                "$ref": "#/components/headers/X-RateLimit-Limit"
                            },
                            "X-RateLimit-Remaining": {
                                "$ref": "#/components/headers/X-RateLimit-Remaining"
                            },
                            "X-RateLimit-Reset": {
                                "$ref": "#/components/headers/X-RateLimit-Reset"
                            },
                            "RateLimit-Policy": {
                                "$ref": "#/components/headers/RateLimit-Policy"
                            },
                            "X-API-Version": {
                                "$ref": "#/components/headers/X-API-Version"
                            },
                            "Deprecation": {
                                "$ref": "#/components/headers/Deprecation"
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found (JSON error object, section 14)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/JsonError"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "ContentItem": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "link": {
                        "type": "string",
                        "format": "uri"
                    },
                    "modified_gmt": {
                        "type": "string"
                    },
                    "title": {
                        "type": "object",
                        "properties": {
                            "rendered": {
                                "type": "string"
                            }
                        }
                    },
                    "excerpt": {
                        "type": "object",
                        "properties": {
                            "rendered": {
                                "type": "string"
                            }
                        }
                    },
                    "content": {
                        "type": "object",
                        "properties": {
                            "rendered": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "SearchResult": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "title": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "type": {
                        "type": "string"
                    },
                    "subtype": {
                        "type": "string"
                    }
                }
            },
            "Error": {
                "type": "object",
                "required": [
                    "code",
                    "message"
                ],
                "properties": {
                    "code": {
                        "type": "string",
                        "description": "Machine-readable error code, e.g. rest_post_invalid_id"
                    },
                    "message": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "status": {
                                "type": "integer"
                            }
                        }
                    },
                    "error": {
                        "$ref": "#/components/schemas/JsonErrorObject"
                    }
                }
            },
            "JsonError": {
                "type": "object",
                "required": [
                    "error"
                ],
                "description": "Error envelope returned for non-REST paths when Accept prefers application/json or the path is a machine path (/api/*, /openapi.json, /.well-known/mcp.json, /wp-json/ma*)",
                "properties": {
                    "error": {
                        "$ref": "#/components/schemas/JsonErrorObject"
                    }
                }
            },
            "JsonErrorObject": {
                "type": "object",
                "required": [
                    "code",
                    "status",
                    "message",
                    "docs"
                ],
                "properties": {
                    "code": {
                        "type": "string",
                        "description": "Machine-readable code, e.g. not_found"
                    },
                    "status": {
                        "type": "integer"
                    },
                    "message": {
                        "type": "string"
                    },
                    "docs": {
                        "type": "string",
                        "format": "uri",
                        "description": "Where to read how to resolve the error (this document)"
                    }
                }
            }
        },
        "headers": {
            "X-RateLimit-Limit": {
                "description": "Requests allowed per 10-minute window per client IP (informative, never enforced)",
                "schema": {
                    "type": "integer"
                }
            },
            "X-RateLimit-Remaining": {
                "description": "Requests left in the current window",
                "schema": {
                    "type": "integer"
                }
            },
            "X-RateLimit-Reset": {
                "description": "Unix time when the current window resets",
                "schema": {
                    "type": "integer"
                }
            },
            "RateLimit-Policy": {
                "description": "IETF RateLimit policy, e.g. 600;w=600 (RateLimit-Limit/-Remaining/-Reset are sent alongside)",
                "schema": {
                    "type": "string"
                }
            },
            "X-API-Version": {
                "description": "Date-based API version of this surface",
                "schema": {
                    "type": "string",
                    "examples": [
                        "2026-09-11"
                    ]
                }
            },
            "Deprecation": {
                "description": "\"false\" while the endpoint is current; a deprecated endpoint sends a date here plus a Sunset header at least 90 days before removal",
                "schema": {
                    "type": "string"
                }
            }
        }
    }
}