> ## Documentation Index
> Fetch the complete documentation index at: https://docs.surnex.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Save keywords to project

> Save a list of keywords to a project. Metrics are fetched from DataForSEO (or cache) and stored with the keyword. Duplicates are updated with fresh data.



## OpenAPI

````yaml https://api.surnex.io/openapi.json post /v1/projects/{project_id}/keywords
openapi: 3.1.0
info:
  title: Surnex API
  description: |-
    Surnex SEO Platform API — api.surnex.io

    Provides the complete backend for the Surnex SEO dashboard including:
    - Multi-tenant organization management
    - Project tracking (domains)
    - Keyword rank tracking (Phase 1+)
    - Backlink analysis (Phase 3+)
    - Site auditing (Phase 4+)
    - Stripe billing integration
    - MCP endpoint for AI agents at /mcp
  version: 0.1.0
servers: []
security: []
paths:
  /v1/projects/{project_id}/keywords:
    post:
      tags:
        - Keywords
      summary: Save keywords to project
      description: >-
        Save a list of keywords to a project. Metrics are fetched from
        DataForSEO (or cache) and stored with the keyword. Duplicates are
        updated with fresh data.
      operationId: save_project_keywords_v1_projects__project_id__keywords_post
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Project Id
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveKeywordsRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIResponse_list_SavedKeywordResponse__'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    SaveKeywordsRequest:
      properties:
        keywords:
          items:
            type: string
          type: array
          maxItems: 500
          minItems: 1
          title: Keywords
          description: List of keywords to save to the project.
        location_code:
          type: integer
          title: Location Code
          description: DataForSEO location code (e.g. 2840 = United States).
        language_code:
          type: string
          maxLength: 10
          title: Language Code
          description: Language code (e.g., 'en', 'de', 'fr').
      type: object
      required:
        - keywords
        - location_code
        - language_code
      title: SaveKeywordsRequest
      description: Request body for saving keywords to a project.
    APIResponse_list_SavedKeywordResponse__:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        data:
          anyOf:
            - items:
                $ref: '#/components/schemas/SavedKeywordResponse'
              type: array
            - type: 'null'
          title: Data
      type: object
      title: APIResponse[list[SavedKeywordResponse]]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SavedKeywordResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        keyword:
          type: string
          title: Keyword
        search_volume:
          anyOf:
            - type: integer
            - type: 'null'
          title: Search Volume
        keyword_difficulty:
          anyOf:
            - type: number
            - type: 'null'
          title: Keyword Difficulty
        cpc:
          anyOf:
            - type: number
            - type: 'null'
          title: Cpc
        competition:
          anyOf:
            - type: number
            - type: 'null'
          title: Competition
        search_intent:
          anyOf:
            - type: string
            - type: 'null'
          title: Search Intent
        trend_data:
          anyOf:
            - items:
                $ref: '#/components/schemas/MonthlySearch'
              type: array
            - type: 'null'
          title: Trend Data
        serp_features:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Serp Features
        location_code:
          type: integer
          title: Location Code
        language_code:
          type: string
          title: Language Code
        added_by:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Added By
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - keyword
        - location_code
        - language_code
        - created_at
        - updated_at
      title: SavedKeywordResponse
      description: Saved keyword record returned from the database.
    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
    MonthlySearch:
      properties:
        year:
          type: integer
          title: Year
          description: Calendar year (e.g., 2025).
        month:
          type: integer
          maximum: 12
          minimum: 1
          title: Month
          description: Calendar month (1–12).
        search_volume:
          type: integer
          minimum: 0
          title: Search Volume
          description: Average monthly searches.
      type: object
      required:
        - year
        - month
        - search_volume
      title: MonthlySearch
      description: Search volume for a single month.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````