openapi: 3.0.3
info:
  title: SearchRush API
  version: 1.0.0
  description: REST API for the SearchRush local SEO platform.
  contact:
    name: SearchRush Support
    url: https://searchrush.com
servers:
  - url: https://searchrush.com/api/v1
security:
  - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: "Pass your API key as: Bearer sr_..."
paths:
  /businesses:
    get:
      summary: List businesses
      responses:
        '200':
          description: List of businesses
  /businesses/{id}/rankings:
    get:
      summary: Get tracked keyword rankings for a business
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Keyword rankings
  /businesses/{id}/citations:
    get:
      summary: Get citation status for a business
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Citations
  /businesses/{id}/analytics:
    get:
      summary: Get analytics for a business
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Analytics
  /usage:
    get:
      summary: Get API usage for the current key
      responses:
        '200':
          description: Usage info
