nvNeuralVerge

Extract Company Data From Any Website: Step-by-Step API Tutorial

Extract company data from website API or MCP calls: instructions, JSON schemas, missing fields and PDFs, step by step. 5 points per call, REST or MCP.

By the NeuralVerge team · 11 min read · Updated October 2026

▸On this page

To extract company data from website API calls, send the page URL and a plain-language description of the fields to NeuralVerge's AI extraction and read typed JSON back, with no CSS selectors to repair after a redesign. This tutorial takes one company page through six steps, over REST or as the run_extract MCP tool. Exact request fields and current prices are on the AI extraction product page.

The short version

  • —What you build: one extraction call that turns a company page, or a PDF at a URL, into fields such as name, founding year, headcount and a one-line description.
  • —Who it is for: teams enriching accounts or monitoring competitor pages, and agents that meet URLs mid-task. It reads one public page per call; it does not crawl a site or log in.
  • —Two ways to define the output: instructions alone (fast, shape chosen by the model) or instructions plus a JSON schema in settings.extract_schema_json (fixed shape).
  • —What it costs: 5 points per call, the same as a Search call. A call that returns nothing is still billed.
  • —How you reach it: REST at run-extract, or the run_extract tool on the hosted MCP server. Same inputs, same outputs, same price.

Prerequisites

  • —A NeuralVerge API key from the app dashboard.
  • —A real company page you can check by eye. This tutorial uses the fictional https://example.com/company/acme, but running the steps against a page you already know is the fastest way to judge the output.
  • —curl, Python or any HTTP client. The examples below cover all three where the code differs.

Step 1: Extract with instructions only

Start with the simplest call. Every run-extract request carries a page url, plain-language instructions and a settings object. The schema is optional, so leave it out:

curl https://api.neuralverge.ai/functions/v1/run-extract \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/company/acme",
    "instructions": "Extract the company name, founding year, employee count band, headquarters location, and a one-sentence description.",
    "settings": { "country_code": "us" }
  }'
import requests

response = requests.post(
    "https://api.neuralverge.ai/functions/v1/run-extract",
    headers={"Authorization": "Bearer <API_KEY>"},
    json={
        "url": "https://example.com/company/acme",
        "instructions": "Extract the company name, founding year, employee count band, headquarters location, and a one-sentence description.",
        "settings": {"country_code": "us"},
    },
)
print(response.json())
const response = await fetch("https://api.neuralverge.ai/functions/v1/run-extract", {
  method: "POST",
  headers: {
    Authorization: "Bearer <API_KEY>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://example.com/company/acme",
    instructions:
      "Extract the company name, founding year, employee count band, headquarters location, and a one-sentence description.",
    settings: { country_code: "us" },
  }),
});

const data = await response.json();

One detail matters for your code. When you pass no schema, the result comes back in the human field as JSON text and machine is null. That text is JSON you can parse, but its keys are chosen by the model, so two calls on similar pages are not guaranteed to produce the same field names. Your code should read whichever field matches the way you called it.

Read the result against the page

Open the real page next to the response and check every field. This is the test that tells you whether the extraction is reading the content or approximating it. Start with a broad instruction such as "Collect the main company facts on this page" if you do not yet know what a class of pages contains, then tighten the instruction to the fields you saw.

Name the fields precisely

Naming fields in plain language is the cheapest way to get consistent output. Ten pages with different layouts should come back with the fields you named, but without a schema nothing enforces the exact key names or types. That is the gap Step 2 closes.

Step 2: Pin the response shape with a JSON schema

Instructions say what to look for; they do not fix property names, types or which fields must be present. If a database column or a strict downstream consumer depends on the shape, add a JSON Schema as a string in settings.extract_schema_json, alongside the instructions:

curl https://api.neuralverge.ai/functions/v1/run-extract \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/company/acme",
    "instructions": "Extract the company name, founding year, employee count band, headquarters location, and a one-sentence description.",
    "settings": {
      "country_code": "us",
      "extract_schema_json": "{\"type\":\"object\",\"properties\":{\"company_name\":{\"type\":\"string\"},\"founded_year\":{\"type\":\"string\"},\"employee_count\":{\"type\":\"string\"},\"headquarters\":{\"type\":\"string\"},\"description\":{\"type\":\"string\"}},\"required\":[\"company_name\"]}"
    }
  }'
import json
import requests

schema = {
    "type": "object",
    "properties": {
        "company_name": {"type": "string"},
        "founded_year": {"type": "string"},
        "employee_count": {"type": "string"},
        "headquarters": {"type": "string"},
        "description": {"type": "string"},
    },
    "required": ["company_name"],
}

response = requests.post(
    "https://api.neuralverge.ai/functions/v1/run-extract",
    headers={"Authorization": "Bearer <API_KEY>"},
    json={
        "url": "https://example.com/company/acme",
        "instructions": "Extract the company name, founding year, employee count band, headquarters location, and a one-sentence description.",
        "settings": {"country_code": "us", "extract_schema_json": json.dumps(schema)},
    },
)
print(response.json())

The product page shows this response shape for an Acme call. It is an illustration with a fictional company, not a recorded run, and with your schema the keys under machine follow your property names:

{
  "session_id": "11111111-1111-1111-1111-111111111111",
  "kind": "extract",
  "url": "https://example.com/company/acme",
  "machine": { "company_name": "Acme", "founded": "2019", "employees": "50-100" }
}

With a schema, the typed result is in machine. type: "object" with a properties map defines the fields, and an optional required array marks the ones that must come back. Instructions are still sent, so they can steer which text on the page maps to an ambiguous field, while the schema fixes the shape.

Instructions or schema

Use instructions alone while you are exploring or when a loose shape is fine. Add a schema once downstream code depends on field names. A good path is to run instructions only on a small sample, look at what comes back, and write the schema from what you saw instead of guessing up front. A schema tells you the keys, not that the values are right, so keep validating values.

Step 3: Check missing fields and rendering

Point the same call at a page you know lacks one of the fields, such as a company page with no listed founding year. The honest outcome is an empty value. A guess that looks plausible is the failure to watch for. An illustrative empty result looks like this:

{
  "session_id": "22222222-2222-2222-2222-222222222222",
  "kind": "extract",
  "url": "https://example.com/company/acme",
  "machine": { "company_name": "Acme", "founded_year": null, "employee_count": "50-100" }
}

The product does not state which behaviour you will get, so this is the most important thing to verify before running at volume. A tool that always fills in a complete-looking answer is inferring rather than reading, and that is far harder to catch downstream than an honest empty field. A required field in your schema that still comes back empty is a clean signal to flag the record.

JavaScript-heavy pages

Company pages often load an "About" section or a specialties list after the first page load. The product description says pages are rendered the way a browser would show them, so there is no separate flag to set. If a field is consistently empty on a page where you can see it rendered, check the page in a private window first: content behind a login or a cookie-consent interaction is not reachable, because extraction does not click through flows.

Step 4: Point the call at a document and run a batch

The request takes a url, so a document published at an address, such as a PDF fact sheet, goes through the same call with the same instructions and the same extract_schema_json. A public IRS Form W-9 PDF returned a correct structured result in our own test. Direct file upload, scans, and size or page limits are not stated, so test your own files. The API reference has the full parameter list.

Run a messy batch before you schedule it

One page proves the mechanism. Before wiring this into a schedule, run twenty or thirty real URLs from your target list and check three things: how often each field comes back empty, whether any answers look like a guess instead of a read, and how the call behaves on a URL that redirects or returns an error. A call on a dead URL can still be billed, so budget for misses.

Worked example: a weekly competitor pricing monitor

Take an illustrative case: ten competitor pricing pages checked every week for plan or price changes.

  1. —Define a schema once with plan_name, price, billing_period and included_limits, each typed and plan_name required, so every page returns the same shape.
  2. —Run the call against each URL on a schedule and store the result with the date.
  3. —Compare each week's result with the previous week's for the same URL. A changed price or included_limits is the signal worth alerting on.
  4. —If a redesigned page makes a field come back empty, you see a gap to investigate instead of a silently wrong number.

REST and MCP

Everything above used the REST endpoint. The same extraction is available as the run_extract tool on NeuralVerge's hosted MCP server at https://mcp.neuralverge.ai/mcp, so an agent can decide mid-task that a page should become structured fields. Add the URL to an MCP client such as Claude, ChatGPT, Cursor or VS Code, sign in through the browser and click Allow. There is no key to paste into a config file and nothing to host. The client setup guides cover each app, and the MCP server for Claude walks through a full connection.

Tool names use underscores; the REST path keeps the hyphen (.../functions/v1/run-extract). The arguments are the same fields as the REST body:

{
  "tool": "run_extract",
  "arguments": {
    "url": "https://example.com/company/acme",
    "instructions": "Extract the company name, founding year, employee count band, headquarters location, and a one-sentence description.",
    "settings": { "country_code": "us" }
  }
}

The response has the same shape as over REST, including session_id, kind and the machine and human fields, so the schema work from Step 2 carries over unchanged. A call over MCP costs the same as the equivalent REST call; there is no separate MCP rate. AI research, the multi-step pipeline, is called over REST only; Search, extraction and the data sources are what an agent can pick up as tools around it. Connected clients can be revoked under Settings, then API, in the dashboard; their labels start with "Connector:".

Cost and troubleshooting

An AI Extract call costs 5 points, the same price the pricing page lists for a Search call, and the charge does not depend on the result. In our tests a call on one public sample-invoice PDF returned null and was still charged 5 points, so do not assume empty results are free. Speed and throughput are not stated, so measure them on your own pages.

  • —machine is null: you passed no schema. Read the JSON text in human, or add extract_schema_json to get typed output in machine.
  • —A field is empty but visible in a browser: check for a login wall or a consent interaction, then loosen or clarify the instruction for that field.
  • —Keys differ between pages: you are running instructions only. Add a schema.
  • —The whole result is null: the URL may not have resolved or the page may hold nothing matching. Check the URL, then the instruction. The call is still billed.
  • —A value looks plausible but wrong: compare it with the live page. Extraction maps content by meaning, so a model can misread a value; check a sample before trusting it at volume.

The mechanism between request and response is explained in how AI extraction works.

How to decide

Run your own real page and your own real document through the steps above, then work through these questions:

  • —Does a sample match the page? Check by eye on pages you know before trusting pages you do not.
  • —Is the shape the same on every page, including pages missing fields? Consistency of shape matters more than any single field's accuracy.
  • —Does a missing field come back empty? Test with a page you know lacks one.
  • —Can your pipeline absorb an empty, billed call? Handle null in code and in the budget.
  • —Do documents share the code path? If you ingest PDFs and web pages, confirm both work with one schema.
  • —Is it the right job? Good fits: competitor and market monitoring on a known set of pages, account enrichment from a company's own site, public document intake, clean input for a retrieval index, and agent tool calls. These are workflows we expect, not measured results.
  • —Do you need fields from a registry or a company profile source instead? Those have documented schemas on the data source pages, which are the better reference when a record exists there.

Frequently asked questions

Can I extract company data from a website over MCP, or only through the API?

Yes. The same extraction is available as the run_extract MCP tool at https://mcp.neuralverge.ai/mcp: add the URL to an MCP client such as Claude, ChatGPT or Cursor, sign in through the browser and click Allow. The arguments and the response shape match the REST call, and it is priced the same at 5 points. Use REST for scheduled batches and MCP when an agent chooses the page mid-task.

Do I need to know the exact fields on the page before I start?

No. Step 1 runs an extraction with a broad instruction and no schema, and the model decides the structure from the page. Naming the fields in the instructions (Step 1) and pinning them with a JSON schema (Step 2) are both worth doing once you know what you want back on every call.

What is the difference between plain-language instructions and a JSON schema?

Instructions tell the model what to look for in words, which is fast to write and enough to start. Without a schema the result comes back as JSON text in the human field and machine is null. A JSON schema, passed as a string in settings.extract_schema_json, pins the property names and types and puts the typed result in machine. You can pass both together.

What happens if the company page does not have a field I asked for?

The product does not state what happens, so test it. Ask for a field you know the page lacks and see whether you get an empty value or a guess. A tool that always returns a complete-looking answer is inferring rather than reading. Step 3 shows the check.

Can this approach handle a PDF instead of a web page?

The call takes a URL, and that URL can be a public page or a PDF. A public IRS Form W-9 PDF returned a correct structured result in our own test. Direct file upload, scans and size or page limits are not stated, so test your own files.

Should I call the extraction endpoint directly or give it to an agent as a tool?

Call it directly when you already know which pages need processing, such as a fixed list on a schedule. Let the agent call the run_extract MCP tool when it meets URLs mid-task and needs to decide for itself that a page should become structured fields.

Does a site redesign break the extraction?

The request does not depend on where a field sits in the markup, because you describe fields by meaning instead of by selector, so a layout change does not require editing it. That is not a guarantee for every page, so keep comparing a sample of results against the live pages.

About NeuralVerge

Give your agents structured, cited, real-world data from 300+ sources and the open web — through one API or MCP server.

AI Extraction on the NeuralVerge blog.