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

# Radius Search

> This call will purchase a radius search mailing listing and add it to your account. Each record added to the mailing list costs $.05. You can specify the number of records to return (up to 2,500) and the address/postal code to center the search around. You can also specify a mailing_list_id to add the results to an existing mailing list, or leave it blank to create a new mailing list. While API/Zapier Test Mode is enabled on the account, this endpoint is limited to 5 records per purchase — test mode cancels orders, but buying a radius search is not an order and is charged in full, so the limit is what keeps an integration under development from buying a full list by accident.



## OpenAPI

````yaml post /mailing-lists-utils/buy-radius-search
openapi: 3.1.0
info:
  title: thanks.io API
  description: >-
    Use the thanks.io API to send postcards, letters, notecards, windowless
    letters, and gift cards.
  contact:
    url: https://thanks.io
    email: support@thanks.io
  version: 1.0.0
servers:
  - url: https://api.thanks.io/api/v2
    description: The main API server for thanks.io
security:
  - bearerAuth: []
tags:
  - name: Recipients
  - name: Mailing Lists
  - name: Send Mailer
  - name: Order Estimates
  - name: Orders
  - name: Message Templates
  - name: Image Templates
  - name: Creatives Library
    description: >-
      Your Creatives library: saved pairings of an image template and a message
      template. Sending one by `creative_id` is the recommended way to send.
      Creatives are designed in your dashboard; these endpoints list and read
      them so your integration can find the right `creative_id`.
  - name: Handwriting Styles
  - name: Giftcards
  - name: Dynamic Images
    description: ''
  - name: Image Builder
  - name: Sub Accounts
  - name: Webhooks
  - name: Webhook Events
externalDocs:
  description: Learn more about thanks.io
  url: https://docs.thanks.io
paths:
  /mailing-lists-utils/buy-radius-search:
    post:
      tags:
        - Mailing Lists
      summary: Radius Search
      description: >-
        This call will purchase a radius search mailing listing and add it to
        your account. Each record added to the mailing list costs $.05. You can
        specify the number of records to return (up to 2,500) and the
        address/postal code to center the search around. You can also specify a
        mailing_list_id to add the results to an existing mailing list, or leave
        it blank to create a new mailing list. While API/Zapier Test Mode is
        enabled on the account, this endpoint is limited to 5 records per
        purchase — test mode cancels orders, but buying a radius search is not
        an order and is charged in full, so the limit is what keeps an
        integration under development from buying a full list by accident.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - address
                - postal_code
                - record_count
              properties:
                mailing_list_id:
                  type: integer
                  example: 1
                  description: >-
                    ID of the mailing list to add the radius search results to. 
                    If not provided, a new mailing list will be created.
                address:
                  type: string
                  example: 123 Main Street
                  description: Street address to use for center of nearest neighbor search.
                postal_code:
                  type: string
                  example: '55555'
                  description: Postal code to use for center of nearest neighbor search.
                record_count:
                  type: integer
                  description: >-
                    Number of nearest neighbors to search for. While API/Zapier
                    Test Mode is enabled on the account, a purchase through this
                    endpoint is limited to 5 records; a larger value is refused
                    with a 422 and nothing is bought or charged. Buying from the
                    dashboard is not affected and keeps the full 2,500.
                  minimum: 1
                  maximum: 2500
                  example: 1
                record_types:
                  type: string
                  description: Which type of records to search for
                  enum:
                    - all
                    - likelytomove
                    - apartmentcomplex
                    - likelytodownsize
                    - likelytorefi
                    - absenteeowner
                    - highnetworth
                    - majorityhomeequity
                    - homefreeclear
                    - underwater
                    - kidsinhousehold
                    - newhomeowner
                    - firsttimehomebuyer
                    - renters
                    - retiring
                    - retired
                    - pool
                    - onlybusinesses
                    - newbusiness
                  default: all
                include_condos:
                  type: boolean
                  description: Include condos in search.
                  default: true
                append_data:
                  type: boolean
                  description: >-
                    Append phone and email to each record for an additional fee
                    ($.20 per record).
                  default: false
                use_property_owner:
                  type: boolean
                  description: >-
                    Use Property Owners Address when searching for a commercial
                    record_type.
                  default: false
                include_search_address:
                  type: boolean
                  description: >-
                    Specifies whether to include the search address in the
                    mailing list created.
            examples:
              Create New List w/ Phone+Email Append:
                value:
                  address: 123 Main Street
                  postal_code: '55555'
                  record_types: all
                  record_count: 10
                  include_condos: false
                  append_data: true
              Append To Existing List w/ Condos:
                value:
                  address: 123 Main Street
                  postal_code: '55555'
                  record_types: all
                  record_count: 10
                  include_condos: true
                  append_data: false
                  mailing_list_id: 3020
      responses:
        '200':
          description: Successful Response
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: success
                  mailing_list_id:
                    type: integer
                    example: 1196
                  failure:
                    type: boolean
                    example: false
              example:
                message: success
                mailing_list_id: 1196
                failure: false
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: No neighbors could be found with search parameters.
                  failure:
                    type: boolean
                    example: true
        '403':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: >-
            Duplicate radius search purchase. An identical purchase was already
            made from this account within the last 24 hours and was refused so
            the records are not bought twice. The response carries the
            identifiers the original purchase produced, so use those instead of
            retrying. Change any search parameter, or wait for the window to
            pass, to buy again.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: >-
                      An identical radius search purchase was already made from
                      this account within the last 24 hours. Change the search
                      parameters, or wait 24 hours, to buy these leads again.
                  code:
                    type: string
                    example: duplicate_radius_search
                  mailing_list_id:
                    type: integer
                    nullable: true
                    description: >-
                      The mailing list the original purchase created, when it
                      produced one.
                    example: 1196
                  order_id:
                    type: integer
                    nullable: true
                    description: >-
                      The order the original purchase was bought for, when the
                      search was bought as part of a send.
                    example: null
                  failure:
                    type: boolean
                    example: true
        '422':
          description: >-
            Record count above the API/Zapier Test Mode limit. While test mode
            is enabled on the account, a purchase through this endpoint is
            limited to 5 records. The request is refused during validation, so
            no leads are bought, the account is not charged, and the 24 hour
            duplicate purchase window is not used up. Send a record_count of 5
            or fewer, or turn off API/Zapier Test Mode in API Settings to buy a
            full list.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: The given data was invalid.
                  errors:
                    type: object
                    properties:
                      record_count:
                        type: array
                        items:
                          type: string
                        example:
                          - >-
                            Test mode is enabled on this account, so a radius
                            search bought via API or Zapier is limited to 5
                            records per purchase. Nothing was purchased and the
                            account was not charged. Send record_count of 5 or
                            fewer, or turn test mode off in the dashboard under
                            API Settings to buy a full list.
                  failure:
                    type: boolean
                    example: true
components:
  responses:
    Unauthorized:
      description: Access token is missing or invalid
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Unauthorized
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Not Found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication using your thanks.io API key

````

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