FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
stevekrouse
stevekrouseopenai_enrichment
Public
Like
openai_enrichment
Home
Code
3
.vtignore
README.md
H
index.ts
Branches
2
Pull requests
Remixes
History
Environment variables
1
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
6/2/2025
Viewing readonly version of main branch: v4
View latest version
README.md

Person Enrichment API

An HTTP endpoint that enriches person data using OpenAI's web search capabilities. Provide basic information about a person (email, name, etc.) and get back comprehensive research about them.

Setup

  1. Set your OpenAI API key as an environment variable: OPENAI_API_KEY
  2. The API uses the gpt-4o-search-preview model with web search capabilities

Usage

Endpoint

  • Method: POST
  • Content-Type: application/json

Request Body

{ "email": "person@example.com", "name": "John Doe", "company": "Example Corp", "linkedin": "https://linkedin.com/in/johndoe", "twitter": "https://twitter.com/johndoe", "website": "https://johndoe.com" }

Note: At least one field is required. You can provide any combination of the above fields.

Response

Success Response (200)

{ "success": true, "data": { "summary": "Brief overview of the person", "professional_background": "Career history and education", "current_role": "Current position and responsibilities", "company_info": "Information about their company", "recent_activities": "Recent news and projects", "social_presence": "Online presence and thought leadership", "achievements": "Notable accomplishments", "sources": ["https://example.com", "LinkedIn profile", "..."] } }

Error Response (400/500)

{ "success": false, "error": "Error description" }

Example Usage

cURL

curl -X POST https://your-val-url.web.val.run \ -H "Content-Type: application/json" \ -d '{ "email": "elon@tesla.com", "name": "Elon Musk" }'

JavaScript

const response = await fetch('https://your-val-url.web.val.run', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ email: 'person@example.com', name: 'John Doe' }) }); const data = await response.json(); console.log(data);

Features

  • Web Search Integration: Uses OpenAI's latest web search capabilities
  • Comprehensive Research: Provides structured information across multiple categories
  • Flexible Input: Accepts various identifiers (email, name, social profiles, etc.)
  • Source Attribution: Returns sources where information was found
  • Error Handling: Graceful error handling with descriptive messages

Privacy & Ethics

This tool is designed for legitimate business purposes such as:

  • Sales prospecting and lead qualification
  • Partnership research
  • Due diligence for business relationships
  • Professional networking

Please ensure you comply with:

  • GDPR and other privacy regulations
  • Your organization's data handling policies
  • Ethical guidelines for data collection and use
  • Terms of service of the platforms being researched

Rate Limits

The API is subject to OpenAI's rate limits for the gpt-4o-search-preview model. Consider implementing your own rate limiting if needed for production use.

Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.