{"openapi":"3.1.0","info":{"title":"AgentsMetrics Public API","version":"1.0.0","summary":"Read-only public endpoints for AgentsMetrics recruiting intelligence coverage.","description":"The AgentsMetrics public API exposes read-only data about which U.S. markets AgentsMetrics covers. No authentication is required. Responses are cached at the edge. Errors are returned as JSON with `error`, `code`, `status`, `hint`, and `docs` fields.","contact":{"name":"AgentsMetrics Support","email":"tin@agentsmetrics.com","url":"https://agentsmetrics.com/developers"},"termsOfService":"https://agentsmetrics.com/tos"},"externalDocs":{"description":"Developer documentation","url":"https://agentsmetrics.com/developers"},"servers":[{"url":"https://agentsmetrics.com","description":"Production"}],"tags":[{"name":"Sitemap","description":"Machine-readable lists of public recruiting intelligence pages."},{"name":"Coverage","description":"Geographic coverage of AgentsMetrics agent data."}],"paths":{"/api/sitemap/recruiting":{"get":{"operationId":"listRecruitingPaths","summary":"List recruiting intelligence page paths","description":"Returns every public state- and county-level recruiting intelligence page path (for example `/real-estate-agent-recruiting/new-york/suffolk-county`) with sitemap metadata. Prefix each `loc` with the site origin to build a full URL.","tags":["Sitemap"],"security":[],"responses":{"200":{"description":"List of recruiting intelligence page paths.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecruitingPathList"}}}}}}},"/api/sitemap/locations":{"get":{"operationId":"listSitemapLocations","summary":"List sitemap locations (alias)","description":"Alias of `GET /api/sitemap/recruiting` kept for backward compatibility. Returns the same payload.","tags":["Sitemap"],"security":[],"responses":{"200":{"description":"List of recruiting intelligence page paths.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecruitingPathList"}}}}}}},"/api/recruit/counties":{"get":{"operationId":"listCountiesForState","summary":"List covered counties for a U.S. state","description":"Returns the counties in a U.S. state for which AgentsMetrics has agent data, with the number of agent profiles per county.","tags":["Coverage"],"security":[],"parameters":[{"name":"state","in":"query","required":true,"description":"Two-letter U.S. state abbreviation, case-insensitive (for example `NY`).","schema":{"type":"string","pattern":"^[A-Za-z]{2}$","example":"NY"}}],"responses":{"200":{"description":"Counties with agent coverage in the requested state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountyList"}}}},"400":{"description":"The `state` query parameter is missing or is not a two-letter abbreviation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"RecruitingPath":{"type":"object","required":["loc","changefreq","priority","lastmod"],"properties":{"loc":{"type":"string","description":"Site-relative page path.","example":"/real-estate-agent-recruiting/new-york"},"changefreq":{"type":"string","enum":["weekly","monthly"],"description":"Expected update frequency."},"priority":{"type":"number","minimum":0,"maximum":1,"description":"Relative sitemap priority."},"lastmod":{"type":"string","format":"date-time","description":"Last modification time."}}},"RecruitingPathList":{"type":"object","required":["generatedAt","count","paths"],"properties":{"generatedAt":{"type":"string","format":"date-time","description":"When the list was generated."},"count":{"type":"integer","minimum":0,"description":"Number of entries in `paths`."},"paths":{"type":"array","items":{"$ref":"#/components/schemas/RecruitingPath"}}}},"County":{"type":"object","required":["name","slug","count"],"properties":{"name":{"type":"string","description":"County name."},"slug":{"type":"string","description":"URL slug used in recruiting page paths.","example":"suffolk-county"},"count":{"type":"integer","minimum":0,"description":"Number of agent profiles in the county."}}},"CountyList":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/County"}}}},"Error":{"type":"object","required":["error","code","status","hint","docs"],"properties":{"error":{"type":"string","description":"Human-readable error message."},"code":{"type":"string","enum":["bad_request","not_found","method_not_allowed"],"description":"Stable machine-readable error code."},"status":{"type":"integer","description":"HTTP status code, repeated in the body."},"hint":{"type":"string","description":"How to resolve the error."},"docs":{"type":"string","format":"uri","description":"Link to the developer documentation."}}}}}}