API Documentation

Everything you need to integrate the RichAPI API into your product.

Directory

Yellow Pages Search

Search Yellow Pages for businesses with name, phone, address, website, and categories.

POST
/api/v1/directory_yellowpages
0.01 credits per record

Parameters

FieldTypeRequiredDescription
search_querystringYesBusiness type or name to search for.
locationstringYesCity, state, or ZIP code.
pageintNoPage number for pagination (default 1).
max_pagesintNoMaximum number of pages to scrape.

Example response

json
{
  "data": {
    "businesses": [
      {
        "name": "ABC Plumbing",
        "phone": "(512) 555-0123",
        "rating": 4.8,
        "address": "123 Main St, Austin, TX 78701",
        "website": "https://abcplumbing.example.com",
        "categories": [
          "Plumbers",
          "Water Heaters"
        ]
      }
    ]
  }
}

Code

curl -X POST https://dev-api.richapi.ai/api/v1/directory_yellowpages \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "search_query": "plumber",
  "location": "Austin, TX",
  "page": 1,
  "max_pages": 1
}'

Try it

Sign in to test this endpoint with your API key.

Sign in to try