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

# /substack/publications

> Get a Substack publication by subdomain or custom domain: name, alias, description, author, language, type, created_at, logo and cover image, subscriber count, payment state, podcast details, and subscription plans.

**Price:** 10 credits

**⚠️ Common errors:** 412: Publication not found, or the input is not a valid Substack publication



## OpenAPI

````yaml /openapi/news-publishing.json post /api/substack/publications
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/substack/publications:
    post:
      tags:
        - /substack
      summary: /substack/publications
      description: >-
        Get a Substack publication by subdomain or custom domain: name, alias,
        description, author, language, type, created_at, logo and cover image,
        subscriber count, payment state, podcast details, and subscription
        plans.


        **Price:** 10 credits


        **⚠️ Common errors:** 412: Publication not found, or the input is not a
        valid Substack publication
      operationId: __api_substack_publications_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubstackPublicationsPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SubstackPublication'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SubstackPublicationsPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        publication:
          type: string
          minLength: 1
      type: object
      required:
        - publication
    SubstackPublication:
      properties:
        '@type':
          type: string
          default: SubstackPublication
        id:
          type: integer
        name:
          anyOf:
            - type: string
            - type: 'null'
        alias:
          anyOf:
            - type: string
            - type: 'null'
        custom_domain:
          anyOf:
            - type: string
            - type: 'null'
        hostname:
          anyOf:
            - type: string
            - type: 'null'
        base_url:
          anyOf:
            - type: string
            - type: 'null'
        copyright:
          anyOf:
            - type: string
            - type: 'null'
        language:
          anyOf:
            - type: string
            - type: 'null'
        type:
          anyOf:
            - $ref: '#/components/schemas/SubstackPublicationType'
            - type: 'null'
        homepage_type:
          anyOf:
            - type: string
            - type: 'null'
        created_at:
          anyOf:
            - type: string
            - type: 'null'
        first_post_date:
          anyOf:
            - type: string
            - type: 'null'
        image:
          anyOf:
            - type: string
            - type: 'null'
        logo_wide:
          anyOf:
            - type: string
            - type: 'null'
        cover_image:
          anyOf:
            - type: string
            - type: 'null'
        author_id:
          anyOf:
            - type: integer
            - type: 'null'
        author_name:
          anyOf:
            - type: string
            - type: 'null'
        author_handle:
          anyOf:
            - type: string
            - type: 'null'
        author_bio:
          anyOf:
            - type: string
            - type: 'null'
        author_image:
          anyOf:
            - type: string
            - type: 'null'
        twitter_screen_name:
          anyOf:
            - type: string
            - type: 'null'
        free_subscriber_count:
          anyOf:
            - type: integer
            - type: 'null'
        subscriber_count_label:
          anyOf:
            - type: string
            - type: 'null'
        payments_state:
          anyOf:
            - type: string
            - type: 'null'
        is_personal_mode:
          anyOf:
            - type: boolean
            - type: 'null'
        is_explicit:
          anyOf:
            - type: boolean
            - type: 'null'
        is_invite_only:
          anyOf:
            - type: boolean
            - type: 'null'
        is_community_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
        has_posts:
          anyOf:
            - type: boolean
            - type: 'null'
        has_podcast:
          anyOf:
            - type: boolean
            - type: 'null'
        has_recommendations:
          anyOf:
            - type: boolean
            - type: 'null'
        has_community_content:
          anyOf:
            - type: boolean
            - type: 'null'
        podcast_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
        podcast_title:
          anyOf:
            - type: string
            - type: 'null'
        podcast_description:
          anyOf:
            - type: string
            - type: 'null'
        podcast_byline:
          anyOf:
            - type: string
            - type: 'null'
        podcast_feed_url:
          anyOf:
            - type: string
            - type: 'null'
        podcast_image:
          anyOf:
            - type: string
            - type: 'null'
        plans:
          items:
            $ref: '#/components/schemas/SubstackPublicationPlan'
          type: array
          default: []
      type: object
      required:
        - id
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    SubstackPublicationType:
      type: string
      enum:
        - newsletter
        - podcast
    SubstackPublicationPlan:
      properties:
        '@type':
          type: string
          default: SubstackPublicationPlan
        id:
          anyOf:
            - type: string
            - type: 'null'
        nickname:
          anyOf:
            - type: string
            - type: 'null'
        amount:
          anyOf:
            - type: integer
            - type: 'null'
        currency:
          anyOf:
            - type: string
            - type: 'null'
        interval:
          anyOf:
            - type: string
            - type: 'null'
        interval_count:
          anyOf:
            - type: integer
            - type: 'null'
        is_active:
          anyOf:
            - type: boolean
            - 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
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````