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

# Run Extract

> Extract text and structured data from a URL.

# Run Extract

## Endpoint

`POST /functions/v1/run-extract`

## Purpose

Loads a page by URL, extracts content, and can optionally structure the result according to a JSON schema.

## Authentication

Required:

`Authorization: Bearer YOUR_ACCESS_TOKEN`

## Request body

### Required fields

| Field | Type | Description |
| - | - | - |
| `url` | `string` | Page URL to extract from |
| `instructions` | `string` | Extraction instructions |
| `settings` | `object` | Extraction settings |

### Common settings

| Field | Type | Description |
| - | - | - |
| `country_code` | `string` | Country code such as `us` |
| `extract_schema_json` | `string` | Optional JSON schema for structured output |

## Example request

```bash theme={null}
curl -X POST "https://api.neuralverge.ai/functions/v1/run-extract" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "instructions": "Collect company name and contact details.",
    "settings": {
      "country_code": "us",
      "extract_schema_json": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"company_name\": { \"type\": \"string\" },\n    \"contact_email\": { \"type\": \"string\" }\n  }\n}"
    }
  }'
```

## Example response

```json theme={null}
{
  "session_id": "11111111-1111-1111-1111-111111111111",
  "kind": "extract",
  "url": "https://example.com",
  "human": "# Extracted details\n\n- Company name: Example Inc.\n- Contact email: hello@example.com",
  "machine": {
    "company_name": "Example Inc.",
    "contact_email": "hello@example.com"
  },
  "total_points": 3
}
```

## Possible errors

* `400 Bad Request`
* `401 Unauthorized`
* `402 Payment Required`
* `500 Internal Error`


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