> ## Agent Instructions
>
> Base URL: https://api.anysite.io
> Authentication: send the `access-token` header. Do NOT use `Authorization: Bearer`.
> Full endpoint catalog: https://app.anysite.io/docs
# API Calls

Make single API requests with flexible output formats and field filtering

## Basic Syntax

```bash
anysite api <endpoint> [key=value ...] [OPTIONS]
```

Parameters are passed as `key=value` pairs. The CLI automatically converts types based on the cached schema.

## Examples

```bash LinkedIn User
anysite api /api/linkedin/user user=satyanadella
```

```bash LinkedIn Company
anysite api /api/linkedin/company company=anthropic
```

```bash LinkedIn Search
anysite api /api/linkedin/search/users keywords="CTO" count=50
```

```bash Instagram User
anysite api /api/instagram/user user=natgeo
```

```bash Twitter User
anysite api /api/twitter/user user=elonmusk
```

## Output Formats

Control how results are displayed with `--format` (or `-f`):

  
#### JSON (default)

    ```bash
    anysite api /api/linkedin/user user=satyanadella --format json
    ```
    ```json
    {
      "name": "Satya Nadella",
      "headline": "Chairman and CEO at Microsoft",
      "urn": {
        "value": "ACoAAA8BYqEBCGLg_vT_ca6mMEqkR9bc",
        "type": "member"
      },
      ...
    }
    ```
  
  
#### CSV

    ```bash
    anysite api /api/linkedin/search/users keywords="CTO" count=10 --format csv
    ```
    Generates a CSV file suitable for spreadsheets and further processing.
  
  
#### JSONL

    ```bash
    anysite api /api/linkedin/company/employees companies=anthropic --format jsonl
    ```
    One JSON object per line — ideal for streaming and piping to other tools.
  
  
#### Table

    ```bash
    anysite api /api/linkedin/user user=satyanadella --format table
    ```
    Human-readable table format for quick visual inspection.
  

## Field Filtering

### Include Specific Fields

Select only the fields you need:

```bash
anysite api /api/linkedin/user user=satyanadella --fields "name,headline,urn.value"
```

Supports dot-notation for nested fields.

### Exclude Fields

Remove verbose or unnecessary fields:

```bash
anysite api /api/linkedin/user user=satyanadella --exclude "certifications,courses,honors"
```

### Field Presets

Use built-in presets for common use cases:

```bash
anysite api /api/linkedin/user user=satyanadella --fields-preset minimal
anysite api /api/linkedin/user user=satyanadella --fields-preset contact
anysite api /api/linkedin/user user=satyanadella --fields-preset recruiting
```

## Saving Output

### Save to File

```bash
anysite api /api/linkedin/search/users keywords="CTO" count=50 \
  --format csv --output ctos.csv
```

### Compact JSON

Minify JSON output for smaller file sizes:

```bash
anysite api /api/linkedin/user user=satyanadella --compact
```

### Quiet Mode

Suppress progress messages for clean piping:

```bash
anysite api /api/linkedin/user user=satyanadella -q --format jsonl
```

## Piping to Other Tools

Combine with database loading or other CLI commands:

```bash
# API → Database
anysite api /api/linkedin/user user=satyanadella -q --format jsonl | \
  anysite db insert mydb --table profiles --stdin --auto-create

# API → File
anysite api /api/linkedin/search/users keywords="engineer" count=100 \
  -q --format csv > engineers.csv

# API → jq filtering
anysite api /api/linkedin/user user=satyanadella -q | jq '.name, .headline'
```

## Options Reference

| Option | Short | Description |
|--------|-------|-------------|
| `--format` | `-f` | Output format: `json`, `jsonl`, `csv`, `table` (default: `json`) |
| `--fields` | | Include only specified fields (comma-separated, dot-notation) |
| `--exclude` | | Exclude specified fields from output |
| `--fields-preset` | | Built-in field preset: `minimal`, `contact`, `recruiting` |
| `--compact` | | Minify JSON output |
| `--output` | `-o` | Save output to file |
| `-q` | | Quiet mode — suppress progress messages |

## Next Steps

  
#### Batch Processing

    Process multiple inputs with parallelism and rate limiting
  
  
#### Dataset Pipelines

    Build multi-source workflows with dependency chains
