> ## 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.

# Add a location

> A listing, and the grid drawn around it: `grid_size` 3, 5 or 7 cells a side, `spacing_km` apart. Each keyword at it is searched from every cell. One location on the plan.



## OpenAPI

````yaml https://api.surnex.io/docs/openapi.json post /v1/projects/{projectId}/local/places
openapi: 3.1.0
info:
  title: Surnex API
  version: 1.0.0
  description: >-
    The SEO platform's API.


    **The API is the product.** The dashboard is one client and the MCP server
    at `/mcp` is another. If a number needs deriving, a service derives it —
    never a React component, or the two clients drift.


    **Two kinds of auth.** The dashboard sends a Supabase access token as a
    Bearer JWT. MCP agents send `X-API-Key`, and the organization is resolved
    from the key.


    **Two data modes.** SERP results and Google Trends are fetched live on
    request. Everything else is written by the worker and read from Postgres, so
    a freshly-created project returns empty until its jobs complete.
servers:
  - url: https://api.surnex.io
    description: Surnex API
security: []
paths:
  /v1/projects/{projectId}/local/places:
    post:
      tags:
        - local-seo
      summary: Add a location
      description: >-
        A listing, and the grid drawn around it: `grid_size` 3, 5 or 7 cells a
        side, `spacing_km` apart. Each keyword at it is searched from every
        cell. One location on the plan.
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: projectId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 120
                listing:
                  type: object
                  properties:
                    title:
                      type: string
                    address:
                      type: string
                      nullable: true
                    cid:
                      type: string
                      nullable: true
                    place_id:
                      type: string
                      nullable: true
                    latitude:
                      type: number
                    longitude:
                      type: number
                  required:
                    - title
                    - address
                    - cid
                    - place_id
                    - latitude
                    - longitude
                location_code:
                  type: integer
                  default: 2840
                language_code:
                  type: string
                  default: en
                grid_size:
                  type: integer
                  default: 5
                spacing_km:
                  type: number
                  default: 1
              required:
                - listing
      responses:
        '201':
          description: Added
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                      business_name:
                        type: string
                        nullable: true
                      address:
                        type: string
                        nullable: true
                      cid:
                        type: string
                        nullable: true
                      latitude:
                        type: number
                        nullable: true
                      longitude:
                        type: number
                        nullable: true
                      location_code:
                        type: integer
                      language_code:
                        type: string
                      grid_size:
                        type: integer
                      spacing_km:
                        type: number
                      keyword_count:
                        type: integer
                      created_at:
                        type: string
                        format: date-time
                    required:
                      - id
                      - name
                      - business_name
                      - address
                      - cid
                      - latitude
                      - longitude
                      - location_code
                      - language_code
                      - grid_size
                      - spacing_km
                      - keyword_count
                      - created_at
                required:
                  - success
                  - data
        '402':
          description: The plan's local locations are all used, or no active plan
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '409':
          description: That listing is already a location in this project
          content:
            application/json:
              schema:
                type: object
                properties: {}

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.