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

# A brand's ads in an ad library: the days it has pulls, its counts on a day and an earlier one, and its ads, filtered by where they stand and by platform

> A brand's ads in Meta's US ad library, from PodData's weekly reads of its confirmed Facebook pages: every pull, newest first, so you can pick days; its counts on `on` and on `vs`; and its ads, newest start day first, each with its page in the library, Meta's start day, where it runs, at most 80 of its words, the first and last pull it was seen in, and where it stands on `on`. `state` picks the ads running on `on` (the default), or those that started, stopped or weren't seen since between `vs` and `on`, or all; `platform` narrows to one. Where it can't count, `cannot` says why.

**Before:** The company has a confirmed `facebook_page` link, and PodData has read it at least once.

**Next:** `GET /ads/{id}` for one ad. For the brand beside its confirmed rivals, the number tools `GET /companies/{id}/numbers/ads` and `GET /companies/{id}/numbers/ads-weeks`.

**Limits:** 50 a page, or `limit`, at most 100, with `next` as the cursor. Stopped means missing from a pull that read the page to the end; missing from one that stopped short is `not_seen`, never stopped. A company your team can't see is a `404`.

**MCP tool:** `company_ads`, on PodData's MCP server at `https://api.poddata.ai/mcp`, does what this route does, with the same key. See [The MCP server](https://docs.poddata.ai/mcp.md).


## OpenAPI

````yaml /openapi.json get /companies/{id}/ads
openapi: 3.1.0
info:
  title: PodData API
  version: 1.0.0
  description: >-
    PodData is competitive intelligence from the record: what leaders said on
    podcasts, in interviews and at their own events, as quotes with the speaker,
    the source, the day and the second; and, for a diligence, what public
    sources say about a company and its rivals, read through links a person on
    your team has confirmed.


    ## Quick start


    1. **A key.** Someone on your team makes one in the workspace, Settings ›
    API keys. Send it on every call as `Authorization: Bearer pd_live_…`. Keep
    it in an environment variable, such as `PODDATA_API_KEY`, and never print it
    or write it to a file.

    2. **A target.** `POST /targets` with a company's `name` and `domain`, an id
    from `GET /companies?q=`, or its SEC `ticker`.

    3. **Its links and rivals.** `POST /targets/{company}/find` and `POST
    /targets/{company}/rivals/find` propose them, each with the page that shows
    it. Show each one to a person, and confirm it only on their yes.

    4. **A read.** `POST /targets/{company}/read` with `{"rivals": true}` asks
    PodData to read the target and its confirmed rivals now. `GET
    /targets/{company}/coverage` says what has been read, source by source.

    5. **The files.** `GET /targets/{company}/folder` lists a file for each
    source, for the target and each confirmed rival. `?format=zip` is all of
    them at once.

    6. **A report.** `POST /diligence-reports` makes one with five empty pages.
    Write each with `PUT /diligence-reports/{id}/pages/{page}`, check it with
    `POST /diligence-reports/{id}/check`, and read it with every figure filled
    with `GET /diligence-reports/{id}`. Or have PodData's own agent write it,
    `POST /diligence-reports/{id}/runs`, and follow the run with `GET
    /diligence-runs/{id}`.


    The tags below are in that order. Each operation says what has to be true
    first, what to call next and its limits, with a made-up example of the call
    and its answer.


    **For an assistant,** start from `https://api.poddata.ai/llms.txt`, which
    needs no key: the same steps, the MCP server, and PodData's diligence skill
    with its puller, which saves a target's folder, its rivals' and its reports
    to disk. The MCP server does what the API does:
    `https://api.poddata.ai/mcp`, with the same key or by signing in to PodData,
    and each operation here names its tool in `x-mcp-tool`. To add it to Claude
    Code with the key read from the environment each time it starts, never
    written down, run this as it is, in single quotes: `claude mcp add
    --transport http --scope project poddata https://api.poddata.ai/mcp --header
    'Authorization: Bearer ${PODDATA_API_KEY}'`.


    **Limits.** 120 requests a minute a key, then a `429` with `Retry-After`. A
    team's plan sets how many reads, rival finds and filers it may ask for a
    day, and a call past one is a `403` with the code `plan` that says the
    limit. A list or a file holds at most 80 words in a row of a source's own
    text; a whole document or transcript comes from its own route, one at a
    time, under a daily limit.


    **Errors** are `{"error": {"code": "…", "message": "…"}}`, the message a
    sentence that says what to do.
servers:
  - url: https://api.poddata.ai/v1
security:
  - key: []
tags:
  - name: Targets
    description: >-
      Start here. The companies your team looks at: add one by its name and
      domain, by an id from `GET /companies`, or by its SEC ticker. A target is
      your team's alone, and nothing says another team looks at it.
  - name: Links
    description: >-
      A target's own domain, listings and accounts. PodData proposes them from
      its own site, and reads only through a link a person on your team has
      confirmed.
  - name: Rivals
    description: >-
      The companies a target competes with. PodData finds and tests candidates
      and proposes only the rivals; a person confirms each, and then it is read
      beside the target.
  - name: Reads
    description: >-
      Ask PodData to read a target and its confirmed rivals now, and see what
      has been read for it, source by source, and what is missing and why.
  - name: Records and signals
    description: >-
      What PodData read about a company through its confirmed links: records,
      such as filings, licences, cases and stories, and signals, such as reviews
      and ratings, each with its own day and its page on the source's site. And
      the figures your team's own data licences read.
  - name: Ads and site
    description: >-
      A brand's ads in Meta's US ad library, from PodData's weekly reads, and
      the pages of a company's own site as PodData read them.
  - name: Number tools
    description: >-
      Figures computed on the server, so an assistant never pages through
      thousands of reviews or does the sums itself: ratings, complaints, a
      series, a timeline, ads and a site, for a company beside its confirmed
      rivals. Each answers the figures, the rows behind them, the evidence and
      how they were built.
  - name: Folder
    description: >-
      Everything PodData holds for a target and its confirmed rivals, as files:
      an index, a CSV a source and kind, and one zip.
  - name: Reports
    description: >-
      A diligence report: an overview and five pages, each figure filled by a
      number tool when the report is read, and a check that refuses what the
      evidence doesn't hold. Your own assistant writes it a page at a time, or
      PodData's agent does.
  - name: Report runs
    description: >-
      PodData's own agent writing a report or changing one: each run's status,
      its turns and what it cost.
  - name: Quotes
    description: >-
      What people said, as quotes with the speaker, the show, the day, the
      second and a page to cite.
  - name: People
    description: >-
      The people PodData quotes, their sources and timelines, and lookups of
      someone new.
  - name: Shows and episodes
    description: The shows PodData reads and their episodes, with who spoke when.
  - name: Companies
    description: >-
      What companies said and filed themselves: their documents, events,
      transcripts, slides, posts and figures, and passages of at most 80 words
      from them.
  - name: Trackers
    description: >-
      A tracker follows a topic or a person and sends each new quote it matches
      by email, Slack or webhook.
  - name: Lists
    description: >-
      A team's own lists of people and companies, to narrow a search or a
      tracker to them.
  - name: Saved
    description: >-
      What a person signed in has saved, their saved filters and their calendar
      feed. A key, which has no person, is refused most of these.
  - name: Sources
    description: >-
      The sources PodData reads, what it holds from each, and how much of the
      watch list is covered.
  - name: Webhooks
    description: Webhooks a program registers to be sent what its trackers match.
  - name: Usage
    description: The team's calls and reads, counted by day and kind.
  - name: Help
    description: >-
      PodData's guide to itself: what each part of PodData does and where in the
      workspace it's done, topic by topic.
paths:
  /companies/{id}/ads:
    get:
      tags:
        - Ads and site
      summary: >-
        A brand's ads in an ad library: the days it has pulls, its counts on a
        day and an earlier one, and its ads, filtered by where they stand and by
        platform
      description: >-
        A brand's ads in Meta's US ad library, from PodData's weekly reads of
        its confirmed Facebook pages: every pull, newest first, so you can pick
        days; its counts on `on` and on `vs`; and its ads, newest start day
        first, each with its page in the library, Meta's start day, where it
        runs, at most 80 of its words, the first and last pull it was seen in,
        and where it stands on `on`. `state` picks the ads running on `on` (the
        default), or those that started, stopped or weren't seen since between
        `vs` and `on`, or all; `platform` narrows to one. Where it can't count,
        `cannot` says why.


        **Before:** The company has a confirmed `facebook_page` link, and
        PodData has read it at least once.


        **Next:** `GET /ads/{id}` for one ad. For the brand beside its confirmed
        rivals, the number tools `GET /companies/{id}/numbers/ads` and `GET
        /companies/{id}/numbers/ads-weeks`.


        **Limits:** 50 a page, or `limit`, at most 100, with `next` as the
        cursor. Stopped means missing from a pull that read the page to the end;
        missing from one that stopped short is `not_seen`, never stopped. A
        company your team can't see is a `404`.
      operationId: listCompanyAds
      parameters:
        - schema:
            type: string
            maxLength: 64
          required: true
          name: id
          in: path
        - schema:
            type: string
            minLength: 1
            maxLength: 64
            description: 'The ad library, by catalog id: meta-ad-library if left out'
          required: false
          description: 'The ad library, by catalog id: meta-ad-library if left out'
          name: source
          in: query
        - schema:
            type: string
            format: date
            description: >-
              The day to count the ads running on, by each brand's last pull on
              or before it: today if left out
          required: false
          description: >-
            The day to count the ads running on, by each brand's last pull on or
            before it: today if left out
          name: 'on'
          in: query
        - schema:
            type: string
            format: date
            description: >-
              The earlier day to compare it with: four weeks before `on` if left
              out
          required: false
          description: >-
            The earlier day to compare it with: four weeks before `on` if left
            out
          name: vs
          in: query
        - schema:
            type: string
            enum:
              - running
              - started
              - stopped
              - not_seen
              - all
            description: >-
              Which ads: running on `on` (the default), started, stopped or not
              seen since between `vs` and `on`, or all
          required: false
          description: >-
            Which ads: running on `on` (the default), started, stopped or not
            seen since between `vs` and `on`, or all
          name: state
          in: query
        - schema:
            type: string
            maxLength: 40
            description: >-
              Only those running on one platform: facebook, instagram,
              messenger, audience_network, threads
          required: false
          description: >-
            Only those running on one platform: facebook, instagram, messenger,
            audience_network, threads
          name: platform
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            description: 'How many a page: 50 if left out'
          required: false
          description: 'How many a page: 50 if left out'
          name: limit
          in: query
        - schema:
            type: string
            maxLength: 200
          required: false
          name: cursor
          in: query
      responses:
        '200':
          description: A brand's ads on a day
          content:
            application/json:
              examples:
                made-up:
                  summary: 'Made up: no team’s data'
                  value:
                    company:
                      id: northwind-dental
                      name: Northwind Dental
                    source: meta-ad-library
                    'on': '2026-11-11'
                    vs: '2026-10-14'
                    pages: 1
                    pulls:
                      - id: sns_01JD9F0A1B2C00000000000000
                        day: '2026-11-11'
                        captured_at: '2026-11-11T05:40:00.000Z'
                        complete: true
                        items: 14
                      - id: sns_01JCX1A2B3C400000000000000
                        day: '2026-10-14'
                        captured_at: '2026-10-14T05:38:00.000Z'
                        complete: true
                        items: 9
                    on_pull: '2026-11-11'
                    vs_pull: '2026-10-14'
                    complete: true
                    counts:
                      running: 14
                      running_vs: 9
                      change: 5
                      started: 6
                      stopped: 1
                      not_seen: 0
                      platforms:
                        facebook: 14
                        instagram: 12
                    cannot: null
                    data:
                      - id: sig_01JD9F2D3E4F00000000000000
                        source: meta-ad-library
                        company: northwind-dental
                        url: >-
                          https://www.facebook.com/ads/library/?id=990000000000001
                        library_id: '990000000000001'
                        day: '2026-10-28'
                        platforms:
                          - facebook
                          - instagram
                        words: >-
                          New patients: a cleaning, an exam and X-rays for $99
                          at any Northwind clinic. Book online in two minutes.
                        first_seen: '2026-11-04'
                        last_seen: '2026-11-11'
                        state: running
                        started: true
                        gone_by: null
                    next: MjAyNi0xMC0yOA
              schema:
                type: object
                properties:
                  company:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                    required:
                      - id
                      - name
                  source:
                    type: string
                  'on':
                    type: string
                  vs:
                    type: string
                  pages:
                    type: integer
                  pulls:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        day:
                          type: string
                        captured_at:
                          type: string
                        complete:
                          type: boolean
                        items:
                          type: integer
                      required:
                        - id
                        - day
                        - captured_at
                        - complete
                        - items
                  on_pull:
                    type:
                      - string
                      - 'null'
                  vs_pull:
                    type:
                      - string
                      - 'null'
                  complete:
                    type:
                      - boolean
                      - 'null'
                  counts:
                    type: object
                    properties:
                      running:
                        type:
                          - integer
                          - 'null'
                      running_vs:
                        type:
                          - integer
                          - 'null'
                      change:
                        type:
                          - integer
                          - 'null'
                      started:
                        type:
                          - integer
                          - 'null'
                      stopped:
                        type:
                          - integer
                          - 'null'
                      not_seen:
                        type:
                          - integer
                          - 'null'
                      platforms:
                        type: object
                        additionalProperties:
                          type: integer
                    required:
                      - running
                      - running_vs
                      - change
                      - started
                      - stopped
                      - not_seen
                      - platforms
                  cannot:
                    type:
                      - string
                      - 'null'
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        source:
                          type: string
                        company:
                          type: string
                        url:
                          type: string
                        library_id:
                          type:
                            - string
                            - 'null'
                        day:
                          type:
                            - string
                            - 'null'
                        platforms:
                          type: array
                          items:
                            type: string
                        words:
                          type:
                            - string
                            - 'null'
                        first_seen:
                          type: string
                        last_seen:
                          type: string
                        state:
                          type: string
                          enum:
                            - running
                            - stopped
                            - not_seen
                        started:
                          type: boolean
                        gone_by:
                          type:
                            - string
                            - 'null'
                      required:
                        - id
                        - source
                        - company
                        - url
                        - library_id
                        - day
                        - platforms
                        - words
                        - first_seen
                        - last_seen
                        - state
                        - started
                        - gone_by
                  next:
                    type:
                      - string
                      - 'null'
                required:
                  - company
                  - source
                  - 'on'
                  - vs
                  - pages
                  - pulls
                  - on_pull
                  - vs_pull
                  - complete
                  - counts
                  - cannot
                  - data
                  - next
        default:
          description: An error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      x-codeSamples:
        - lang: bash
          label: curl, made-up values
          source: >-
            curl
            'https://api.poddata.ai/v1/companies/northwind-dental/ads?on=2026-11-11&limit=1'
            \
              -H "Authorization: Bearer $PODDATA_API_KEY"
components:
  schemas:
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - bad_request
                - no_key
                - plan
                - forbidden
                - not_found
                - conflict
                - unclear
                - slow_down
                - internal
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    key:
      type: http
      scheme: bearer
      description: >-
        An API key, sent as `Authorization: Bearer pd_live_…`. Someone on your
        team makes one in the workspace, Settings › API keys; it's shown once.
        Staging's keys start with `pd_test_`.

````

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