> **For coding agents and LLMs:** This is one page from the Social Fetch docs (markdown export). For curated orientation and workflow guidance, start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for agent onboarding and crawl rules, use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for the full endpoint list with links to pages like this one, use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt); for one platform's parameters and curls, use [`/llms-{platform}.txt`](https://www.socialfetch.dev/llms-tiktok.txt); use [`/llms.json`](https://www.socialfetch.dev/llms.json) when you need structured JSON for tool registration.

## This page

- **On-site (HTML):** <https://www.socialfetch.dev/docs/api/v2/linkedin/organizations/get>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/docs/api/v2/linkedin/organizations/get.mdx>

## API base URL and authentication

- **API origin (from OpenAPI `servers`):** `https://api.socialfetch.dev`
- **Authentication:** send `x-api-key: sfk_...` on `/v1/**` and `/v2/**` routes unless the operation is explicitly anonymous (check OpenAPI `security`, the [API reference hub](https://www.socialfetch.dev/docs/api.mdx), [`/llms.txt`](https://www.socialfetch.dev/llms.txt), or [`/llms.json`](https://www.socialfetch.dev/llms.json) for each route).
- **OpenAPI JSON:** <https://www.socialfetch.dev/openapi.json>

## Recommended docs entrypoints (this site)

- [Documentation overview](https://www.socialfetch.dev/docs.mdx) — top-level orientation (markdown).
- [Quickstart](https://www.socialfetch.dev/docs/quickstart.mdx) — authenticate with `x-api-key`, validate auth with `whoami`, and understand the JSON envelope.
- [SDK](https://www.socialfetch.dev/docs/sdk.mdx) — official TypeScript SDK guide, including `SocialFetchClient`, `Result`, and `unwrap()`.
- [Capability matrix](https://www.socialfetch.dev/docs/capability-matrix.mdx) — every operation with identifiers, pagination, outcomes, media download, credits, and its SDK method. Generated from OpenAPI, so use it for route selection instead of scanning individual pages.
- [Recipes](https://www.socialfetch.dev/docs/recipes.mdx) — copyable workflows (brand monitoring, transcripts, Ad Library, creator scoring, Reddit research) with credit callouts and SDK examples.
- [Integrations](https://www.socialfetch.dev/docs/integrations.mdx) — MCP for AI clients, n8n verified node, Apify Store Actors, Make custom app, SDK, and REST API connection paths.
- [MCP product page](https://www.socialfetch.dev/mcp) — hosted MCP overview, OAuth, Skills install.
- [MCP integration](https://www.socialfetch.dev/docs/integrations/mcp.mdx) — hosted `/mcp` server, OAuth, Cursor/VS Code/Claude install snippets, 1112 endpoint tools, plus docs_search/docs_read for implementation help.
- [n8n integration](https://www.socialfetch.dev/docs/integrations/n8n.mdx) — install `n8n-nodes-socialfetch`, credentials, and workflow examples.
- [Apify integration](https://www.socialfetch.dev/docs/integrations/apify.mdx) — Store Actors under @social-fetch, PPE billing, dataset export, and quick start.
- [Make integration](https://www.socialfetch.dev/docs/integrations/make.mdx) — custom app modules for Make scenarios, API key credentials, and module catalog.
- [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt) — every documented operation with a direct link to that route's agent-readable markdown page (prefer this over parsing OpenAPI).
- [`/llms-{platform}.txt`](https://www.socialfetch.dev/llms-tiktok.txt) — per-platform endpoint files generated from OpenAPI (parameters, credits, curls).
- [`/agents.txt`](https://www.socialfetch.dev/agents.txt) — agent crawl/onboarding file with capabilities, auth rules, and allowlist.
- [`/llms.json`](https://www.socialfetch.dev/llms.json) — structured machine-readable operation inventory with parameter names, pagination, outcomes, credits, and SDK mapping.
- [API reference hub](https://www.socialfetch.dev/docs/api.mdx) — human-friendly index of operations with links into generated pages.
- [Errors](https://www.socialfetch.dev/docs/errors.mdx) — shared error envelope and HTTP status guidance.
- [Credits](https://www.socialfetch.dev/docs/credits.mdx) — metering, `402`, and planning batch jobs.
- [Authentication](https://www.socialfetch.dev/docs/authentication.mdx) — `x-api-key` header, the `SOCIALFETCH_API_KEY` environment variable, and a curl check.
- [Rate limits](https://www.socialfetch.dev/docs/rate-limits.mdx) — no per-minute cap on paid lookups with a key, 200 in flight per workspace, per-minute limits on free and keyless routes, `429`/`503` and `Retry-After`.
- [CLI and agents](https://www.socialfetch.dev/docs/cli-and-agents.mdx) — curl and jq, the `socialfetch` CLI, MCP and the agent skill from a terminal.
- [`/pricing.json`](https://www.socialfetch.dev/pricing.json) — machine-readable pricing: credit packs, plans, free credits and each endpoint's credit cost.
- Outcome semantics such as `found`, `not_found`, and `private` are documented in [Errors](https://www.socialfetch.dev/docs/errors.mdx) and on operation pages when present in the OpenAPI contract.

## Markdown docs convention

- Every docs page has a markdown twin: append **`.mdx`** to the docs pathname (for example `/docs/quickstart` → `/docs/quickstart.mdx`).
- Agents that send `Accept: text/markdown` on `/docs/**` HTML URLs may receive markdown directly (same URL, `Vary: Accept`).
- Published blog posts use the same convention: `/blog/{slug}` → `/blog/{slug}.mdx`, or `Accept: text/markdown` on the HTML URL (`Vary: Accept`).

---
# Get LinkedIn organization (https://www.socialfetch.dev/docs/api/v2/linkedin/organizations/get)

## Summary

Get a LinkedIn organization by slug or id.

**Tags:** `LinkedIn`

## HTTP

- **Method:** GET
- **Path:** `/v2/linkedin/organizations`
- **operationId:** `linkedin.live.organization.get.v2`
- **Base URL:** `https://api.socialfetch.dev`

## Capability summary

- **SDK mapping:** `client.linkedin.getOrganization({ slug: "stripe" })`
- **Accepted identifiers:** `slug` (query), `id` (query)
- **Pagination:** none
- **Business outcome field:** `data.lookupStatus` with values `found`, `not_found`

## Credits

- **Base:** 6 credits per successful lookup.
- **Add-on (`slug`):** +3 credits. _+3 credits_
- **Maximum on success (200):** 9 credits.
- **Failed requests (`lookup_failed`, `503`):** not charged.
- **Authoritative field:** `meta.creditsCharged`.

## Authentication

- **`x-api-key`**: API key (`sfk_...`)

## Parameters

### `slug` (query)

- **Required:** no
- **Constraints:** type `string`
- **Description:** LinkedIn organization slug. A /company/{slug} or /school/{slug} URL is accepted.

### `id` (query)

- **Required:** no
- **Constraints:** type `string`; pattern: `^\d+$`
- **Description:** Numeric LinkedIn organization ID.

## Responses (status codes)

- **200**: LinkedIn organization.
- **400**: Request could not be completed.
- **401**: Request could not be completed.
- **402**: Request could not be completed.
- **413**: Response exceeds 4,000,000 bytes. No charge; request fewer URLs.
- **429**: Request could not be completed.
- **500**: Request could not be completed.
- **502**: Request could not be completed.
- **503**: Request could not be completed.

## Response body (200)

LinkedIn organization.

### Field outline

- **data** (required) — type `object`
  - **sourceFamily** (required) — type `string`; enum: live
  - **lookupStatus** (required) — type `string`; enum: found, not_found
  - **organization** (required) — type `object`; nullable
    - **sourceFamily** (required) — type `string`; enum: live, data. Record family (`live` or `data`).
    - **dataId** (required) — type `string`; nullable. Data API organization identifier.
    - **liveOrganizationId** (required) — type `string`; nullable. Live numeric organization identifier.
    - **entityId** (required) — type `string`; nullable. Live organization entity identifier; falls back to `liveOrganizationId`, which LinkedIn uses as the entity ID.
    - **name** (required) — type `string`; nullable. Organization name.
    - **slug** (required) — type `string`; nullable. Public organization slug; falls back to `universalName`.
    - **universalName** (required) — type `string`; nullable. Live universal organization name; falls back to the `/company/` segment of `url`.
    - **url** (required) — type `string`; nullable. LinkedIn organization URL.
    - **website** (required) — type `string`; nullable. Organization website.
    - **phone** (required) — type `string`; nullable. Organization phone number.
    - **description** (required) — type `string`; nullable. Organization description.
    - **tagline** (required) — type `string`; nullable. Organization tagline.
    - **summary** (required) — type `string`; nullable. Discovery summary.
    - **location** (required) — type `string`; nullable. Discovery location.
    - **type** (required) — type `string`; nullable. Page type, such as `COMPANY` or `SHOWCASE`.
    - **followerCount** (required) — type `number`; nullable. Follower count; filled from `followerCountLabel` when that is an exact number.
    - **followerCountLabel** (required) — type `string`; nullable. Follower count label when the source supplies shorthand text.
    - **industry** (required) — type `string`; nullable. Scalar industry label from discovery; falls back to the first `industriesV2` entry.
    - **staffCount** (required) — type `number`; nullable. Live staff count.
    - **headcount** (required) — type `number`; nullable. Data headcount.
    - **staffCountRange** (required) — type `string`; nullable. Live staff count range.
    - **headcountRange** (required) — type `string`; nullable. Data headcount range.
    - **isClaimable** (required) — type `boolean`; nullable. Claimable-page flag.
    - **industriesLegacy** (required) — type `array`; nullable. Legacy industries.
      - _items:_
        - type `string`; nullable
    - **industriesV2** (required) — type `array`; nullable. V2 industries.
      - _items:_
        - type `string`; nullable
    - **specialities** (required) — type `array`; nullable. Organization specialities.
      - _items:_
        - type `string`; nullable
    - **logos** (required) — type `array`; nullable. Logo variants.
      - _items:_
    - **backgroundCoverImages** (required) — type `array`; nullable. Background cover variants.
      - _items:_
    - **logoUrl** (required) — type `string`; nullable. Primary logo URL; falls back to `images.logo`, then the first `logos` entry.
    - **coverUrl** (required) — type `string`; nullable. Primary cover URL; falls back to `images.cover`, then the first `backgroundCoverImages` entry.
    - **images** (required) — type `object`; nullable. Live image summary.
      - **logo** (required) — type `string`; nullable. Image logo.
      - **cover** (required) — type `string`; nullable. Image cover.
    - **headquarter** (required) — type `object`; nullable. Headquarters.
      - **city** (required) — type `string`; nullable. City.
      - **country** (required) — type `string`; nullable. Country.
      - **countryCode** (required) — type `string`; nullable. Country code.
      - **geographicArea** (required) — type `string`; nullable. Geographic area.
      - **line1** (required) — type `string`; nullable. Address line.
      - **postalCode** (required) — type `string`; nullable. Postal code.
      - **headquarter** (required) — type `boolean`; nullable. Headquarters flag.
    - **hqCity** (required) — type `string`; nullable. Flat headquarters city; falls back to `headquarter.city`.
    - **hqCountry** (required) — type `string`; nullable. Flat headquarters country; falls back to `headquarter.country`.
    - **hqCountryCode** (required) — type `string`; nullable. Flat headquarters country code; falls back to `headquarter.countryCode`.
    - **hqGeographicArea** (required) — type `string`; nullable. Flat headquarters geographic area; falls back to `headquarter.geographicArea`.
    - **hqIsHeadquarter** (required) — type `boolean`; nullable. Flat headquarters flag; falls back to `headquarter.headquarter`.
    - **hqLine1** (required) — type `string`; nullable. Flat headquarters address line; falls back to `headquarter.line1`.
    - **hqPostalCode** (required) — type `string`; nullable. Flat headquarters postal code; falls back to `headquarter.postalCode`.
    - **locations** (required) — type `array`; nullable. Organization locations.
      - _items:_
    - **callToAction** (required) — type `object`; nullable. Call to action.
      - **displayText** (required) — type `string`; nullable. CTA text.
      - **type** (required) — type `string`; nullable. CTA type.
      - **url** (required) — type `string`; nullable. CTA URL.
      - **visible** (required) — type `boolean`; nullable. CTA visibility.
    - **pageVerification** (required) — type `object`; nullable. Page verification.
      - **verified** (required) — type `boolean`; nullable. Verification state.
      - **lastModifiedAt** (required) — type `number`; nullable. Verification modification timestamp.
    - **availableTabs** (required) — type `array`; nullable. Available organization tabs.
      - _items:_
    - **founded** (required) — type `object`; nullable. Founded date.
      - **day** (required) — type `number`; nullable. Day.
      - **month** (required) — type `number`; nullable. Month.
      - **year** (required) — type `number`; nullable. Year.
    - **updatedAt** (required) — type `string`; nullable. Data update timestamp.
    - **parentOrganization** (required) — type `object`; nullable. Parent organization; often only its identifier.
      - **dataId** (required) — type `string`; nullable. Data organization identifier.
      - **liveOrganizationId** (required) — type `string`; nullable. Live numeric organization identifier.
      - **entityId** (required) — type `string`; nullable. Live organization entity identifier; falls back to `liveOrganizationId`, which LinkedIn uses as the entity ID.
      - **name** (required) — type `string`; nullable. Organization name.
      - **url** (required) — type `string`; nullable. Organization URL.
      - **website** (required) — type `string`; nullable. Website URL.
      - **slug** (required) — type `string`; nullable. Public organization slug; falls back to the `/company/` segment of `url`.
      - **industry** (required) — type `string`; nullable. Source industry label.
      - **type** (required) — type `string`; nullable. Organization type.
      - **summary** (required) — type `string`; nullable. Discovery summary.
      - **location** (required) — type `string`; nullable. Discovery location.
      - **followerCount** (required) — type `number`; nullable. Follower count; filled from `followerCountLabel` when that is an exact number.
      - **followerCountLabel** (required) — type `string`; nullable. Follower count label when the source supplies shorthand text.
      - **logos** (required) — type `array`; nullable. Logo variants.
        - _items:_
      - **logoUrl** (required) — type `string`; nullable. Primary logo URL; falls back to the first `logos` entry.
    - **relations** (required) — type `object`; nullable. Relation groups returned with a Live enrich record.
      - **affiliatedByEmployees** (required) — type `array`; nullable. Employee affiliations.
        - _items:_
      - **affiliatedByJobs** (required) — type `array`; nullable. Job affiliations.
        - _items:_
      - **affiliatedByShowcases** (required) — type `array`; nullable. Showcase affiliations.
        - _items:_
      - **peopleAlsoFollow** (required) — type `array`; nullable. People-also-follow organizations.
        - _items:_
  - **page** (required) — type `object`; nullable
    - **kind** (required) — type `string`; enum: cursor, offset, page
    - **nextCursor** (required) — type `string`; nullable
    - **hasMore** (required) — type `boolean`; nullable. Null when continuation is unknown for this page.
    - **start** (required) — type `integer`; minimum: 0; nullable
    - **page** (required) — type `integer`; minimum: 0; nullable
    - **count** (required) — type `integer`; minimum: 0; nullable
    - **returnedCount** (required) — type `integer`; minimum: 0
    - **total** (required) — type `integer`; minimum: 0; nullable
    - **totalPages** (required) — type `integer`; minimum: 0; nullable
  - **reportedTotal** (required) — type `number`; minimum: 0; nullable. Total reported for this page of results; not a guarantee of globally retrievable matches.
- **meta** (required) — type `object`. Metadata about the API response.
  - **requestId** (required) — type `string`; minLength: 1. Unique request identifier for tracing this API call.
  - **creditsCharged** (required) — type `integer`; minimum: 0. Credits charged for this request.
  - **version** (required) — type `string`; enum: v2. Public API version that served the response.
  - **stale** (optional) — type `boolean`; enum: true. Present, and `true`, only when the source couldn't be reached and this is the last good answer for the same request instead, up to 24 hours old. Absent on every live answer.
  - **fetchedAt** (optional) — type `string`. When a stale answer (`stale: true`) was originally fetched (ISO 8601, UTC). Absent on every live answer.

### Example JSON (found)

```json
{
  "data": {
    "sourceFamily": "live",
    "lookupStatus": "found",
    "organization": {
      "sourceFamily": "live",
      "dataId": null,
      "liveOrganizationId": "1441",
      "entityId": "1441",
      "name": "Google",
      "slug": "google",
      "universalName": "google",
      "url": "https://www.linkedin.com/company/google/",
      "website": "https://goo.gle/3DLEokh",
      "phone": null,
      "description": "A problem isn't truly solved until it's solved for all. Googlers build products that help create opportunities for everyone, whether down the street or across …",
      "tagline": null,
      "summary": null,
      "location": null,
      "type": "COMPANY",
      "followerCount": 42373577,
      "followerCountLabel": null,
      "industry": "Software Development",
      "staffCount": 294027,
      "headcount": null,
      "staffCountRange": "10,001+ employees",
      "headcountRange": null,
      "isClaimable": false,
      "industriesLegacy": [
        "Computer Software"
      ],
      "industriesV2": [
        "Software Development"
      ],
      "specialities": [
        "search"
      ],
      "logos": [
        {
          "url": "https://media.licdn.com/dms/image/v2/D4E0BAQGv3cqOuUMY7g/company-logo_100_100/B4EZmhegXHGcAU-/0/1759350753990/google_logo?e=1791417600&v=beta&t=-LguFOLQxUntTZv…",
          "width": 100,
          "height": 100
        }
      ],
      "backgroundCoverImages": [
        {
          "url": "https://media.licdn.com/dms/image/v2/D561BAQEFri4ymUYjEA/company-background_200/B56Z2dEWkHGgAc-/0/1776456657534/google_cover?e=1790330400&v=beta&t=0ZULtw1yP4Pi…",
          "width": 200,
          "height": 33
        }
      ],
      "logoUrl": "https://media.licdn.com/dms/image/v2/D4E0BAQGv3cqOuUMY7g/company-logo_400_400/B4EZmhegXHGcAc-/0/1759350753990/google_logo?e=1791417600&v=beta&t=GTDF9ditvQyD6OK…",
      "coverUrl": "https://media.licdn.com/dms/image/v2/D561BAQEFri4ymUYjEA/company-background_400/B56Z2dEWkHGgAY-/0/1776456657534/google_cover?e=1790330400&v=beta&t=XPOTA9ql2GMe…",
      "images": {
        "logo": "https://media.licdn.com/dms/image/v2/D4E0BAQGv3cqOuUMY7g/company-logo_400_400/B4EZmhegXHGcAc-/0/1759350753990/google_logo?e=1791417600&v=beta&t=GTDF9ditvQyD6OK…",
        "cover": "https://media.licdn.com/dms/image/v2/D561BAQEFri4ymUYjEA/company-background_400/B56Z2dEWkHGgAY-/0/1776456657534/google_cover?e=1790330400&v=beta&t=XPOTA9ql2GMe…"
      },
      "headquarter": {
        "city": "Mountain View",
        "country": "US",
        "countryCode": "US",
        "geographicArea": "CA",
        "line1": "1600 Amphitheatre Parkway",
        "postalCode": "94043",
        "headquarter": true
      },
      "hqCity": "Mountain View",
      "hqCountry": "US",
      "hqCountryCode": "US",
      "hqGeographicArea": "CA",
      "hqIsHeadquarter": true,
      "hqLine1": "1600 Amphitheatre Parkway",
      "hqPostalCode": "94043",
      "locations": [
        {
          "city": "London",
          "country": "GB",
          "countryCode": "GB",
          "geographicArea": "England",
          "line1": "St Giles High Street",
          "postalCode": "WC2H 8AG",
          "headquarter": false
        }
      ],
      "callToAction": {
        "displayText": "Visit website",
        "type": "VIEW_WEBSITE",
        "url": "https://goo.gle/3DLEokh",
        "visible": true
      },
      "pageVerification": {
        "verified": true,
        "lastModifiedAt": 1692139093065
      },
      "availableTabs": [
        {
          "name": "Home",
          "tabType": "HOME"
        }
      ],
      "founded": null,
      "updatedAt": null,
      "parentOrganization": null,
      "relations": {
        "affiliatedByEmployees": [
          {
            "dataId": null,
            "liveOrganizationId": "16140",
            "entityId": "16140",
            "name": "YouTube",
            "url": "https://www.linkedin.com/company/youtube/",
            "website": null,
            "slug": "youtube",
            "industry": "Technology, Information and Internet",
            "type": null,
            "summary": null,
            "location": null,
            "followerCount": 2590702,
            "followerCountLabel": null,
            "logos": [
              {
                "url": "https://media.licdn.com/dms/image/v2/D4E0BAQGyUKaYgsO3cg/company-logo_100_100/B4EZb.zwGgGQAQ-/0/1748031701722/youtube_logo?e=1791417600&v=beta&t=tHbDRM9VnuxaSG…",
                "width": 100,
                "height": 100
              }
            ],
            "logoUrl": "https://media.licdn.com/dms/image/v2/D4E0BAQGyUKaYgsO3cg/company-logo_100_100/B4EZb.zwGgGQAQ-/0/1748031701722/youtube_logo?e=1791417600&v=beta&t=tHbDRM9VnuxaSG…"
          }
        ],
        "affiliatedByJobs": [
          {
            "dataId": null,
            "liveOrganizationId": "16140",
            "entityId": "16140",
            "name": "YouTube",
            "url": "https://www.linkedin.com/company/youtube/",
            "website": null,
            "slug": "youtube",
            "industry": "Technology, Information and Internet",
            "type": null,
            "summary": null,
            "location": null,
            "followerCount": 2590702,
            "followerCountLabel": null,
            "logos": [
              {
                "url": "https://media.licdn.com/dms/image/v2/D4E0BAQGyUKaYgsO3cg/company-logo_100_100/B4EZb.zwGgGQAQ-/0/1748031701722/youtube_logo?e=1791417600&v=beta&t=tHbDRM9VnuxaSG…",
                "width": 100,
                "height": 100
              }
            ],
            "logoUrl": "https://media.licdn.com/dms/image/v2/D4E0BAQGyUKaYgsO3cg/company-logo_100_100/B4EZb.zwGgGQAQ-/0/1748031701722/youtube_logo?e=1791417600&v=beta&t=tHbDRM9VnuxaSG…"
          }
        ],
        "affiliatedByShowcases": [
          {
            "dataId": null,
            "liveOrganizationId": "18950740",
            "entityId": "18950740",
            "name": "Android Enterprise",
            "url": "https://www.linkedin.com/showcase/androidenterprise/",
            "website": null,
            "slug": null,
            "industry": "Information Technology & Services",
            "type": null,
            "summary": null,
            "location": null,
            "followerCount": 33928,
            "followerCountLabel": null,
            "logos": [
              {
                "url": "https://media.licdn.com/dms/image/v2/D560BAQGCZEOhM7Et2A/company-logo_200_200/company-logo_200_200/0/1693934124061/androidenterprise_logo?e=1791417600&v=beta&t…",
                "width": 200,
                "height": 200
              }
            ],
            "logoUrl": "https://media.licdn.com/dms/image/v2/D560BAQGCZEOhM7Et2A/company-logo_200_200/company-logo_200_200/0/1693934124061/androidenterprise_logo?e=1791417600&v=beta&t…"
          }
        ],
        "peopleAlsoFollow": [
          {
            "dataId": null,
            "liveOrganizationId": "33246798",
            "entityId": "33246798",
            "name": "TikTok",
            "url": "https://www.linkedin.com/company/tiktok/",
            "website": null,
            "slug": "tiktok",
            "industry": "Entertainment Providers",
            "type": null,
            "summary": null,
            "location": null,
            "followerCount": 4567582,
            "followerCountLabel": null,
            "logos": [
              {
                "url": "https://media.licdn.com/dms/image/v2/D560BAQHYzDOZhwEZ7Q/company-logo_400_400/B56Zl_CaXSIAAc-/0/1758772964879/tiktok_logo?e=1791417600&v=beta&t=n3dfylp8uAzY_y5…",
                "width": 400,
                "height": 400
              }
            ],
            "logoUrl": "https://media.licdn.com/dms/image/v2/D560BAQHYzDOZhwEZ7Q/company-logo_400_400/B56Zl_CaXSIAAc-/0/1758772964879/tiktok_logo?e=1791417600&v=beta&t=n3dfylp8uAzY_y5…"
          }
        ]
      }
    },
    "page": null,
    "reportedTotal": null
  },
  "meta": {
    "requestId": "fixture",
    "creditsCharged": 6,
    "version": "v2"
  }
}
```

## Error handling & retries

Interpret HTTP status codes using the descriptions below. Do not assume a JSON body unless the OpenAPI schema defines one for that status.

- **400**: Request could not be completed. **Retry:** Fix the request; retrying the same invalid payload will not help.
- **401**: Request could not be completed. **Retry:** Fix the API key first; retrying without changes will not help.
- **402**: Request could not be completed. **Retry:** Do not retry without resolving billing/credits (retrying the same request will not help).
- **413**: Response exceeds 4,000,000 bytes. No charge; request fewer URLs.
- **429**: Request could not be completed.
- **500**: Request could not be completed.
- **502**: Request could not be completed. **Retry:** May be transient; a few retries with backoff are reasonable.
- **503**: Request could not be completed. **Retry:** Usually safe to retry with exponential backoff and jitter.

### Suggested client defaults

- Send the API key using the `x-api-key` header on every request.
- On `503` (and sometimes `502`), retry with backoff; cap retries and surface a clear error to the user.
- On `402`, surface an actionable billing message rather than blind retries.

## Examples

### TypeScript SDK

```typescript
import { SocialFetchClient } from "@socialfetch/sdk";

const client = new SocialFetchClient({
  apiKey: process.env.SOCIALFETCH_API_KEY!,
});

const result = await client.linkedin.getOrganization({
  slug: "stripe",
});

if (!result.ok) {
  console.error(result.error);
} else {
  console.log(result.value.data);
}
```

### Node.js

```javascript
const response = await fetch(
  "https://api.socialfetch.dev/v2/linkedin/organizations?slug=stripe",
  {
    headers: {
      "x-api-key": process.env.SOCIALFETCH_API_KEY
    }
  }
);

const data = await response.json();
console.log(data);
```

### cURL

```bash
curl "https://api.socialfetch.dev/v2/linkedin/organizations?slug=stripe" \
  -H "x-api-key: $SOCIALFETCH_API_KEY"
```

### Python

```python
import os

import requests

response = requests.get(
    "https://api.socialfetch.dev/v2/linkedin/organizations?slug=stripe",
    headers={"x-api-key": os.environ["SOCIALFETCH_API_KEY"]},
)
data = response.json()
print(data)
```