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

# /samgov/opportunities/search

> Search U.S. federal contract opportunities by keyword

**Price:** 5 credits per 100 results



## OpenAPI

````yaml /openapi/gov-public-sector.json post /api/samgov/opportunities/search
openapi: 3.1.0
info:
  title: Any Site API
  description: >+
    Any Site API provides programmatic access to data from LinkedIn, Instagram,
    Twitter, and other platforms.


    ## Authentication


    All API endpoints require an `access-token` header with a valid API token.
    Tokens can be created in the [dashboard](https://app.anysite.io/).


    ## Pricing


    Each endpoint has a credit cost listed in its description. Credits are
    deducted from your token balance per request.

  version: 0.0.1
servers: []
security:
  - AccessToken: []
paths:
  /api/samgov/opportunities/search:
    post:
      tags:
        - /samgov
      summary: /samgov/opportunities/search
      description: |-
        Search U.S. federal contract opportunities by keyword

        **Price:** 5 credits per 100 results
      operationId: __api_samgov_opportunities_search_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SamgovOpportunitiesSearchPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SamgovOpportunitySearchResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SamgovOpportunitiesSearchPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        query:
          type: string
          minLength: 1
        count:
          type: integer
          maximum: 10000
          minimum: 1
        is_active:
          type: boolean
          default: true
      type: object
      required:
        - query
        - count
    SamgovOpportunitySearchResult:
      properties:
        '@type':
          type: string
          default: SamgovOpportunitySearchResult
        notice_id:
          type: string
        type:
          anyOf:
            - $ref: '#/components/schemas/SamgovOpportunityType'
            - type: 'null'
        solicitation_number:
          anyOf:
            - type: string
            - type: 'null'
        parent_notice_id:
          anyOf:
            - type: string
            - type: 'null'
        is_active:
          anyOf:
            - type: boolean
            - type: 'null'
        is_canceled:
          anyOf:
            - type: boolean
            - type: 'null'
        published_at:
          anyOf:
            - type: string
            - type: 'null'
        modified_at:
          anyOf:
            - type: string
            - type: 'null'
        response_at:
          anyOf:
            - type: string
            - type: 'null'
        response_time_zone:
          anyOf:
            - type: string
            - type: 'null'
        descriptions:
          items:
            type: string
          type: array
          default: []
        organization_hierarchy:
          items:
            $ref: '#/components/schemas/SamgovOrganizationNode'
          type: array
          default: []
        award:
          anyOf:
            - $ref: '#/components/schemas/SamgovAward'
            - type: 'null'
      type: object
      required:
        - notice_id
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    SamgovOpportunityType:
      properties:
        '@type':
          type: string
          default: SamgovOpportunityType
        code:
          anyOf:
            - type: string
            - type: 'null'
        value:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    SamgovOrganizationNode:
      properties:
        '@type':
          type: string
          default: SamgovOrganizationNode
        organization_id:
          anyOf:
            - type: string
            - type: 'null'
        code:
          anyOf:
            - type: string
            - type: 'null'
        name:
          anyOf:
            - type: string
            - type: 'null'
        type:
          anyOf:
            - type: string
            - type: 'null'
        level:
          anyOf:
            - type: integer
            - type: 'null'
        status:
          anyOf:
            - type: string
            - type: 'null'
        location:
          anyOf:
            - $ref: '#/components/schemas/SamgovLocation'
            - type: 'null'
      type: object
    SamgovAward:
      properties:
        '@type':
          type: string
          default: SamgovAward
        number:
          anyOf:
            - type: string
            - type: 'null'
        amount:
          anyOf:
            - type: string
            - type: 'null'
        date:
          anyOf:
            - type: string
            - type: 'null'
        delivery_order_number:
          anyOf:
            - type: string
            - type: 'null'
        line_item_number:
          anyOf:
            - type: string
            - type: 'null'
        awardee:
          anyOf:
            - $ref: '#/components/schemas/SamgovAwardee'
            - type: 'null'
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
    SamgovLocation:
      properties:
        '@type':
          type: string
          default: SamgovLocation
        street_address:
          anyOf:
            - type: string
            - type: 'null'
        street_address2:
          anyOf:
            - type: string
            - type: 'null'
        city:
          anyOf:
            - type: string
            - type: 'null'
        state:
          anyOf:
            - type: string
            - type: 'null'
        zip:
          anyOf:
            - type: string
            - type: 'null'
        country:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    SamgovAwardee:
      properties:
        '@type':
          type: string
          default: SamgovAwardee
        name:
          anyOf:
            - type: string
            - type: 'null'
        uei_sam:
          anyOf:
            - type: string
            - type: 'null'
        cage_code:
          anyOf:
            - type: string
            - type: 'null'
        location:
          anyOf:
            - $ref: '#/components/schemas/SamgovLocation'
            - type: 'null'
      type: object
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````