Python
from parallel import Parallel
client = Parallel()
# Tip: If using Pydantic models, you can generate the schema automatically:
# class CompanyEnrichment(BaseModel):
# ceo_name: str = Field(description="Name of the CEO")
# founding_year: str = Field(description="Year the company was founded")
# output_schema = {"type": "json", "json_schema": CompanyEnrichment.model_json_schema()}
schema = client.beta.findall.enrich(
findall_id="findall_40e0ab8c10754be0b7a16477abb38a2f",
processor="core",
output_schema={
"type": "json",
"json_schema": {
"type": "object",
"properties": {
"ceo_name": {
"type": "string",
"description": "Name of the CEO"
},
"founding_year": {
"type": "string",
"description": "Year the company was founded"
}
},
"required": ["ceo_name", "founding_year"],
"additionalProperties": False
}
}
)
print(f"Enrichment added, schema: {schema.model_dump_json(indent=2)}")import Parallel from "parallel-web";
const client = new Parallel();
const schema = await client.beta.findall.enrich(
"findall_40e0ab8c10754be0b7a16477abb38a2f",
{
processor: "core",
output_schema: {
type: "json",
json_schema: {
type: "object",
properties: {
ceo_name: {
type: "string",
description: "Name of the CEO"
},
founding_year: {
type: "string",
description: "Year the company was founded"
}
},
required: ["ceo_name", "founding_year"],
additionalProperties: false
}
}
}
);
console.log(`Enrichment added, schema: ${JSON.stringify(schema, null, 2)}`);curl --request POST \
--url https://api.parallel.ai/v1beta/findall/runs/{findall_id}/enrich \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data @- <<EOF
{
"output_schema": {
"json_schema": {
"additionalProperties": false,
"properties": {
"gdp": {
"description": "GDP in USD for the year, formatted like '$3.1 trillion (2023)'",
"type": "string"
}
},
"required": [
"gdp"
],
"type": "object"
},
"type": "json"
}
}
EOF{
"objective": "Find all AI companies that raised Series A funding in 2024",
"entity_type": "companies",
"match_conditions": [
{
"name": "developing_ai_products_check",
"description": "Company must be developing artificial intelligence (AI) products"
}
],
"enrichments": [
{
"processor": "core",
"output_schema": {
"json_schema": {
"type": "object",
"properties": {
"ceo_name": {
"type": "string",
"description": "Name of the current CEO of the company. If the CEO is not publicly known, provide the name of the highest-ranking executive or founder. If no information is available, return null."
}
}
},
"type": "json"
}
}
],
"generator": "core",
"match_limit": 50
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "FindAll run not found"
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Validation error"
}
}FindAll
Add Enrichment to FindAll Run
Add an enrichment to a FindAll run.
POST
/
v1beta
/
findall
/
runs
/
{findall_id}
/
enrich
Python
from parallel import Parallel
client = Parallel()
# Tip: If using Pydantic models, you can generate the schema automatically:
# class CompanyEnrichment(BaseModel):
# ceo_name: str = Field(description="Name of the CEO")
# founding_year: str = Field(description="Year the company was founded")
# output_schema = {"type": "json", "json_schema": CompanyEnrichment.model_json_schema()}
schema = client.beta.findall.enrich(
findall_id="findall_40e0ab8c10754be0b7a16477abb38a2f",
processor="core",
output_schema={
"type": "json",
"json_schema": {
"type": "object",
"properties": {
"ceo_name": {
"type": "string",
"description": "Name of the CEO"
},
"founding_year": {
"type": "string",
"description": "Year the company was founded"
}
},
"required": ["ceo_name", "founding_year"],
"additionalProperties": False
}
}
)
print(f"Enrichment added, schema: {schema.model_dump_json(indent=2)}")import Parallel from "parallel-web";
const client = new Parallel();
const schema = await client.beta.findall.enrich(
"findall_40e0ab8c10754be0b7a16477abb38a2f",
{
processor: "core",
output_schema: {
type: "json",
json_schema: {
type: "object",
properties: {
ceo_name: {
type: "string",
description: "Name of the CEO"
},
founding_year: {
type: "string",
description: "Year the company was founded"
}
},
required: ["ceo_name", "founding_year"],
additionalProperties: false
}
}
}
);
console.log(`Enrichment added, schema: ${JSON.stringify(schema, null, 2)}`);curl --request POST \
--url https://api.parallel.ai/v1beta/findall/runs/{findall_id}/enrich \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data @- <<EOF
{
"output_schema": {
"json_schema": {
"additionalProperties": false,
"properties": {
"gdp": {
"description": "GDP in USD for the year, formatted like '$3.1 trillion (2023)'",
"type": "string"
}
},
"required": [
"gdp"
],
"type": "object"
},
"type": "json"
}
}
EOF{
"objective": "Find all AI companies that raised Series A funding in 2024",
"entity_type": "companies",
"match_conditions": [
{
"name": "developing_ai_products_check",
"description": "Company must be developing artificial intelligence (AI) products"
}
],
"enrichments": [
{
"processor": "core",
"output_schema": {
"json_schema": {
"type": "object",
"properties": {
"ceo_name": {
"type": "string",
"description": "Name of the current CEO of the company. If the CEO is not publicly known, provide the name of the highest-ranking executive or founder. If no information is available, return null."
}
}
},
"type": "json"
}
}
],
"generator": "core",
"match_limit": 50
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "FindAll run not found"
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Validation error"
}
}Body
application/json
Input model for FindAll enrich.
Response
Successful Response
Response model for FindAll ingest.