Plexa Stats API

The stats API from Plexa — 16 operation(s) for stats.

GitHub OpenAPI

Operations 16

GET /api/v1/stats/public Public Stats #
POST /api/v1/stats/crawler-visit Log Crawler Visit #
GET /api/v1/stats/crawler-activity Crawler Activity #
GET /api/v1/stats/crawler-activity/{bot_name}/details Crawler Activity Details #
GET /api/v1/stats/ai-answers Ai Answers #
GET /api/v1/stats/crawler-activity/recent Crawler Activity Recent #
GET /api/v1/study/latest Study Latest #
GET /api/v1/stats/recent-listings Recent Listings #
GET /v1/stats/public Public Stats #
POST /v1/stats/crawler-visit Log Crawler Visit #
GET /v1/stats/crawler-activity Crawler Activity #
GET /v1/stats/crawler-activity/{bot_name}/details Crawler Activity Details #
GET /v1/stats/ai-answers Ai Answers #
GET /v1/stats/crawler-activity/recent Crawler Activity Recent #
GET /v1/study/latest Study Latest #
GET /v1/stats/recent-listings Recent Listings #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/joinplexa-com:joinplexa-com-stats-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

joinplexa-com-stats-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Plexa Stats API
  description: Agentic business directory for Mexico
  version: 0.1.0
tags:
- name: Stats
paths:
  /api/v1/stats/public:
    get:
      tags:
      - Stats
      summary: Public Stats
      description: Stats públicas para la landing. Cache Redis 5 min. Degradación graceful.
      operationId: public_stats_api_v1_stats_public_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/v1/stats/crawler-visit:
    post:
      tags:
      - Stats
      summary: Log Crawler Visit
      description: 'Registra visita de bot IA (llamado por el middleware de Next.js).

        Rate limit 100/min por IP. Fire-and-forget: nunca rompe.'
      operationId: log_crawler_visit_api_v1_stats_crawler_visit_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CrawlerVisitRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/stats/crawler-activity:
    get:
      tags:
      - Stats
      summary: Crawler Activity
      description: Actividad de bots IA en Plexa (últimos 30 días). Cache Redis 5 min.
      operationId: crawler_activity_api_v1_stats_crawler_activity_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/v1/stats/crawler-activity/{bot_name}/details:
    get:
      tags:
      - Stats
      summary: Crawler Activity Details
      description: 'Últimas visitas de un bot específico (para el dropdown del feed), sin filtro

        de fecha: siempre las N más recientes (hoy, ayer o la semana pasada). Máx 10 por default.'
      operationId: crawler_activity_details_api_v1_stats_crawler_activity__bot_name__details_get
      parameters:
      - name: bot_name
        in: path
        required: true
        schema:
          type: string
          title: Bot Name
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 50
          minimum: 1
          default: 10
          title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/stats/ai-answers:
    get:
      tags:
      - Stats
      summary: Ai Answers
      description: 'I-29: respuestas REALES de IA para el hero — la pregunta, la superficie, cuándo, y los NOMBRES que

        la IA dio, con bandera de si cada uno está en Plexa (link a su ficha) o no. Cache 5 min.


        🔴 NUNCA devuelve `answer_text` crudo (el 28% trae teléfonos de terceros → dato del dueño, no público):

        solo `raw_name` (el nombre del negocio) + slug si está en el catálogo. Se rota mostrando LOS DOS

        estados (con y sin negocios de Plexa nombrados): esconder el caso incómodo sería un escaparate. Si no

        hay respuestas recientes con menciones, devuelve `items: []` y el hero degrada (no queda roto).'
      operationId: ai_answers_api_v1_stats_ai_answers_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /api/v1/stats/crawler-activity/recent:
    get:
      tags:
      - Stats
      summary: Crawler Activity Recent
      description: 'Últimas N lecturas GLOBALES (cualquier bot != unknown) para el live-log del feed terminal.

        Alimenta SOLO datos reales — si viene vacío, el front oculta el log (nunca inventa líneas).

        Cache Redis corta (30s) para que el ''en vivo'' sea creíble sin martillar la DB.'
      operationId: crawler_activity_recent_api_v1_stats_crawler_activity_recent_get
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 20
          minimum: 1
          default: 8
          title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/study/latest:
    get:
      tags:
      - Stats
      summary: Study Latest
      description: 'Edición del Índice de Visibilidad IA (estudio agregado) — público, cacheado 300s. Números

        REALES persistidos por el cron quincenal (study_snapshots). Sin `edition` = la más reciente

        (medición actual); con `edition=N` = ESA edición (para anclar el Report a la cifra de su DOI,

        que no puede moverse cuando el cron persiste una edición nueva). 404 si no existe.'
      operationId: study_latest_api_v1_study_latest_get
      parameters:
      - name: edition
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
            minimum: 1
          - type: 'null'
          description: Fija una edición por número (INMUTABLE, para superficies citadas por DOI). Sin él = la más reciente.
          title: Edition
        description: Fija una edición por número (INMUTABLE, para superficies citadas por DOI). Sin él = la más reciente.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/stats/recent-listings:
    get:
      tags:
      - Stats
      summary: Recent Listings
      description: 'Últimos N negocios INDEXADOS en el registro (created_at DESC, activos, sin artefactos de

        prueba) para el terminal ''el registro crece'' del home. Es COBERTURA del directorio público

        creciendo por el seeding (nosotros indexando) — NO negocios que se registran. Todo dato ya

        público (nombre/giro/ciudad). Cache 60s + rate-limit anónimo estándar.'
      operationId: recent_listings_api_v1_stats_recent_listings_get
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 20
          minimum: 1
          default: 10
          title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/stats/public:
    get:
      tags:
      - Stats
      summary: Public Stats
      description: Stats públicas para la landing. Cache Redis 5 min. Degradación graceful.
      operationId: public_stats_v1_stats_public_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /v1/stats/crawler-visit:
    post:
      tags:
      - Stats
      summary: Log Crawler Visit
      description: 'Registra visita de bot IA (llamado por el middleware de Next.js).

        Rate limit 100/min por IP. Fire-and-forget: nunca rompe.'
      operationId: log_crawler_visit_v1_stats_crawler_visit_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CrawlerVisitRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/stats/crawler-activity:
    get:
      tags:
      - Stats
      summary: Crawler Activity
      description: Actividad de bots IA en Plexa (últimos 30 días). Cache Redis 5 min.
      operationId: crawler_activity_v1_stats_crawler_activity_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /v1/stats/crawler-activity/{bot_name}/details:
    get:
      tags:
      - Stats
      summary: Crawler Activity Details
      description: 'Últimas visitas de un bot específico (para el dropdown del feed), sin filtro

        de fecha: siempre las N más recientes (hoy, ayer o la semana pasada). Máx 10 por default.'
      operationId: crawler_activity_details_v1_stats_crawler_activity__bot_name__details_get
      parameters:
      - name: bot_name
        in: path
        required: true
        schema:
          type: string
          title: Bot Name
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 50
          minimum: 1
          default: 10
          title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/stats/ai-answers:
    get:
      tags:
      - Stats
      summary: Ai Answers
      description: 'I-29: respuestas REALES de IA para el hero — la pregunta, la superficie, cuándo, y los NOMBRES que

        la IA dio, con bandera de si cada uno está en Plexa (link a su ficha) o no. Cache 5 min.


        🔴 NUNCA devuelve `answer_text` crudo (el 28% trae teléfonos de terceros → dato del dueño, no público):

        solo `raw_name` (el nombre del negocio) + slug si está en el catálogo. Se rota mostrando LOS DOS

        estados (con y sin negocios de Plexa nombrados): esconder el caso incómodo sería un escaparate. Si no

        hay respuestas recientes con menciones, devuelve `items: []` y el hero degrada (no queda roto).'
      operationId: ai_answers_v1_stats_ai_answers_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
  /v1/stats/crawler-activity/recent:
    get:
      tags:
      - Stats
      summary: Crawler Activity Recent
      description: 'Últimas N lecturas GLOBALES (cualquier bot != unknown) para el live-log del feed terminal.

        Alimenta SOLO datos reales — si viene vacío, el front oculta el log (nunca inventa líneas).

        Cache Redis corta (30s) para que el ''en vivo'' sea creíble sin martillar la DB.'
      operationId: crawler_activity_recent_v1_stats_crawler_activity_recent_get
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 20
          minimum: 1
          default: 8
          title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/study/latest:
    get:
      tags:
      - Stats
      summary: Study Latest
      description: 'Edición del Índice de Visibilidad IA (estudio agregado) — público, cacheado 300s. Números

        REALES persistidos por el cron quincenal (study_snapshots). Sin `edition` = la más reciente

        (medición actual); con `edition=N` = ESA edición (para anclar el Report a la cifra de su DOI,

        que no puede moverse cuando el cron persiste una edición nueva). 404 si no existe.'
      operationId: study_latest_v1_study_latest_get
      parameters:
      - name: edition
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
            minimum: 1
          - type: 'null'
          description: Fija una edición por número (INMUTABLE, para superficies citadas por DOI). Sin él = la más reciente.
          title: Edition
        description: Fija una edición por número (INMUTABLE, para superficies citadas por DOI). Sin él = la más reciente.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/stats/recent-listings:
    get:
      tags:
      - Stats
      summary: Recent Listings
      description: 'Últimos N negocios INDEXADOS en el registro (created_at DESC, activos, sin artefactos de

        prueba) para el terminal ''el registro crece'' del home. Es COBERTURA del directorio público

        creciendo por el seeding (nosotros indexando) — NO negocios que se registran. Todo dato ya

        público (nombre/giro/ciudad). Cache 60s + rate-limit anónimo estándar.'
      operationId: recent_listings_v1_stats_recent_listings_get
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 20
          minimum: 1
          default: 10
          title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CrawlerVisitRequest:
      properties:
        bot_name:
          type: string
          title: Bot Name
        path:
          type: string
          title: Path
        user_agent:
          anyOf:
          - type: string
          - type: 'null'
          title: User Agent
        ip_address:
          anyOf:
          - type: string
          - type: 'null'
          title: Ip Address
      type: object
      required:
      - bot_name
      - path
      title: CrawlerVisitRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer