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

# List opportunities

> Your opportunities (the placements we negotiated for you), as the portal's Mentions page lists them: newest first, then by id. Paging is by position, so an opportunity added or leaving your filter between two calls can shift the pages.

Your opportunities, the placements we negotiated for you, as the portal's Mentions page lists them. Only those in progress by default.

## Filtering by status

| `status` | Keeps |
| - | - |
| `in_progress` (default) | `proposition`, `content_creation` and `deal_placement`: everything not yet live or declined |
| `awaiting_decision` | what waits on your answer (accept, counter-offer or decline). A counter-offer you sent waits on us, and is not one of them |
| `proposition`, `content_creation`, `deal_placement`, `live`, `declined` | one column of the Pipeline board |
| `all` | every opportunity |

Several values are comma-separated: `?status=live,declined`.

```bash theme={null}
curl -s "https://app.tryhellosearch.com/api/v1/opportunities?status=awaiting_decision" \
  -H "Authorization: Bearer $HELLOSEARCH_KEY"
```

## Fields

* `id`: what [Get an opportunity](https://docs.tryhellosearch.com/api-reference/get-opportunity.md) and [Decide](https://docs.tryhellosearch.com/api-reference/decide-opportunity.md) take.
* `awaiting_your_decision`: `true` when you owe an answer. Filter on it, or on `status=awaiting_decision`, rather than on `status_label`, which is display text.
* `site`: the site the mention is on.
* `format`: `{ key, label }`, `key` being `link_insert` or `guest_post`; `null` while not decided.
* `stage`: `{ key, label }`, the column of the Pipeline board; `key` is `proposition`, `content_creation`, `deal_placement`, `live` or `declined`.
* `status_label`: the status the Mentions table prints (`Awaiting your decision`, `Your counter-offer sent`, `Placed`…), meant to be shown as is.
* `price`: what the mention costs you. Nothing is owed for a mention that never goes live.
* `created_at`: when the opportunity was opened. `published_at`: when it went live, `null` until then.

Page with `page` until `has_more` is `false` (see [Conventions](https://docs.tryhellosearch.com/conventions.md#paging)).


## OpenAPI

````yaml GET /opportunities
openapi: 3.1.0
info:
  title: HelloSearch API
  version: '1'
  description: >-
    Your HelloSearch figures and opportunities, as your portal shows them. Every
    route reads the same data as the portal.
servers:
  - url: https://app.tryhellosearch.com/api/v1
security:
  - accessKey: []
paths:
  /opportunities:
    get:
      summary: List opportunities
      description: >-
        Your opportunities (the placements we negotiated for you), as the
        portal's Mentions page lists them: newest first, then by id. Paging is
        by position, so an opportunity added or leaving your filter between two
        calls can shift the pages.
      operationId: listOpportunities
      parameters:
        - name: status
          in: query
          description: >-
            Comma-separated, an opportunity is kept if any matches.
            `in_progress` is `proposition`, `content_creation` and
            `deal_placement`. `awaiting_decision` is what waits on your answer.
            `all` is every opportunity.
          schema:
            type: string
            default: in_progress
            example: awaiting_decision
        - name: page
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100000
            default: 1
        - name: per_page
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
      responses:
        '200':
          description: A page of opportunities.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpportunityPage'
        '400':
          $ref: '#/components/responses/InvalidParameter'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    OpportunityPage:
      type: object
      required:
        - data
        - pagination
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Opportunity'
        pagination:
          type: object
          properties:
            page:
              type: integer
            per_page:
              type: integer
            total:
              type: integer
            has_more:
              type: boolean
    Opportunity:
      type: object
      required:
        - id
        - site
        - format
        - stage
        - status_label
        - awaiting_your_decision
        - price
        - created_at
        - published_at
      properties:
        id:
          type: string
          example: 4b1d2f9e-7c3a-4e8b-9a61-2f0d8c5e7b13
        site:
          type: object
          properties:
            domain:
              type: string
              example: example.com
            name:
              type: string
              example: Example Media
        format:
          type:
            - object
            - 'null'
          description: '`null` while the format is not decided.'
          properties:
            key:
              type: string
              enum:
                - link_insert
                - guest_post
            label:
              type: string
              example: Guest post
        stage:
          $ref: '#/components/schemas/Stage'
        status_label:
          type: string
          description: As the Mentions table prints it, to show as is.
          example: Awaiting your decision
        awaiting_your_decision:
          type: boolean
          description: '`true` when you owe an answer.'
        price:
          $ref: '#/components/schemas/Money'
        created_at:
          type: string
          format: date-time
        published_at:
          type:
            - string
            - 'null'
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - unauthorized
                - invalid_body
                - invalid_parameter
                - not_found
                - not_awaiting_decision
              description: Stable, meant for a program.
            message:
              type: string
              description: Meant for a person; may change.
    Stage:
      type: object
      properties:
        key:
          type: string
          enum:
            - proposition
            - content_creation
            - deal_placement
            - live
            - declined
        label:
          type: string
          example: Proposition
    Money:
      type: object
      required:
        - amount
        - currency
        - display
      properties:
        amount:
          type: integer
          description: Whole US dollars.
          example: 300
        currency:
          type: string
          enum:
            - USD
        display:
          type: string
          example: $300
  responses:
    InvalidParameter:
      description: A parameter the route cannot read; the message starts with its name.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_parameter
              message: 'period: give either period, or from and to, not both.'
    Unauthorized:
      description: No valid access key.
      headers:
        WWW-Authenticate:
          schema:
            type: string
            example: Bearer realm="HelloSearch API"
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthorized
              message: A valid access key is required. …
  securitySchemes:
    accessKey:
      type: http
      scheme: bearer
      description: >-
        An access key from your portal, under Settings > Access keys. It starts
        with `hs_live_`.

````

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